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

Poetry fails to find and install packages #69

Open
banananeer opened this issue Aug 11, 2023 · 4 comments
Open

Poetry fails to find and install packages #69

banananeer opened this issue Aug 11, 2023 · 4 comments

Comments

@banananeer
Copy link

Hello! This is a really cool project and I would love to use it however I'm having some trouble getting it to work with poetry.

I created a default source in my pyproject file as the following

[[tool.poetry.source]]
name = "test"
url = "https://astariul.github.io/github-hosted-pypi/"
priority = "default"

and when I try to install public-hello I get the following error

poetry add public-hello

Could not find a matching version of package public-hello

Do you have any idea what may be going on?

@reinvantveer
Copy link

reinvantveer commented Aug 29, 2023

I'm coming to the same conclusion:

$ poetry source add --priority=supplemental test https://astariul.github.io/github-hosted-pypi
Adding source with name test.
$ poetry add public-hello==0.2

Could not find a matching version of package public-hello

Pip is able to install, but apparently only because it is able to treat it like something other than a pypi index?
Does poetry expect there to be a /simple endpoint for a list of packages perhaps?

@astariul
Copy link
Owner

Sorry for the late reply.

Yes, another user couldn't make it work with poetry as well (see #68).


As mentioned in python-poetry/poetry#5548, it doesn't work because poetry can't install packages from VCS source (github links) while pip can.

Maybe you should try the solution proposed in the last comment of that issue, i.e. build and publish the wheel and then use that wheel link instead of the repository link in the HTML pages of github-hosted-pypi.

If you manage to make it work, I would love if you could post the solution on this thread as well !

@banananeer
Copy link
Author

Oh interesting. Ok I'll give it a try with publishing the wheels and using that instead of the repository link and let you know how that goes. If I do get it to work, I'll update this issue.

@JonathanNathanson
Copy link

Did anyone ever get this to work?

I've tried adding the link to the release .whl instead of the link to the repository, and I'm still getting the "Could not find a matching version of package ..." error.

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

4 participants