Skip to content

Commit

Permalink
detect version in advance before building deepmd-kit-cu11 (#3172)
Browse files Browse the repository at this point in the history
Fix #3168.

See:
pypa/setuptools-scm#1006 (comment)

---------

Signed-off-by: Jinzhe Zeng <[email protected]>
(cherry picked from commit 5dfbb55)
  • Loading branch information
njzjz authored and wanghan-iapcm committed Feb 5, 2024
1 parent be43748 commit 29a0387
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ jobs:
- uses: docker/setup-qemu-action@v3
name: Setup QEMU
if: matrix.platform_id == 'manylinux_aarch64' && matrix.os == 'ubuntu-latest'
# detect version in advance. See #3168
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.11'
cache: 'pip'
if: matrix.dp_pkg_name == 'deepmd-kit-cu11'
- run: |
python -m pip install setuptools_scm
python -c "from setuptools_scm import get_version;print('SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DEEPMD-KIT-CU11='+get_version())" >> $GITHUB_ENV
if: matrix.dp_pkg_name == 'deepmd-kit-cu11'
- name: Build wheels
uses: pypa/[email protected]
env:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ environment-pass = [
"DP_VARIANT",
"CUDA_VERSION",
"DP_PKG_NAME",
"SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DEEPMD-KIT-CU11",
]
environment = { PIP_PREFER_BINARY="1", DP_LAMMPS_VERSION="stable_2Aug2023_update2", DP_ENABLE_IPI="1", MPI_HOME="/usr/lib64/mpich", PATH="/usr/lib64/mpich/bin:$PATH" }
before-all = [
Expand Down

0 comments on commit 29a0387

Please sign in to comment.