Skip to content

Run custom code to generate package_data before install #2636

Answered by webknjaz
CareF asked this question in Q&A
Discussion options

You must be logged in to vote

@CareF pip install only falls back to setup.py install internally if it fails to build a wheel. And I think, this workaround will probably be deprecated at some point now that PEP 517 is a thing. Also, I wouldn't recommend using setup.py install without a compelling reason when you are already using pip.

For non-editable installs, pip will use PEP 517, if pyproject.toml is present. It will import and invoke the build-backend you set after pre-provisioning requires in an isolated (by default) env. From that point, it'll call hooks defined by PEP 517 to build sdist (a tarball) followed by a wheel (since you have wheel in requires, hence in that isolated env). Then, it'll cache the wheel if …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@CareF
Comment options

@webknjaz
Comment options

Answer selected by webknjaz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants