From 55157175946facd8bc17301889448537d90623af Mon Sep 17 00:00:00 2001 From: Lauren Capelluto Date: Tue, 12 Jan 2021 16:37:19 -0500 Subject: [PATCH] Update setup.py: REQUIREMENTS (#5613) * Update setup.py to utilize requirements.txt for installation-required dependencies. This reduces the chance of hard-to-debug errors if requirements and setup don't match * Add requirements to MANIFEST Co-authored-by: Matthew Treinish --- MANIFEST.in | 1 + setup.py | 16 ++-------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 47fe2fa283..6621b82829 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ include LICENSE.txt +include requirements.txt include qiskit/qasm/libs/*.inc include qiskit/schemas/*.json include qiskit/VERSION.txt diff --git a/setup.py b/setup.py index c770d889c6..aed80959f4 100755 --- a/setup.py +++ b/setup.py @@ -22,20 +22,8 @@ except ImportError: subprocess.call([sys.executable, '-m', 'pip', 'install', 'Cython>=0.27.1']) from Cython.Build import cythonize -REQUIREMENTS = [ - "contextvars>=2.4;python_version<'3.7'", - "jsonschema>=2.6", - "retworkx>=0.7.0", - "numpy>=1.17", - "ply>=3.10", - "psutil>=5", - "scipy>=1.4", - "sympy>=1.3", - "dill>=0.3", - "fastjsonschema>=2.10", - "python-constraint>=1.4", - "python-dateutil>=2.8.0", -] +with open('requirements.txt') as f: + REQUIREMENTS = f.read().splitlines() # Add Cython extensions here CYTHON_EXTS = ['utils', 'swap_trial']