Adjust setup.py setup_requires to only include build dependencies (#1353)

This commit updates the setup.py setup_requires field to only include
build dependencies. Previously we were a bit aggresive in the set of
packages we specified as build dependencies in the setup.py. This dates
back to early issues building packages from sdist where things were not
properly being installed. However, this results in requiring people have
a working scipy (that setuptools/scikit-build) can find at build time.
This commit updates the setup.py to be more explicit about the packages
it requires for build time and for run time so that when users are
building from source (or sdist) it is more likely to work correctly.
This commit is contained in:
Matthew Treinish 2021-09-23 10:51:21 -04:00 committed by GitHub
parent bb26a2949d
commit e4c7af91a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View File

@ -68,16 +68,12 @@ from skbuild import setup
# of requirements
common_requirements = [
'numpy>=1.16.3',
'scipy>=1.0',
'pybind11>=2.6' # This isn't really an install requirement,
# Pybind11 is required to be pre-installed for
# CMake to successfully find header files.
# This should be fixed in the CMake build files.
]
setup_requirements = common_requirements + [
'scikit-build>=0.11.0',
'cmake!=3.17,!=3.17.0',
'pybind11>=2.6',
]
extras_requirements = {
@ -87,7 +83,7 @@ extras_requirements = {
if not _DISABLE_CONAN:
setup_requirements.append('conan>=1.22.2')
requirements = common_requirements + ['qiskit-terra>=0.17.0']
requirements = common_requirements + ['qiskit-terra>=0.17.0', 'scipy>=1.0']
if not hasattr(setuptools,
'find_namespace_packages') or not inspect.ismethod(