Skip to content

build: Remove legacy setup.py and modernize build tooling - #502

Open
kunaaaalcodes wants to merge 1 commit into
spotify:masterfrom
kunaaaalcodes:chore/remove-legacy-setup-py
Open

build: Remove legacy setup.py and modernize build tooling#502
kunaaaalcodes wants to merge 1 commit into
spotify:masterfrom
kunaaaalcodes:chore/remove-legacy-setup-py

Conversation

@kunaaaalcodes

Copy link
Copy Markdown

PR Description

Summary

Fixes #470. Completes the build system migration started in #418 (scikit-build-core + CMake) and #458 (version.py as single source of truth) by removing all remaining legacy tooling and updating the documentation to match the modern workflow.

Problem

PR #418 migrated the build system to scikit-build-core + CMake, but the legacy 505-line setup.py remained in the repository alongside several files that still referenced outdated tooling:

  • setup.py — dead code; scikit-build-core handles the build entirely
  • scripts/ccache_g++ / scripts/ccache_clang++ — obsolete wrapper scripts; CMakeLists.txt already detects and wires up ccache natively via find_program(CCACHE_PROGRAM ccache)
  • tox.ini — referenced black and flake8, which have been replaced by ruff in CI
  • CONTRIBUTING.md — documented the old setup.py workflow, ccache wrapper scripts, and a --no-setup-py flag that no longer exists in pybind11-stubgen

Solution

  1. Deleted setup.py (505 lines) — confirmed no remaining code references it.
  2. Deleted scripts/ccache_g++ and scripts/ccache_clang++ — CMake handles ccache natively; CI configures ccache via CC/CXX env vars.
  3. Made pedalboard/version.py the single source of truth for versioning — removed the hardcoded version = "0.9.24" from pyproject.toml, added dynamic = ["version"], and wired up a [[tool.dynamic-metadata]] block using scikit-build-core's built-in regex provider pointed at version.py. No new dependencies required.
  4. Modernized tox.ini — replaced the dead black/flake8/format envs with ruff envs that mirror the CI checks in .github/workflows/all.yml (ruff check pedalboard, ruff format --check pedalboard --diff), and removed the obsolete [flake8] config section.
  5. Updated CONTRIBUTING.md — replaced python3 setup.py build develop with pip install -e . --config-settings=cmake.build-type=Debug, simplified the ccache docs to reflect automatic detection, fixed the setup.py reference to point at CMakeLists.txt, and dropped the removed --no-setup-py flag.

Result

  • Version bumps are now a one-line change in pedalboard/version.py
  • Local and CI builds use the same scikit-build-core + CMake path
  • Documentation and tox config no longer reference removed tooling
  • 564 lines of dead/legacy code removed (505 in setup.py alone)

Verification

  • pyproject.toml parses as valid TOML
  • The [[tool.dynamic-metadata]] entry resolves to the correct version (0.9.24) from version.py using scikit-build-core's metadata resolution
  • Ruff commands match CI's lint job byte-for-byte

References

Removes the legacy 505-line setup.py now that the project builds with
scikit-build-core and CMake, and makes pedalboard/version.py the single
source of truth for versioning via dynamic-metadata.

Also updates tox.ini to use ruff instead of black/flake8, removes the
obsolete ccache wrapper scripts (CMake handles ccache natively), and
updates CONTRIBUTING.md to reflect the CMake-based build workflow.
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.

build: Complete removal of legacy setup.py and modernize build instructions

1 participant