Skip to content

Commit 0f1727d

Browse files
committed
Ensure the correct packages are used for building.
1 parent c3d86b1 commit 0f1727d

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

requirements-audit.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
auditwheel>=3.0.0
2+
wheel==0.31.1

requirements.txt

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
attrs>=19.2.0
2-
auditwheel; sys_platform=="linux"
32
black
43
hypothesis
54
invoke
65
pytest>=4.3.1
76
setuptools>=45.0.0
87
twine
9-
wheel==0.31.1; sys_platform=="linux"
10-
wheel>=0.33.5; sys_platform!="linux"
8+
wheel>=0.33.6

tasks.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ def build(context):
4242
env={"CPPFLAGS": "-Werror -Wno-deprecated-declarations"},
4343
replace_env=False,
4444
)
45-
# if platform == "linux":
46-
# from sys import abiflags
47-
48-
# for so in glob("*.so"):
49-
# context.run(
50-
# f"patchelf --remove-needed libpython{get_python_version()}{abiflags}.so.1.0 {so}",
51-
# echo=True,
52-
# )
45+
if platform == "linux":
46+
from sys import abiflags
47+
48+
for so in glob("*.so"):
49+
context.run(
50+
f"patchelf --remove-needed libpython{get_python_version()}{abiflags}.so.1.0 {so}",
51+
echo=True,
52+
)
5353
context.run(f"{executable} setup.py bdist_wheel", echo=True)
5454
WHEELS = glob("dist/*.whl")
5555
assert WHEELS, "No wheels in dist!"
@@ -58,6 +58,7 @@ def build(context):
5858
# We're typically eligible for manylinux1... or at least manylinux2010.
5959
# This will remove the wheel if it was unchanged... but that will cause
6060
# our assert to fail later, which is what we want!
61+
context.run(f"pip install -r requirements-audit.txt", echo=True)
6162
for wheel in WHEELS:
6263
context.run(f"auditwheel repair {wheel} -w dist", echo=True)
6364
remove(wheel)

0 commit comments

Comments
 (0)