Commit 42682914 authored by Sang Ik Lee's avatar Sang Ik Lee Committed by Scott Cyphers

Make required numpy version for setup and install explicit. (#3163)

* Make required numpy version explicit.

* Read setup requirements from requirements.txt
parent b47b16a8
six six
numpy==1.15.4; python_version == "3.4" numpy==1.15.4; python_version == "3.4"
numpy; python_version != "3.4" numpy==1.16.4; python_version == "2.7"
numpy; python_version != "2.7" and python_version != "3.4"
typing typing
...@@ -369,6 +369,9 @@ class BuildExt(build_ext): ...@@ -369,6 +369,9 @@ class BuildExt(build_ext):
with open(os.path.join(PYNGRAPH_ROOT_DIR, 'requirements.txt')) as req: with open(os.path.join(PYNGRAPH_ROOT_DIR, 'requirements.txt')) as req:
requirements = req.read().splitlines() requirements = req.read().splitlines()
setup_requires = [
item for item in requirements if item.strip().startswith('numpy')
]
setup( setup(
name='ngraph-core', name='ngraph-core',
...@@ -385,7 +388,7 @@ setup( ...@@ -385,7 +388,7 @@ setup(
packages=packages, packages=packages,
cmdclass={'build_ext': BuildExt}, cmdclass={'build_ext': BuildExt},
data_files=data_files, data_files=data_files,
setup_requires=['numpy==1.16.4'], setup_requires=setup_requires,
install_requires=requirements, install_requires=requirements,
zip_safe=False, zip_safe=False,
extras_require={ extras_require={
......
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