Only publish when tagging
This commit is contained in:
9
bindings/python/musl_wheel.sh
Normal file
9
bindings/python/musl_wheel.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
# TODO: use cibuildwheel
|
||||
apk update
|
||||
apk add gcc make cmake pkgconfig linux-headers git musl-dev patchelf
|
||||
|
||||
python3 -m pip install -U pip setuptools auditwheel
|
||||
|
||||
cd bindings/python && python3 setup.py bdist_wheel && auditwheel repair dist/*.whl && mv -f wheelhouse/*.whl .
|
||||
@@ -180,24 +180,28 @@ cmdclass['build'] = custom_build
|
||||
cmdclass['sdist'] = custom_sdist
|
||||
cmdclass['bdist_egg'] = custom_bdist_egg
|
||||
|
||||
# if 'bdist_wheel' in sys.argv and '--plat-name' not in sys.argv:
|
||||
# idx = sys.argv.index('bdist_wheel') + 1
|
||||
# sys.argv.insert(idx, '--plat-name')
|
||||
# name = get_platform()
|
||||
# if 'linux' in name:
|
||||
# # linux_* platform tags are disallowed because the python ecosystem is fubar
|
||||
# # linux builds should be built in the centos 5 vm for maximum compatibility
|
||||
# # see https://github.com/pypa/manylinux
|
||||
# # see also https://github.com/angr/angr-dev/blob/master/bdist.sh
|
||||
# sys.argv.insert(idx + 1, 'manylinux1_' + platform.machine())
|
||||
# elif 'mingw' in name:
|
||||
# if IS_64BITS:
|
||||
# sys.argv.insert(idx + 1, 'win_amd64')
|
||||
# else:
|
||||
# sys.argv.insert(idx + 1, 'win32')
|
||||
# else:
|
||||
# # https://www.python.org/dev/peps/pep-0425/
|
||||
# sys.argv.insert(idx + 1, name.replace('.', '_').replace('-', '_'))
|
||||
if 'bdist_wheel' in sys.argv and '--plat-name' not in sys.argv:
|
||||
idx = sys.argv.index('bdist_wheel') + 1
|
||||
|
||||
name = get_platform()
|
||||
if 'linux' in name:
|
||||
# linux_* platform tags are disallowed because the python ecosystem is fubar
|
||||
# linux builds should be built in the centos 5 vm for maximum compatibility
|
||||
# see https://github.com/pypa/manylinux
|
||||
# see also https://github.com/angr/angr-dev/blob/master/bdist.sh
|
||||
# sys.argv.insert(idx + 1, 'manylinux1_' + platform.machine())
|
||||
# Let auditwheel repair it
|
||||
pass
|
||||
elif 'mingw' in name:
|
||||
sys.argv.insert(idx, '--plat-name')
|
||||
if IS_64BITS:
|
||||
sys.argv.insert(idx + 1, 'win_amd64')
|
||||
else:
|
||||
sys.argv.insert(idx + 1, 'win32')
|
||||
else:
|
||||
sys.argv.insert(idx, '--plat-name')
|
||||
# https://www.python.org/dev/peps/pep-0425/
|
||||
sys.argv.insert(idx + 1, name.replace('.', '_').replace('-', '_'))
|
||||
|
||||
try:
|
||||
from setuptools.command.develop import develop
|
||||
|
||||
Reference in New Issue
Block a user