Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 4, 2024
1 parent ac46754 commit c52a868
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
9 changes: 7 additions & 2 deletions tests/integration/test_manylinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,10 @@ def test_build_wheel_with_binary_executable(
#
# Both executables should work when called from the installed bin directory.
assert docker_exec(docker_python, ["/usr/local/bin/testprogram", "4"]) == "16\n"
assert docker_exec(docker_python, ["/usr/local/bin/testprogram_nodeps", "4"]) == "16\n"
assert (
docker_exec(docker_python, ["/usr/local/bin/testprogram_nodeps", "4"])
== "16\n"
)

# testprogram should be a Python shim since we had to rewrite its RPATH.
assert (
Expand All @@ -422,7 +425,9 @@ def test_build_wheel_with_binary_executable(

# testprogram_nodeps should be the unmodified ELF binary.
assert (
docker_exec(docker_python, ["head", "-c4", "/usr/local/bin/testprogram_nodeps"])
docker_exec(
docker_python, ["head", "-c4", "/usr/local/bin/testprogram_nodeps"]
)
== "\x7fELF"
)

Expand Down
20 changes: 16 additions & 4 deletions tests/integration/testpackage/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@

import subprocess


from setuptools import setup

subprocess.check_call(("gcc", "testpackage/testprogram.c", "-lgsl", "-lgslcblas", "-o", "testpackage/testprogram"))
subprocess.check_call(("gcc", "testpackage/testprogram_nodeps.c", "-o", "testpackage/testprogram_nodeps"))
subprocess.check_call(
(
"gcc",
"testpackage/testprogram.c",
"-lgsl",
"-lgslcblas",
"-o",
"testpackage/testprogram",
)
)
subprocess.check_call(
("gcc", "testpackage/testprogram_nodeps.c", "-o", "testpackage/testprogram_nodeps")
)

setup(
name="testpackage",
Expand All @@ -19,5 +29,7 @@
#
# Note that using scripts=[] doesn't work here since setuptools expects the
# scripts to be text and tries to decode them using UTF-8.
data_files=[("../scripts", ["testpackage/testprogram", "testpackage/testprogram_nodeps"])],
data_files=[
("../scripts", ["testpackage/testprogram", "testpackage/testprogram_nodeps"])
],
)

0 comments on commit c52a868

Please sign in to comment.