disable building wheel for a package
On Wed, Sep 12, 2018, 09:53 sashk <b@sashk.xyz> wrote:
Hi,
With latest version of pip, it now forces to build wheel for every package, which causes incompatibilities (due to use of data_files and copying into not standard path) . I've attempted to add --binary=:all: --no-binary mypackage to the pip command, but it did not help. Only solution I found is to break bdist_wheel command in the setup.py, but it adds error messages during installation which can be improperly interpreted by end users.
That may be your best workaround for now, but in you should try to fix your package so that it can build a wheel. Pip is moving towards making bdist_wheel the only supported option, because supporting 'setup.py install' adds a lot of complexity, which is a strain on our limited resources and makes it more difficult to add new features elsewhere in the packaging ecosystem. -n
On Wed, 12 Sep 2018 at 18:33, Nathaniel Smith <njs@pobox.com> wrote:
On Wed, Sep 12, 2018, 09:53 sashk <b@sashk.xyz> wrote:
Hi,
With latest version of pip, it now forces to build wheel for every package, which causes incompatibilities (due to use of data_files and copying into not standard path) . I've attempted to add --binary=:all: --no-binary mypackage to the pip command, but it did not help. Only solution I found is to break bdist_wheel command in the setup.py, but it adds error messages during installation which can be improperly interpreted by end users.
That may be your best workaround for now, but in you should try to fix your package so that it can build a wheel. Pip is moving towards making bdist_wheel the only supported option, because supporting 'setup.py install' adds a lot of complexity, which is a strain on our limited resources and makes it more difficult to add new features elsewhere in the packaging ecosystem.
Not just extra complexity. PEP 517 (support for which will be added to pip in the near future) doesn't even offer a "direct install" interface, so under PEP 517, installation by building a wheel is the *only* option. I agree with Nathaniel - the correct solution is to fix your package so that can be built as a wheel which correctly installs as you wish. If that's not possible due to limitations in the wheel format or the wheel building process, please file issues explaining your use case and the problems you're having, so we can address them. Paul
On Wed, 12 Sep 2018 at 21:03, sashk <b@sashk.xyz> wrote:
Package need to install several non-python files into specific path and we are using data_files. Because wheel doesn't support absolute path[1], these files are installed into wrong location under site-packages. I need some kind of solution for wheel to properly install them, or come up with some kind of a way to move them into proper path on a first run.
Correct - as noted in the discussion on the issue you mentioned, there has been work on this, but nothing final yet. One key question is how you'd expect your package to work if installed in a virtualenv, or using `--user` by someone without root access, or with `--target`. (If your answer is "these possibilities aren't supported", then it's likely you're not building something that's suitable for installation via pip in the first place, i.e., it's more an "application" than a "library"). Your answers would probably be useful data points for the discussion on how wheel should support "absolute paths". Until then, having a manually run post-install script or on-first-run process is likely your best option (that step would presumably need to be run with root privileges). Paul
I'm curious: what data does it attempt to install and where? Have you created a ticket for this somewhere? ke, 2018-09-12 kello 15:56 -0400, sashk kirjoitti:
I agree with Nathaniel - the correct solution is to fix your package so that can be built as a wheel which correctly installs as you wish. If that's not possible due to limitations in the wheel format or the wheel building process, please file issues explaining your use case and the problems you're having, so we can address them.
Package need to install several non-python files into specific path and we are using data_files. Because wheel doesn't support absolute path[1], these files are installed into wrong location under site- packages. I need some kind of solution for wheel to properly install them, or come up with some kind of a way to move them into proper path on a first run.
[1]: https://github.com/pypa/wheel/issues/92 --Distutils-SIG mailing list -- distutils-sig@python.orgTo unsubscribe send an email to distutils-sig-leave@python.org https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/Message archived at https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/R...
participants (4)
-
Alex Grönholm -
Nathaniel Smith -
Paul Moore -
sashk