-
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
Provide index to pip for installation of sdist build dependencies #3249
Comments
@ajacquah can you provide the output of the following please? poetry add black -D -vvv
# if black is already in the pyproject.toml you can do this too
poetry lock -vvv |
@abn here's the output
|
@ajacquah the issue here is that the isolated build environment required to build balck from Poetry when building wheels from sdist for dependencies (not the project itself) will handover build to As for why the Eventually we would want to consume this part of the pipe too, and eventually setup the build environment ourselves. Once that happens this should, and a lot of other annoyances, go away. |
@abn - Thanks for explaining, that makes sense. And glad to hear this part will be consumed by I believe But given that we have the option to set a private repository as the default one, shouldn't this repo url be set via the |
At initial glance, I reckon your proposal is reasonable and should not impact other aspects as only assist and path cases require the isolated build environment. Can you maybe verify that doing so manually works in your environment? |
Thanks @abn . Yes I can verify this works:
|
It seems this is already fixed in 1.1.4 release. |
@qiuwei - checked and this is still an issue in 1.1.4 release. |
Faced a similar problem, but this problem is not present on version 1.0.10. |
hello @abn and maintainers. Any further thoughts on this? I've seen a few suggestion for work-arounds on related issues but it would be great to see this working for the configured default package index. |
I haven't found an effective workaround; plus I'm having the opposite problem: it's failing to find pypi.org dependencies in my custom secondary repository. I'm not sure if I should open a separate bug for it. |
Is there any update for this? I'm trying to incorporate Poetry into my company's CI workflows but this is a major issue. I can workaround it by generating requirements.txt files with poetry export and using pip to install but this is far from ideal. |
As you can see, this has been triaged. Nobody has worked on implementing anything for five reasons:
If you need to set |
How could I handle this in closed networks where |
The issue we're experiencing which are the same as #7472 and #7483 (but possibly different to this thread) is because of the The When we try on a Poetry version newer than v.1.2.2 we get I can confirm uninstalling the newer version and installing v1.2.2 will workaround the issue, this will at least get your Python devs back online.
My suggestion would be to put the |
Again, this is by design. The user pip configuration may do benign things like configure your intercepting/inspecting proxy's certificates, or may fundamentally break Poetry. Over the last year, as Poetry has become more of a standalone tool and less of a pip wrapper, the former has happened much more than the latter. The solution here is to provide these credentials to pip through Ultimately the tension here is between pip-as-a-dev-tool and pip-as-Python-infrastructure; our (soon to be realized) solution to this is to further divorce ourselves from usage of pip so that Poetry configuration can be the single source of truth. |
We look forward to the long term solution, and writing to the global environment in our CI does seem to resolve the issue. It might be worthwhile calling this out in the docs though since it does seem to come up at times. I could make a PR if that would be appropriate. |
Thanks for your response @neersighted. I like that direction and understand removing the dependence on pip will give Poetry more flexibility and the ability to shape it's own future. In this case, I'm not entirely sure how to resolve this issue and am happy to keep on v1.2.2 until Poetry matures further however I'm also happy to submit a PR to add an option flag to allow the Would the PR be considered if submitted? |
Such a PR would not be considered; 1.4 is imminent, the choice is deliberate and |
Does 1.4 remove the dependency on pip? |
@neersighted when you say I mean, poetry respects the |
1.4 partially removes the dependency on a pip in a way which makes this issue obsolete. Poetry doesn't do anything special WRT pip, we just set |
I am not sure all the comments around this issue are the same I get it. This is "by design" and Now, when I want to install this random private package that is dependent on that other random-bad-named package, it would install the one from pypi.org. completely voiding the A solution could be forwarding the sources into the |
There is no |
IIRC, we will use the sources from pyproject.toml of the root project. Relevant lines of code: poetry/src/poetry/installation/chef.py Line 116 in c8945eb
poetry/src/poetry/installation/chef.py Line 75 in c8945eb
|
Hi guys |
just for information even setting PIP_INDEX_URL as root doesn't fix the issue for non-root user on 1.3.2 |
same issue in
but, i run command again with
|
I have the same issue but solved by change global pip config pip config set global.index-url <index-url>
cp ~/.config/pip/pip.conf /etc/ |
As root or with non root user? |
poetry 1.4 is out, I guess this should be closed |
root.this will change default pip index for every user no matter whether is it root. @qkponton |
1.4 release solved the issue for me |
@YAGregor yeah the issue was with a non root user :) |
I can confirm that this issue appears to be resolved for our case. Poetry appears to now be respecting the Artifactory instance we've defined in our For anyone that needs it, this is how we configured Artifactory in our
Interestingly, it appears that our internal certificates are not an issue, even without defining our PEM file in the config. I'm running on Windows so not sure if Poetry is using the certs in the Windows cert store or just ignoring SSL validation all together? |
Closing, as the issue seems to be fixed. If you encounter this in new versions of Poetry, please open new issue. |
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. |
-vvv
option).Issue
Pip as invoked by poetry installs build depdencies from pypi.org instead of custom repository. And since I am running this behind a firewall with no proxy settings this fails. My understanding was that poetry would use default repository for all package actions. Can you please take a look?
To reproduce:
$poetry new --src test-pkg
black
dev dependency:poetry add black -D
Result stack trace:
Thanks for your help!
The text was updated successfully, but these errors were encountered: