Skip to content

Commit 96af4fa

Browse files
authored
Fix dirty version when building with CIBW (#2855)
1 parent 68d30b5 commit 96af4fa

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/pypi-cd.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Build wheels
3232
uses: pypa/cibuildwheel@v2.3.1
3333
env:
34-
CIBW_BEFORE_BUILD: pip install -r ci/requirements-wheel.txt
34+
CIBW_BEFORE_BUILD: git reset --hard && pip install -r ci/requirements-wheel.txt
3535
CIBW_ARCHS: ${{ matrix.arch }}
3636
CIBW_SKIP: pp* *-musllinux* cp36-* cp310-win32 *i686 cp310-manylinux_x86_64
3737
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
@@ -41,13 +41,14 @@ jobs:
4141
if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'auto'}}
4242
uses: pypa/cibuildwheel@v2.3.1
4343
env:
44-
CIBW_BEFORE_BUILD: pip install -r ci/requirements-wheel.txt
44+
CIBW_BEFORE_BUILD: git reset --hard && pip install -r ci/requirements-wheel.txt
4545
CIBW_BUILD: cp310-manylinux_x86_64
4646
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
4747

4848
- name: Build source
4949
if: ${{ matrix.os == 'ubuntu-latest' && matrix.arch == 'auto'}}
5050
run: |
51+
git reset --hard
5152
pip install -r ci/requirements-wheel.txt
5253
python setup.py sdist --formats=gztar --dist-dir=./wheelhouse
5354

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*.egg
1111
*.egg-info
1212
dist
13+
wheelhouse
1314
build/
1415
eggs
1516
parts

0 commit comments

Comments
 (0)