-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow setup.py --version to run without Cython, numpy #7
Conversation
To expand on my comment:
Of the two, I prefer the first one. It is limited to us and there is no silent unintended consequence. It is not hard to include cython in our build environment. Is there no other way around? |
@javierggt - good catch. The only thing I can think of is special-casing |
Something like checking the --version argument could be. Ugly but I think would work. |
@javierggt - I changed the logic here and in chandra.time, please have a look. |
It seems fine to me |
include_dirs=[np.get_include()]) | ||
except ImportError: | ||
cythonize = lambda arg: None | ||
fastss_ext = None | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't something like this then silently not install the extension if you install within an environment that does not have cython?
Description
This addresses the problem in sot/skare3#255.
See sot/chandra_time#40 for more details of functional testing (environment setup and commands).
Testing
setup.py --version
gives expected output in a minimal env (no Cython, no numpy)setup.py build_ext --inplace
fails in the minimal env with an import errorsetup.py test
builds and passes in a ska3 env