Skip to content

Commit 416b66b

Browse files
committed
Fix manylinux build tag
1 parent 13c421b commit 416b66b

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.github/workflows/code.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ jobs:
4242
# Put coverage in the output dir mounted in docker
4343
cov_file: /output/coverage.xml
4444
test_requires: cothread pytest-asyncio aioca
45+
# Build an sdist here so it has the right line endings
46+
sdist: true
4547

4648
- os: windows-latest
4749
cov_file: '{project}/dist/coverage.xml'
@@ -78,6 +80,7 @@ jobs:
7880
run: pip install build cibuildwheel
7981

8082
- name: Build Sdist
83+
if: matrix.sdist
8184
run: python -m build --sdist .
8285

8386
- name: Build Wheel
@@ -89,6 +92,7 @@ jobs:
8992
# Disable auditwheel as it isn't compatible with setuptools_dso approach
9093
# https://github.com/mdavidsaver/setuptools_dso/issues/17
9194
CIBW_REPAIR_WHEEL_COMMAND: ''
95+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
9296

9397
- name: Upload Wheel and Sdist
9498
uses: actions/upload-artifact@v2

setup.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import epicscorelibs.version
77
from setuptools_dso import Extension, setup
88
from epicscorelibs.config import get_config_var
9+
from wheel.bdist_wheel import bdist_wheel
910

1011
# Place the directory containing _version_git on the path
1112
for path, _, filenames in os.walk(os.path.dirname(os.path.abspath(__file__))):
@@ -89,8 +90,19 @@ def install_for_development(self):
8990
if not os.path.exists(link):
9091
os.symlink(os.path.join(self.install_dir, "epicscorelibs"), link)
9192

93+
94+
class Wheel(bdist_wheel):
95+
def get_tag(self):
96+
impl, abi_tag, plat_name = bdist_wheel.get_tag(self)
97+
# We want to produce manylinux tagged builds, but can't use
98+
# auditwheel as it isn't compatible with setuptools_dso
99+
# override the tag here as cibuildwheel won't let us do this
100+
plat_name = os.environ.get("AUDITWHEEL_PLAT", plat_name)
101+
return (impl, abi_tag, plat_name)
102+
103+
92104
setup(
93-
cmdclass=dict(develop=Develop, **get_cmdclass()),
105+
cmdclass=dict(develop=Develop, bdist_wheel=Wheel, **get_cmdclass()),
94106
version=__version__,
95107
ext_modules = [ext],
96108
install_requires = [

0 commit comments

Comments
 (0)