Commit 88d79148 authored by Sander Bollen's avatar Sander Bollen

install numpy and cython on the fly

parent 55bf0c71
Pipeline #2567 passed with stage
in 1 minute and 31 seconds
......@@ -3,7 +3,5 @@ build:
- docker
- pip install --upgrade Cython
- pip install --upgrade numpy
- pip install --upgrade pip setuptools wheel
- pip install '.'
......@@ -7,20 +7,41 @@
:license: MIT
from os.path import abspath, dirname, join
import sys
import pkg_resources
import subprocess
from setuptools import setup, find_packages
from Cython.Build import cythonize
except ImportError:
raise NotImplementedError("Installing cython on the fly not yet supported")
# Temporarily install dependencies required by before trying to
# import them. From
sys.path[0:0] = ['setup-requires']
import numpy as np
except ImportError:
raise NotImplementedError("Installing numpy on the fly not yet supported")
def missing_requirements(specifiers):
for specifier in specifiers:
except pkg_resources.DistributionNotFound:
yield specifier
def install_requirements(specifiers):
to_install = list(specifiers)
if to_install:
cmd = [sys.executable, "-m", "pip", "install",
"-t", "setup-requires"] + to_install
requires = ['cython', 'numpy']
from Cython.Build import cythonize
import numpy as np
readme_file = join(abspath(dirname(__file__)), "")
with open(readme_file) as desc_handle:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment