Skip to content

Move python_bindings into python/bindings - #124

Merged
ZedongPeng merged 1 commit into
MIT-Lu-Lab:mainfrom
ZedongPeng:move-python-bindings
Dec 1, 2026
Merged

ZedongPeng merged 1 commit into
MIT-Lu-Lab:mainfrom
ZedongPeng:move-python-bindings

Conversation

@ZedongPeng

Copy link
Copy Markdown
Collaborator

Summary

Move the pybind11 extension from python_bindings/ to python/bindings/, so everything for the Python interface lives under python/:

python/cupdlpx/             Python package
python/bindings/            C++ extension (CMake subproject)
python/cupdlpx_cu12/        cupdlpx-cu12 distribution
python/metadata_provider.py dynamic metadata for the wheels

The three files are moved unchanged; git records them as renames. No functional change.

Changes

  • CMakeLists.txt: add_subdirectory(python_bindings) → add_subdirectory(python/bindings).
  • pyproject.toml: the sdist includes python/bindings/** instead of python_bindings/**.
  • .github/workflows/wheels.yml: drop python_bindings/** from the path filter; python/** already covers the new location.
  • Update the path in two existing comments (python/bindings/CMakeLists.txt, python/cupdlpx/PDLP.py).

Paths inside the bindings are relative to CMAKE_CURRENT_SOURCE_DIR, and the extension's RPATH ($ORIGIN/...) refers to the installed location, so neither depends on the source layout. The format check selects files by extension (h,c,cu), so its scope is unchanged.

Testing

  • No references to python_bindings remain in the repository.
  • The sdist contains python/bindings/_core_bindings.cpp, CMakeLists.txt and _build_info.py.in.
  • A wheel built from that sdist (CUDA 13.3) imports and solves on an H200 (CUDA 13 backend, cusparseSpMVOp); pytest test/ passes (142 tests).

Keep the C++ extension next to the Python package, the cupdlpx-cu12 project and
the metadata provider, so everything for the Python interface lives under
python/.
@ZedongPeng
ZedongPeng merged commit 6d8a27f into MIT-Lu-Lab:main Dec 1, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant