diff --git a/pyproject.toml b/pyproject.toml index 7752826..15f0206 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,10 +32,11 @@ test = ["pytest"] [project.urls] Homepage = "https://github.com/jd-boyd/python-lzo" +"Bug Tracker" = "https://github.com/jd-boyd/python-lzo/issues" [tool.cibuildwheel] archs = ["all"] build-verbosity = 3 test-requires = "pytest" test-command = "pytest {package}/tests" -test-skip = "*-win_arm64 *-macosx_arm64 *-macosx_universal2:arm64" +test-skip = "*-win_arm64" diff --git a/setup.py b/setup.py index 30fbf26..37999b4 100644 --- a/setup.py +++ b/setup.py @@ -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", @@ -45,9 +49,11 @@ 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")], - extra_link_args=["-flat_namespace"] if sys.platform == "darwin" else [], + 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 [], ) ], long_description="""