Skip to content

Commit

Permalink
Update setup.py to install Python requirements
Browse files Browse the repository at this point in the history
The setup.py now generates a relocatable binary wheel using
auditwheel and patchelf. They are currently installing from
PyPI.
  • Loading branch information
mvlopri committed Jun 22, 2023
1 parent 6608e8f commit d70c3e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 0 additions & 3 deletions exo_build_ext.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import contextlib
import shutil
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
from pathlib import Path
import subprocess
import sys
import os
Expand Down
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@
cmdclass = {'build_ext': cmake_build_ext},
ext_modules = [Extension("exodus", [""])]
)
wheels = os.listdir("dist")
platform = "linux_x86_64"
subprocess.run(["python", "-m", "pip", "install", "auditwheel", "patchelf"])
for wheel in wheels:
subprocess.run(["python", "-m", "auditwheel", "repair", "--plat", platform, f"dist/{wheel}"])

0 comments on commit d70c3e6

Please sign in to comment.