Skip to content

Expose command to build packages #25

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

Closed
jaraco opened this issue Dec 12, 2018 · 4 comments
Closed

Expose command to build packages #25

jaraco opened this issue Dec 12, 2018 · 4 comments
Assignees

Comments

@jaraco
Copy link
Member

jaraco commented Dec 12, 2018

Currently, there's pep517.check that checks that a package can successfully build sdist and wheels for a package. Similar to that, it should be possible to actually build a package, either the sdist or the wheel or both... something that a CI tool could use to build the package prior to using twine to upload it. This would address pypa/packaging-problems#219.

@jaraco jaraco self-assigned this Dec 12, 2018
@jaraco
Copy link
Member Author

jaraco commented Dec 12, 2018

I'm thinking this:

python -m pep517.build [-s|--source] [-b|--binary] [-o|--out-dir out-dir] <project-dir>

Default is to build both source and binary (wheel) dists and put them in './dist', comparable to what setup.py sdist bdist_wheel does. Passing either -s or -b would produce only that dist.

jaraco added a commit that referenced this issue Dec 12, 2018
@pfmoore
Copy link
Member

pfmoore commented Dec 12, 2018

I have a slight concern over user confusion. There's a discussion in the packaging-problems repo about there being too many tools involved in the packaging ecosystem. This would add another one (and until pip gets a "build" or "sdist" command, it's the only generic way to make a sdist).

It's not enough that I object to the proposal (and your command line syntax looks fine), but I'd see it as a "useful utility" rather than a definitive implementation - at least for now.

@takluyver
Copy link
Member

takluyver commented Dec 13, 2018 via email

@pfmoore
Copy link
Member

pfmoore commented Dec 13, 2018

Yes, one thing that very rapidly becomes an issue with any form of "general packaging library" is that all the myriad of options pip has for controlling what gets installed, network options like proxies, etc etc, all have legitimate reasons for existing, and all tools should (in theory) support them. Look at pip's "build environment" code for how complex it gets ;-)

I'm not sure that counts as an argument for loading all of that functionality into pip. I'd like to think that having a general "install option management" library would be a more reusable option, and I don't think it's healthy for the ecosystem that any tool that isn't pip either has to reimplement huge parts of pip or forever suffer being considered "incomplete". But it's a lot of work to do that, and it would be very easy to end up with a Java-esque "installer option factory builder manager class" style of interface :-)

All of which is a long-winded way of saying that this is why I think any command line interface in the pep517 library should be considered provisional at this point.

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

No branches or pull requests

3 participants