[英]Full overriding artifactory PyPI package
I'd like to be able to override some packages from upstream PyPI transparently for our users. 我希望能够为我们的用户透明地覆盖来自上游PyPI的一些软件包。
I have the following Artifactory set up: 我有以下Artifactory设置:
For some specificities with my environment, I'd like to ensure that users only download package 'mypackage' from X-local. 对于我的环境的一些特殊性,我想确保用户只从X-local下载包'mypackage'。
At the moment I have included a rule to forbid the expression "**/mypackage-*" in X-remote and I publish my internal version of "mypackage" to X-local. 目前我已经包含了一条规则禁止在X-remote中使用表达式“** / mypackage- *”,并将我的内部版本“mypackage”发布到X-local。 This all works great until "mypackage" has wheels or a new version is published. 这一切都很有效,直到“mypackage”有轮子或新版本发布。
It seems that when pip goes to list all artifacts of "mypackage" in "X-virtual" it does not only finds the ones in X-local but also the ones in X-Remote. 似乎当pip列出“X-virtual”中“mypackage”的所有工件时,它不仅会找到X-local中的那些工件,还会找到X-Remote中的工件。 Is there any way to block that? 有没有办法阻止它? In brief, to prevent all packages from a remote from being listed. 简而言之,防止远程列出所有包。
Adding "**/*mypackage*"
to the blacklist fixed the issue. 将"**/*mypackage*"
到黑名单中可以解决问题。 This might cause problems if you have packages like "mypackage2" but it works for my usecase. 如果你有像“mypackage2”这样的软件包但是它适用于我的用例,这可能会导致问题。
As advised by JFrog Support 正如JFrog支持所告知的那样
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.