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

Is it possible to control compression for wheels built with the help of build frontend? #258

Closed
KOLANICH opened this issue Mar 16, 2021 · 6 comments
Labels
question Further information is requested

Comments

@KOLANICH
Copy link
Contributor

KOLANICH commented Mar 16, 2021

I'd like to be able to create wheels without compression - I'll still will install them on the same machine using pip after that. I have tried -C--compression=stored without any success. python3 ./setup.py bdist_wheel --compression=stored worked as intended.

I am not very sure whoose bug it is, setuptool's, or wheel's, but there are other build backends, and, so to control what compression is used, an interface at least is needed.

@gaborbernat
Copy link
Contributor

gaborbernat commented Mar 16, 2021

This is not possible per packaging standards python adopted. The pep 517 clearly states both sdist and wheel must be compressed via tar.gz and zip format respectively.

https://www.python.org/dev/peps/pep-0517/#build-sdist

@gaborbernat gaborbernat added the question Further information is requested label Mar 16, 2021
@KOLANICH
Copy link
Contributor Author

It doesn't say anything about compression within wheels.

@gaborbernat
Copy link
Contributor

Because that's already defined as zip within the earlier https://www.python.org/dev/peps/pep-0427/#abstract

@layday
Copy link
Member

layday commented Mar 16, 2021

They are asking if they can change the compression level - not the format. You can do this with python -m build -w -C--global-option=--compression -C--global-option=stored but the fact that it works is a bit of an accident.

@KOLANICH
Copy link
Contributor Author

@layday, thank you. that works (for setuptools-based projects). -C "--global-option=--compression=stored" though doesn't, and it is a bug in setuptools, that worths fixing.

@gaborbernat, it still would make sense to define a single interface to control compression in wheels in all backends. The easiest to implement way is, of course, an env variable read from wheel directly, so jo support in third-party tools is needed, but I don't think it is the correct way.

@layday
Copy link
Member

layday commented Mar 18, 2021

Flit and Poetry don't even use the wheel package - there is no path to adding a generic wheel compression option.

@layday, thank you. that works (for setuptools-based projects). -C "--global-option=--compression=stored" though doesn't, and it is a bug in setuptools, that worths fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants