From f2e12d130f97db0ede9c874727dd30d292c3da31 Mon Sep 17 00:00:00 2001 From: "Joshua D. Boyd" Date: Tue, 9 Jan 2024 02:24:40 -0500 Subject: [PATCH 1/5] Work on updating to pyproject.toml. Building with python -m build now works. --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 7752826..f183ca2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,6 +32,7 @@ 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"] From 2c87fe38292f2ee93d3016a983da4ae288509ccf Mon Sep 17 00:00:00 2001 From: "Joshua D. Boyd" Date: Tue, 9 Jan 2024 17:52:12 -0500 Subject: [PATCH 2/5] See if extra_link_args is really needed for macos these days. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 30fbf26..102380c 100644 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ def run(self): name="lzo", sources=["lzomodule.c"] + glob(os.path.join(lzo_dir, "src/*.c")), include_dirs=[os.path.join(lzo_dir, "include")], - extra_link_args=["-flat_namespace"] if sys.platform == "darwin" else [], + #extra_link_args=["-flat_namespace"] if sys.platform == "darwin" else [], ) ], long_description=""" From e3fe6ff8aabba12c7ebef1f2350a436cfd0f856b Mon Sep 17 00:00:00 2001 From: "Joshua D. Boyd" Date: Tue, 9 Jan 2024 18:25:48 -0500 Subject: [PATCH 3/5] CHange how linking is done. --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 102380c..4ebf699 100644 --- a/setup.py +++ b/setup.py @@ -45,8 +45,10 @@ def run(self): ext_modules=[ Extension( name="lzo", - sources=["lzomodule.c"] + glob(os.path.join(lzo_dir, "src/*.c")), + sources=["lzomodule.c"], # + glob(os.path.join(lzo_dir, "src/*.c")), include_dirs=[os.path.join(lzo_dir, "include")], + libraries=['lzo2'], + library_dirs=[os.path.join(lzo_dir, "lib")], #extra_link_args=["-flat_namespace"] if sys.platform == "darwin" else [], ) ], From 6b587cae2da2f78cc2e2cf66379b165f7d9534c6 Mon Sep 17 00:00:00 2001 From: "Joshua D. Boyd" Date: Tue, 9 Jan 2024 18:33:11 -0500 Subject: [PATCH 4/5] Change src file list for win32 vs others. --- setup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 4ebf699..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,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 [], ) From b85c6e59bde00262f38b3a6dbbccaef577368f68 Mon Sep 17 00:00:00 2001 From: "Joshua D. Boyd" Date: Fri, 12 Jan 2024 21:21:54 -0500 Subject: [PATCH 5/5] Try not skipping arm64/macos tests? --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f183ca2..15f0206 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,4 +39,4 @@ 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"