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

PEP-518 wheel support #850

Closed
gaborbernat opened this issue Jun 20, 2018 · 8 comments
Closed

PEP-518 wheel support #850

gaborbernat opened this issue Jun 20, 2018 · 8 comments
Assignees
Labels
area:package-building feature:new something does not exist yet, but should level:hard rought estimate that this might be quite hard to implement needs:work for PRs: not quite there and needs some changes
Milestone

Comments

@gaborbernat
Copy link
Member

gaborbernat commented Jun 20, 2018

We'll add PEP-518 support by exposing the following:

  • option to replace python setup.py sdist with pip wheel to build packages,
  • this builds wheel instead of sdist,
  • we'll install wheels inside environments instead of sdists.

The benefit of doing this is that now users can specify their project dependencies for setuptools projects by using pyproject.toml.

Because sometimes sdist may be prefered and pip does not support building those yet; for now we'll expose it with an on-demand build = wheel tox config. By default build = sdist and this will keep doing python setup.py sdist. Once pip supports building sdist we'll replace python setup.py sdist with that command.

Will create the PR for this in the following days.

Full PEP-517 support (e.g. flint, etc is tracked by #573).

@gaborbernat gaborbernat added feature:new something does not exist yet, but should area:package-building level:medium rought estimate that this might be neither easy nor hard to implement labels Jun 20, 2018
@gaborbernat gaborbernat added this to the 3.1 milestone Jun 20, 2018
@gaborbernat gaborbernat self-assigned this Jun 20, 2018
@gaborbernat gaborbernat changed the title PEP-518 support PEP-518 wheel support Jun 20, 2018
@rpkilby
Copy link
Member

rpkilby commented Jun 21, 2018

This may require changing some CLI and ini options. --sdistonly, skipsdist, and sdistsrc don't make as much sense given that we may be using wheels. Possibly add --distonly, skipdist, and distsrc, leaving the original for backwards compatibility?

@gaborbernat
Copy link
Member Author

@rpkilby yeah I know, we'll need to shim them around. I would propose the word packaging instead of dist.

gaborbernat added a commit that referenced this issue Jun 29, 2018
…led commands (#852)

#850 PEP-518 support: provide a tox configuration flag ``build`` which can be either ``sdist`` or ``wheel``. For ``sdist`` (default) we build the package as before by using ``python setup.py sdist``. However, when ``wheel`` is enabled now we'll use ``pip wheel`` to build it, and we'll also install wheels in these case into the environments. Note: ``pip`` 10 supports specifying project dependencies (such as ``setuptools-scm``, or a given ``setuptools`` version) via ``pyproject.toml``. Once ``pip`` supports building ``sdist`` to we'll migrate over the ``sdist`` build too.

#851 While running tox invokes various commands (such as building the package, pip installing dependencies and so on), these were printed in case they failed as Python arrays. Changed the representation to a shell command, allowing the users to quickly replicate/debug the failure on their own.
@gaborbernat gaborbernat modified the milestones: 3.1, 3.2 Jul 3, 2018
@gaborbernat gaborbernat added needs:work for PRs: not quite there and needs some changes level:hard rought estimate that this might be quite hard to implement and removed level:medium rought estimate that this might be neither easy nor hard to implement labels Jul 3, 2018
@gaborbernat gaborbernat modified the milestones: 3.2, 3.3 Jul 9, 2018
@gaborbernat
Copy link
Member Author

This has now been retired. The plan is to first trial wheel support via a plugin outside of the core.

@rpkilby
Copy link
Member

rpkilby commented Sep 14, 2018

@gaborbernat - are you planning on creating this plugin, or is this something someone else should pick up?

Edit: I'm happy to look into it, but don't want to duplicate your efforts if you're already half way through creating your own plugin.

@gaborbernat
Copy link
Member Author

No immediate plans as they are other pressing core issues. I'll happily review it though and we'll host it under our organisation if you go ahead with it.

@rpkilby
Copy link
Member

rpkilby commented Apr 3, 2019

btw - I haven't pursued this any further yet. It's on my eventual todo list, but there are a lot of other things on my plate that have higher priority. For now, building the wheel outside of tox and using the tox --installpkg argument has been sufficient.

Note to self: complications mentioned in #232 (comment).

@gaborbernat
Copy link
Member Author

gaborbernat commented Apr 3, 2019

Done under https://github.com/ionelmc/tox-wheel

GitHub
A Tox plugin that builds and installs wheels instead of sdist. - ionelmc/tox-wheel

@rpkilby
Copy link
Member

rpkilby commented Apr 3, 2019

nice 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:package-building feature:new something does not exist yet, but should level:hard rought estimate that this might be quite hard to implement needs:work for PRs: not quite there and needs some changes
Projects
None yet
Development

No branches or pull requests

2 participants