如何为setUptools.setup指定不同的非PYPI软件包索引URL?

发布于 2025-02-09 22:43:40 字数 742 浏览 1 评论 0原文

我正在尝试在PYPI(而是Jfrog/fifactory中的jfrog/fipactory中)指定软件包依赖关系,以> setuptoools.setup()

我尝试过的东西:

  1. 使用depended> dependency_linkssetUptools.setup()的参数类似:

    depentency_links = ['http:// user:passwere@artifactoryHost:8082/api/pypi/pypi/pypi/simple']

但是.0(发布2019-01-22)。

  1. 使用install_requires参数到setuptools.setup() so:

    install_requires = [mypackage @ http://用户:passwere @ artifactory主机:8082/api/pypi/pypi/pypi/simple]

但是install_requires似乎期望将源代码下载为[.zip]存档。

理想情况下,我正在寻找与PIP的额外index-url设置等效的东西,该设置可直接指定到setuptools.setup()

I'm trying to specify a package dependency not in pypi [but in jfrog/Artifactory] to setuptoools.setup()

Things I've tried:

  1. Using the dependency_links argument to setuptools.setup() like so:

    dependency_links=['http://USER:PASSWORD@ARTIFACTORYHOST:8082/api/pypi/pypi/simple']

but dependency_links is now deprecated since 19.0 (released 2019-01-22).

  1. Using the install_requires argument to setuptools.setup() like so:

    install_requires=[mypackage @ http://USER:PASSWORD@ARTIFACTORY HOST:8082/api/pypi/pypi/simple]

but install_requires seems to expect to download source code as a [.zip] archive.

Ideally, I'm looking for something equivalent to pip's extra-index-url setting, which is specifiable directly to setuptools.setup().

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

瞳孔里扚悲伤 2025-02-16 22:43:41

来自Abravalheri

https://github.com/pypa/setuptools/setuptools/pulls/pull/3364

我在最新包装标准中找不到任何内容
将多个包装索引直接在包装上混合在一起
规格。您需要为此使用外部工具,例如PIP
配置文件或包装索引镜像/代理(例如DevPi)(也许
bandersnatch也可以做到吗?)

现在可以做的是将URL强加到车轮文件
pep 440 /pep 508。它
要求您指向特定文件,并且不允许动态
版本分辨率。

所以简短的答案是没有的,不幸的是
有关此的包装标准。

From abravalheri
at
https://github.com/pypa/setuptools/pull/3364:

I couldn't find anything in the latest packaging standards about
mixing multiple package indexes together directly on the package
specification. You need to use an external tool for that, like the pip
configuration file, or a package index mirror/proxy like devpi (maybe
bandersnatch also can do that?).

What is possible to do right now is to force a URL to a wheel file as
covered in PEP 440/PEP 508. But as you have already noticed, it
requires you to point to a specific file and don't allow for dynamic
version resolution.

So the short answer is no, unfortunately there seems to be nothing in
the packaging standards regarding that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文