Skip to content
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

Build issue: PyWavelets does not install from sdist #335

Closed
zvezdan opened this issue Nov 22, 2017 · 3 comments
Closed

Build issue: PyWavelets does not install from sdist #335

zvezdan opened this issue Nov 22, 2017 · 3 comments
Labels
Milestone

Comments

@zvezdan
Copy link

zvezdan commented Nov 22, 2017

PyWavelets fails to install from sdist with standard Python tooling because it relies on presence of numpy in its setup.py. Thus, running pip install --no-binary :all: ... or python setup.py sdist fails with a clean Python installation (no external packages). Since the package is published on PyPI (https://pypi.python.org/pypi/PyWavelets), it needs to be able to build from source distribution (tar.gz file) self-sufficiently.

The fact that the package imports numpy in setup.py indicates that the package needs numpy in setup_requires. This creates a chicken-and-egg kind of problem that is not easy to hack around, but it may be possible. Please take a look at scipy and what they are doing in setup.py: https://github.com/scipy/scipy/blob/master/setup.py. This may help with fixing this issue for PyWavelets.

@rgommers
Copy link
Member

Thanks for the report @zvezdan. This should be resolved by gh-321, which adds support for PEP 518.

@zvezdan
Copy link
Author

zvezdan commented Nov 29, 2017

I don't see how that fixes the problem.
The offending import is still there: https://github.com/PyWavelets/pywt/blob/master/setup.py#L12
That fails on the first attempt of pip install --no-binary :all: ... if numpy is not already pre-installed.

@rgommers
Copy link
Member

With a recent enough pip, what happens is:

  1. pip parses pyproject.toml to find setup dependencies
  2. pip installs those dependencies
  3. pip then builds pywavelets by executing setup.py, producing a wheel
  4. that wheel then gets installed

It's possible that you need a development version of pip, I haven't kept up with its release schedule over the last couple of months.

Note that pip has never supported setup_requires, and what scipy does works but is a bit hacky. PEP 518, while very new, is the official recommended way to get things to work the way they should.

@grlee77 grlee77 added this to the v1.0 milestone Jul 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants