-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
How do you pip install package maintained with poetry from github? #321
Comments
Once pip's PEP-517 support is available, this ought to work provided that the project has the correct information in its pyproject.toml. This should work (but I haven't tried it): [build-system]
requires = ["poetry"]
build-backend = "poetry.masonry.api" Until then, I might consider publishing prerelease wheels to PyPI from an automated build system. |
PEP-517 support was just merged into Pip. Can be probably expected in the 19.0 release in January. |
Pip 19.0 was released on 22 January 2019, and I have just successfully Pip-installed a Poetry-managed Python package from a git repository without |
@jhrmnn Can you tell he how you got this to work ? I'm using pip 19.2.2 and I can't seem to install my poetry project using pip
It is still trying to run
Thanks for any help |
That's because you're trying to do an editable install ( |
Thanks but why doesn't it make sense to do an editable install? That is exactly what I want to do. Clone the required library from git and link it to my current project? I want to be able to push back any changes I have made to the required library. From the pip documentation
Also
Thanks for any help. |
Ah sure. I do that often too, but I usually clone the repository manually in my project, because I want to track it, and Pip-install it from the path (
|
@jhrmnn Ok thanks! So how would one go about working on a project and a required library simultaneously ad I described above? Is there a way to do this using This seems like such an obvious use case. |
Yes, there is. Essentially, it needs to be Poetry all the way up. In the parent project's
The |
@jhrmnn Thanks, I should be migrating my project to poetry any way! |
@jhrmnn this seems to work for temporarily setting up the editable link, but I can't have a line like that permanently in pyproject.toml for a deployed package. How do I implement this in practice? Do I just have to remember to edit the toml file every time I rerun poetry lock and install so that I don't break the link? |
What do you actually want to achieve? For a deployed package, I guess you don't used editable installs, and then you can install a Poetry-managed package from a Git repository with the usual
|
My case doesn't actually involve git or github, so I guess maybe this is the wrong place to ask. I'm just trying to understand how to work with editable installs. I am developing two projects, call them A and B, both using poetry. A depends on B. In
under dependencies for a sensible deploy. Now I want to locally make a change to B and see what effet this has on A without deploying. Basically the usual use case for I can follow these steps:
But this is far from ideal. It becomes a mess if dependencies change and I have to remember to follow all these steps to preserve the link. Is there a better option for a workflow in practice? |
Hi guys, suppose to build the package and publish it in GitHub release, is it possible to pip install a specific package from GitHub releases? I use Windows PowerShell. Thank you. |
You can add a VCS dependency. Please see the docs at python-poetry.org, and open a Discussion or join Discord for help if you need it -- this closed issue is not a good venue for it as we are generating notifications for many users. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Question
How do you pip instal package (maintained with poetry) from github? When I want people to try latest development version from github, they can't install it in their venv using
pip install git+URL
because repo doesn't havesetup.py
file. What's the best solution here - should I add./dist/*
to github, manually createsetupy.py
or something else?The text was updated successfully, but these errors were encountered: