【发布时间】:2020-01-18 09:00:55
【问题描述】:
我想在 conda 构建配方中获取 meta.yaml 的 sdist url。它需要从 URL 获取特定版本或最新版本。当我对 CI/CD 使用 Github 操作时,我需要自动检索特定版本或最新版本的源链接。
现在链接是这样的:https://files.pythonhosted.org/packages/40/e7/sha-256-of-file/file我需要可靠的东西,比如https://hosting/package/release/file
我需要知道一种更可靠的方法来检索特定版本的最新 sdist 或 sdist。有没有办法做到这一点,或者我需要走另一条路?
Is there a PyPi source download link that always points to the lastest version?
到目前为止,这个问题对我不起作用,因为我不打算在 python 中安装它。我需要将它包含在 conda-build 的 meta.yaml 配方中。
meta.yaml 看起来像这样:
{% set version = "0.1.1rc3" %}
package:
name: blablablah
version: {{ version }}
source:
url:
sha256: f3832918bc3c66617f92e35f5d70729187676313caa60c187eb0f28b8fe5e3b5
build:
noarch: python
number: 0
script: python -m pip install --no-deps --ignore-installed .
requirements:
host:
- python
- pip
- numpy==1.16.5
- cython
run:
- python
test:
imports:
- blablablah
about:
here are information about the package
我不知道从哪里获取此文件,因为代码每小时更新一次,并且无法手动升级。
【问题讨论】:
-
不幸的是它没有。我不是在搜索使用 pip 进行安装。我搜索了一个 sdist 文件以专门在 conda-build 中使用它,它不适用于使用 pip 安装。
-
嗯,确实如此。因为答案是“不”,你必须接受。有时“不可能”就是答案。