From 96af4fa990866a9202a90aa4022cf33211b13819 Mon Sep 17 00:00:00 2001 From: Wenjun Si Date: Wed, 23 Mar 2022 07:19:26 +0800 Subject: [PATCH] Fix dirty version when building with CIBW (#2855) --- .github/workflows/pypi-cd.yml | 5 +++-- .gitignore | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi-cd.yml b/.github/workflows/pypi-cd.yml index 0d05e756cf..7c744dcdeb 100644 --- a/.github/workflows/pypi-cd.yml +++ b/.github/workflows/pypi-cd.yml @@ -31,7 +31,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.3.1 env: - CIBW_BEFORE_BUILD: pip install -r ci/requirements-wheel.txt + CIBW_BEFORE_BUILD: git reset --hard && pip install -r ci/requirements-wheel.txt CIBW_ARCHS: ${{ matrix.arch }} CIBW_SKIP: pp* *-musllinux* cp36-* cp310-win32 *i686 cp310-manylinux_x86_64 CIBW_MANYLINUX_X86_64_IMAGE: manylinux1 @@ -41,13 +41,14 @@ jobs: if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'auto'}} uses: pypa/cibuildwheel@v2.3.1 env: - CIBW_BEFORE_BUILD: pip install -r ci/requirements-wheel.txt + CIBW_BEFORE_BUILD: git reset --hard && pip install -r ci/requirements-wheel.txt CIBW_BUILD: cp310-manylinux_x86_64 CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - name: Build source if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'auto'}} run: | + git reset --hard pip install -r ci/requirements-wheel.txt python setup.py sdist --formats=gztar --dist-dir=./wheelhouse diff --git a/.gitignore b/.gitignore index eaaf9476c0..dec06fb768 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ *.egg *.egg-info dist +wheelhouse build/ eggs parts