建造上游源区的车轮
背景:
我的环境在非标准架构上运行,因此在执行PIP安装
时,它通常必须从其SDISTS构建依赖关系的车轮。我想限制必须发生的次数并加快构建的速度,尤其是对于具有C扩展的依赖项。
我确实可以访问一个可以上传SDIST或车轮的私人PYPI索引,因此我认为我可以每周运行,这可以预编译车轮的耗时较高的依赖项,并将这些车轮上传到我的私人索引。
问题:
鉴于依赖关系和版本的名称,我可以为该依赖项下载SDIST的最简单方法是什么?例如,我的形象类似:
wget $PIP_INDEX_URL/some/index/package_version.tar
tar xf package_version.tar
python -m build -w -o dist/ .
twine upload --repository private-pypi dist/*
Background:
My environment runs on a non-standard architecture, so when doing pip install
, it often has to build wheels for dependencies from their sdists. I want to limit the amount of times this has to happen and speed up my builds, especially for dependencies with C extensions.
I do have access to a private PyPI index where I can upload sdists or wheels, so I was thinking I could have a weekly job running which pre-compiles the wheels of the more time consuming dependencies and upload these wheels to my private index.
Question:
Given the name of a dependency and version, what is the easiest way I can download the sdist for that dependency and build the wheel? e.g. I image something like:
wget $PIP_INDEX_URL/some/index/package_version.tar
tar xf package_version.tar
python -m build -w -o dist/ .
twine upload --repository private-pypi dist/*
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
能够解决此用法
pip wheel
与pip下载
,多亏@博士学位。它很简单:Was able to solve this use
pip wheel
combined withpip download
, thanks to @phd. Its as simple as: