Skip to content

Commit

Permalink
Change src file list for win32 vs others.
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-boyd committed Jan 9, 2024
1 parent c06c89e commit f340f84
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ def run(self):

lzo_dir = os.environ.get("LZO_DIR", "lzo-2.10") # Relative path.

src_list = ["lzomodule.c"]
if sys.platform == "win32":
src_list += glob(os.path.join(lzo_dir, "src/*.c"))

setup(
name="python-lzo",
version="1.16",
Expand All @@ -45,9 +49,9 @@ def run(self):
ext_modules=[
Extension(
name="lzo",
sources=["lzomodule.c"], # + glob(os.path.join(lzo_dir, "src/*.c")),
sources=src_list,
include_dirs=[os.path.join(lzo_dir, "include")],
libraries=['lzo2'],
libraries=['lzo2'] if not sys.platform == "win32" else [],
library_dirs=[os.path.join(lzo_dir, "lib")],
#extra_link_args=["-flat_namespace"] if sys.platform == "darwin" else [],
)
Expand Down

0 comments on commit f340f84

Please sign in to comment.