This repository was archived by the owner on Nov 11, 2024. It is now read-only.
This repository was archived by the owner on Nov 11, 2024. It is now read-only.
Running setup.py in affiliated package is not possible unless numpy is already installed #402
Closed
Description
In a clean environment, running setup.py
in any affiliated package will cause something like the error listed below. This is obviously unintuitive and undesirable behavior.
EDIT: This apparently only affects setup.py install/develop
, but not setup.py egg_info
, which is why it has not been detected in Astropy's CI builds.
It's not yet clear to me yet whether this can be fixed by putting some try/except
logic around the imports below (and possibly elsewhere), or whether this is a more fundamental problem with the helpers strategy:
astropy-helpers/astropy_helpers/utils.py
Lines 59 to 79 in e2b5151
running build_ext
Traceback (most recent call last):
File "./setup.py", line 143, in <module>
**package_info
File "/Users/ddavella/miniconda3/envs/ah-bottleneck/lib/python3.6/site-packages/setuptools/__init__.py", line 140, in setup
return distutils.core.setup(**attrs)
File "/Users/ddavella/miniconda3/envs/ah-bottleneck/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/ddavella/miniconda3/envs/ah-bottleneck/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/Users/ddavella/miniconda3/envs/ah-bottleneck/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Users/ddavella/miniconda3/envs/ah-bottleneck/lib/python3.6/site-packages/setuptools/command/develop.py", line 38, in run
self.install_for_development()
File "/Users/ddavella/miniconda3/envs/ah-bottleneck/lib/python3.6/site-packages/setuptools/command/develop.py", line 138, in install_for_development
self.run_command('build_ext')
File "/Users/ddavella/miniconda3/envs/ah-bottleneck/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/ddavella/miniconda3/envs/ah-bottleneck/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/Users/ddavella/sandbox/ah-bottleneck/astropy_helpers/astropy_helpers/commands/build_ext.py", line 292, in run
np_include = get_numpy_include_path()
File "/Users/ddavella/sandbox/ah-bottleneck/astropy_helpers/astropy_helpers/utils.py", line 72, in get_numpy_include_path
import numpy
ModuleNotFoundError: No module named 'numpy'
Metadata
Metadata
Assignees
Labels
No labels