Skip to content

Commit

Permalink
ECC-1793: develop binary wheel - optional --binary-wheel in setup com…
Browse files Browse the repository at this point in the history
…mand
  • Loading branch information
iainrussell committed Apr 19, 2024
1 parent bdf5325 commit 91688d4
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,23 @@ def parse_version_from(path):
incdir = os.path.realpath("install/include")
libs = ["eccodes"]

# https://setuptools.pypa.io/en/latest/userguide/ext_modules.html
ext_modules = [
setuptools.Extension(
"eccodes._eccodes",
sources=["eccodes/_eccodes.cc"],
language="c++",
libraries=libs,
library_dirs=[libdir],
include_dirs=[incdir],
extra_link_args=["-Wl,-rpath," + libdir],
)
]
if "--binary-wheel" in sys.argv:
sys.argv.remove("--binary-wheel")

# https://setuptools.pypa.io/en/latest/userguide/ext_modules.html
ext_modules = [
setuptools.Extension(
"eccodes._eccodes",
sources=["eccodes/_eccodes.cc"],
language="c++",
libraries=libs,
library_dirs=[libdir],
include_dirs=[incdir],
extra_link_args=["-Wl,-rpath," + libdir],
)
]
else:
ext_modules = []


install_requires = ["numpy"]
Expand Down

0 comments on commit 91688d4

Please sign in to comment.