-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Provide a setup.py
, as Poetry does not (yet) cover all cases
#54
Comments
Poetry just reached 1.0 though, I think it's great but I can see why it might still be lacking in a few areas. I kinda like the solution proposed here. I think using poetry's setup.py generator as explained here would be a good idea. Edit: I haven't looked into it yet but |
Since this is still open, and you've included in the 2.0 discussion, I believe I should give some 2021 feedback: Poetry has matured a lot since then. The whole packaging landscape did. I'm finally able to perform a I didn't revisit yet all of the many issues I had with it to see of any still holds today, nor I checked if they still had those poor non-XDG choices about default dirs, but the fact it has Besides you've already created a Given all of that, I think you can close this. Poetry now is able to do what I need |
You might, however, consider switching to poetry-core for your build system: [build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api" The project itself would still be managed by the full-fledged Poetry, but the clients/users would only require the core to build. |
I see, thanks for the feedback on this.
Oh right looks like I didn't do it yet for |
TL;DR: Poetry does not provide (yet) any way to install a local package (cloned from github) in editable mode (the equivalent of
pip install -e .
), andpip
does not support (yet) editable mode withpyproject.toml
. The solution is, for the time being, to provide asetup.py
.Long version:
So here's my use-case: I'm using nbtlib as a dependency in my projects, which themselves might or might not use Poetry. For developing those projects, I can simply run
pip3 install --user nbtlib
and done, a stablenbtlib
is downloaded from PyPI and installed in my~/.local/lib/python3.x/site-packages
and made globally available to any project that might use it. (or install it in each project's virtualenv, same result)But... I'd also like to contribute to nbtlib. So I clone it's github repo, install Poetry and pytest to run tests before creating PRs. So far so great. Now I want to use this modified version in my projects, so I need to install the local version (not a stable from PyPI). And it must be in editable mode, so any further changes are automatically refletected in my projects.
Poetry? No such feature. It's meant for managing a package's dependencies, not to install or use a package as a dependency. Pip? No luck: it does not support
pip install -e .
with apyproject.toml
:Poetry is still too immature and lacks a lot of features to cover all use cases of
setup.py
,pip
and etc. Andpip
is not modern enough to usepyproject.toml
for all of its features.If there's no better solution, I believe nbtlib should provide a
setup.py
, at least until both tools mature.The text was updated successfully, but these errors were encountered: