Support generation of poetry manged setup.py file
See original GitHub issue- I have searched the issues of this repo and believe that this is not a duplicate.
Issue
As things stand today, poetry packages cannot be installed using pip
or any other package managers from a VCS. This is useful when working with unreleased/unpublished versions of dependencies, where dependencies are managed by ‘pip’ or another tool. This was briefly touched on in #34 for a similar use case.
With this in mind, it could be great if poetry provided a solution, in a limited capacity, similar to what is implemented by poetry-setup. In order to achieve this, poetry could provide a command, eg: poetry setuptools:setupfile
, that generates a usable setup.py
file using the mechanism used today by SdistBuilder
.
In theory, this could be migrated to be a plugin once #693 is implemented.
As an example. this, if implemented, could be used by projects as a pre-commit hook to generate setup.py
file on commit. This should allow projects using pip
etc. to install unpublished projects developed using poetry (if the maintainer wants it).
In addition to the above use case, this also allows for tools like PyCharm etc., to auto detect requirements and metadata.
Can follow this up with a proposed implementation PR.
Relates-to: #34
Issue Analytics
- State:
- Created 5 years ago
- Reactions:50
- Comments:44 (13 by maintainers)
Top GitHub Comments
dephell will do this for you:
dephell deps convert --from pyproject.toml --from-format poetry --to setup.py --to-format setuppy
Or you can add this to
pyproject.toml
and just rundephell deps convert
:In fact, poetry generates a
setup.py
when you build the project, and places it into one of thedist/*.tar.gz
files 😃 Let’s extract it:now your poetry project is pip-editable 😉