Skip to content

Commit 7c84f7a

Browse files
Transurgeonclaude
andcommitted
Add DIFF_ENGINE_VERSION macro for pip builds
The diff_engine_core uses DIFF_ENGINE_VERSION macro (defined in CMakeLists.txt for CMake builds). Added -DDIFF_ENGINE_VERSION="0.0.1" to compile args for setuptools/pip builds. Cherry-picked from submodule-setup branch. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b91920a commit 7c84f7a

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ def finalize_options(self) -> None:
5555
extensions = [
5656
setup_extensions.cvxcore,
5757
setup_extensions.sparsecholesky,
58-
setup_extensions.diffengine, # None if submodule not initialized
58+
setup_extensions.diffengine,
5959
]
60+
# Filter out None (diffengine is None if submodule not initialized)
6061
extensions = [ext for ext in extensions if ext is not None]
6162

6263
setup(

setup/extensions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def not_on_windows(s: str) -> str:
9292
'-std=c99',
9393
'-Wall',
9494
not_on_windows('-Wextra'),
95+
'-DDIFF_ENGINE_VERSION="0.0.1"',
9596
],
9697
extra_link_args=['-lm'] if platform.system().lower() != 'windows' else [],
9798
)

0 commit comments

Comments
 (0)