Skip to content

Commit 2e4c3eb

Browse files
benjefferymergify[bot]
authored andcommitted
Fix setuptools_scm and disable windows wheels
1 parent 2c00ec1 commit 2e4c3eb

File tree

2 files changed

+94
-89
lines changed

2 files changed

+94
-89
lines changed

.github/workflows/docker/buildwheel.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@ ARCH=`uname -p`
88
echo "arch=$ARCH"
99
#yum -y install gsl-devel #For msprime
1010

11-
11+
# We're running as root in the docker container so git commands issued by
12+
# setuptools_scm will fail without this:
13+
git config --global --add safe.directory /project
14+
# Fetch the full history as we'll be missing tags otherwise.
15+
git fetch --unshallow
1216
for V in "${PYTHON_VERSIONS[@]}"; do
1317
PYBIN=/opt/python/$V/bin
1418
rm -rf build/ # Avoid lib build by narrow Python is used by wide python
1519
# Instead of letting setup.py install a newer numpy we install it here
1620
# using the oldest supported version for ABI compatibility
1721
$PYBIN/pip install oldest-supported-numpy
18-
$PYBIN/python setup.py build_ext --inplace
19-
$PYBIN/python setup.py bdist_wheel
22+
SETUPTOOLS_SCM_DEBUG=1 $PYBIN/python setup.py build_ext --inplace
23+
SETUPTOOLS_SCM_DEBUG=1 $PYBIN/python setup.py bdist_wheel
2024
done
2125

2226
cd dist

.github/workflows/wheels.yml

Lines changed: 87 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -50,67 +50,67 @@ jobs:
5050
name: osx-wheel-${{ matrix.python }}
5151
path: dist
5252

53-
windows:
54-
runs-on: windows-latest
55-
strategy:
56-
matrix:
57-
python: [3.7, 3.8, 3.9]
58-
wordsize: [64]
59-
steps:
60-
- name: Checkout
61-
uses: actions/checkout@v2
62-
with:
63-
submodules: true
64-
- name: Install deps
65-
env:
66-
PYTHON: "py -${{ matrix.python }}-${{ matrix.wordsize }}"
67-
shell: bash
68-
run: |
69-
set -ex
70-
${PYTHON} -m pip install --upgrade pip
71-
${PYTHON} -m pip install setuptools wheel
72-
# Instead of letting setup.py install a newer numpy we install it here
73-
# using the oldest supported version for ABI compatibility
74-
${PYTHON} -m pip install oldest-supported-numpy
75-
- name: Build C Extension
76-
env:
77-
PYTHON: "py -${{ matrix.python }}-${{ matrix.wordsize }}"
78-
shell: bash
79-
run: |
80-
set -ex
81-
git reset --hard
82-
${PYTHON} -VV
83-
# For some reason I can't work out the C compiler is not following symlinks
84-
cd lib
85-
rm -r subprojects/kastore
86-
rm -r subprojects/tskit
87-
rm -r subprojects/git-submodules/tskit/c/subprojects
88-
rm -r subprojects/git-submodules/tskit/c/tests
89-
cp -r --dereference subprojects/git-submodules/kastore/c subprojects/kastore
90-
cp -r --dereference subprojects/git-submodules/tskit/c subprojects/tskit
91-
cp -r --dereference subprojects/git-submodules/tskit/python/lwt_interface/* subprojects/tskit/.
92-
cp -r --dereference subprojects/git-submodules/tskit/python/lwt_interface ../lwt_interface
93-
cd ..
94-
#Do a little dance to restore the version to a clean tag for setuptools_scm
95-
git config --global user.email "[email protected]"
96-
git config --global user.name "Mr Robot"
97-
git tag -d ${{ github.ref_name }}
98-
git add -u
99-
git commit -m "tag dance"
100-
git tag ${{ github.ref_name }}
101-
${PYTHON} setup.py build_ext --inplace
102-
- name: Build Wheel
103-
env:
104-
PYTHON: "py -${{ matrix.python }}-${{ matrix.wordsize }}"
105-
shell: bash
106-
run: |
107-
set -ex
108-
${PYTHON} setup.py bdist_wheel
109-
- name: Upload Wheels
110-
uses: actions/upload-artifact@v2
111-
with:
112-
name: win-wheel-${{ matrix.python }}-${{ matrix.wordsize }}
113-
path: dist
53+
# windows:
54+
# runs-on: windows-latest
55+
# strategy:
56+
# matrix:
57+
# python: [3.7, 3.8, 3.9]
58+
# wordsize: [64]
59+
# steps:
60+
# - name: Checkout
61+
# uses: actions/checkout@v2
62+
# with:
63+
# submodules: true
64+
# - name: Install deps
65+
# env:
66+
# PYTHON: "py -${{ matrix.python }}-${{ matrix.wordsize }}"
67+
# shell: bash
68+
# run: |
69+
# set -ex
70+
# ${PYTHON} -m pip install --upgrade pip
71+
# ${PYTHON} -m pip install setuptools wheel
72+
# # Instead of letting setup.py install a newer numpy we install it here
73+
# # using the oldest supported version for ABI compatibility
74+
# ${PYTHON} -m pip install oldest-supported-numpy
75+
# - name: Build C Extension
76+
# env:
77+
# PYTHON: "py -${{ matrix.python }}-${{ matrix.wordsize }}"
78+
# shell: bash
79+
# run: |
80+
# set -ex
81+
# git reset --hard
82+
# ${PYTHON} -VV
83+
# # For some reason I can't work out the C compiler is not following symlinks
84+
# cd lib
85+
# rm -r subprojects/kastore
86+
# rm -r subprojects/tskit
87+
# rm -r subprojects/git-submodules/tskit/c/subprojects
88+
# rm -r subprojects/git-submodules/tskit/c/tests
89+
# cp -r --dereference subprojects/git-submodules/kastore/c subprojects/kastore
90+
# cp -r --dereference subprojects/git-submodules/tskit/c subprojects/tskit
91+
# cp -r --dereference subprojects/git-submodules/tskit/python/lwt_interface/* subprojects/tskit/.
92+
# cp -r --dereference subprojects/git-submodules/tskit/python/lwt_interface ../lwt_interface
93+
# cd ..
94+
# #Do a little dance to restore the version to a clean tag for setuptools_scm
95+
# git config --global user.email "[email protected]"
96+
# git config --global user.name "Mr Robot"
97+
# git tag -d ${{ github.ref_name }}
98+
# git add -u
99+
# git commit -m "tag dance"
100+
# git tag ${{ github.ref_name }}
101+
# ${PYTHON} setup.py build_ext --inplace
102+
# - name: Build Wheel
103+
# env:
104+
# PYTHON: "py -${{ matrix.python }}-${{ matrix.wordsize }}"
105+
# shell: bash
106+
# run: |
107+
# set -ex
108+
# ${PYTHON} setup.py bdist_wheel
109+
# - name: Upload Wheels
110+
# uses: actions/upload-artifact@v2
111+
# with:
112+
# name: win-wheel-${{ matrix.python }}-${{ matrix.wordsize }}
113+
# path: dist
114114

115115
manylinux:
116116
runs-on: ubuntu-latest
@@ -169,30 +169,30 @@ jobs:
169169
pip install tsinfer --only-binary tsinfer -f .
170170
python -c "import tsinfer"
171171
172-
windows-test:
173-
needs: ['windows']
174-
runs-on: windows-latest
175-
strategy:
176-
matrix:
177-
python: [3.7, 3.8, 3.9]
178-
wordsize: [64]
179-
steps:
180-
- name: Download wheels
181-
uses: actions/download-artifact@v2
182-
with:
183-
name: win-wheel-${{ matrix.python }}-${{ matrix.wordsize }}
184-
- name: Set up Python ${{ matrix.python }}
185-
uses: actions/setup-python@v2
186-
with:
187-
python-version: ${{ matrix.python }}
188-
- name: Install wheel and test
189-
run: |
190-
python -VV
191-
#patch-ng required to build lmdb
192-
pip install patch-ng
193-
# Install the local wheel
194-
pip install tsinfer --only-binary tsinfer -f .
195-
python -c "import tsinfer"
172+
# windows-test:
173+
# needs: ['windows']
174+
# runs-on: windows-latest
175+
# strategy:
176+
# matrix:
177+
# python: [3.7, 3.8, 3.9]
178+
# wordsize: [64]
179+
# steps:
180+
# - name: Download wheels
181+
# uses: actions/download-artifact@v2
182+
# with:
183+
# name: win-wheel-${{ matrix.python }}-${{ matrix.wordsize }}
184+
# - name: Set up Python ${{ matrix.python }}
185+
# uses: actions/setup-python@v2
186+
# with:
187+
# python-version: ${{ matrix.python }}
188+
# - name: Install wheel and test
189+
# run: |
190+
# python -VV
191+
# #patch-ng required to build lmdb
192+
# pip install patch-ng
193+
# # Install the local wheel
194+
# pip install tsinfer --only-binary tsinfer -f .
195+
# python -c "import tsinfer"
196196

197197
manylinux-test:
198198
runs-on: ubuntu-latest
@@ -219,7 +219,8 @@ jobs:
219219
220220
PyPI_Upload:
221221
runs-on: ubuntu-latest
222-
needs: ['windows-test', 'OSX-test', 'manylinux-test']
222+
# needs: ['windows-test', 'OSX-test', 'manylinux-test']
223+
needs: ['OSX-test', 'manylinux-test']
223224
steps:
224225
- name: Download all
225226
uses: actions/download-artifact@v2

0 commit comments

Comments
 (0)