Skip to content

pybind: add pyproject.toml to fix ReadTheDocs builds with pip 25.3+ - #66966

Merged
tchaikov merged 1 commit into
ceph:mainfrom
tchaikov:wip-pybind-build-failure
Jan 29, 2026
Merged

tchaikov merged 1 commit into
ceph:mainfrom
tchaikov:wip-pybind-build-failure

Conversation

@tchaikov

@tchaikov tchaikov commented Jan 19, 2026 •

Copy link
Copy Markdown
Contributor

ReadTheDocs builds started failing when pip 25.3 began enforcing PEP 517 build isolation. Under build isolation, pip creates a clean temporary environment to build packages. Without pyproject.toml declaring build dependencies, Cython is not available in this isolated environment, causing builds to fail.

Error from failing builds:
  Processing ./src/pybind/rados
    Getting requirements to build wheel: finished with status 'error'
    × Getting requirements to build wheel did not run successfully.
    │ exit code: 1
    ╰─> [2 lines of output]
        ERROR: Cannot find Cythonized file rados.c
        WARNING: Cython is not installed.

pip 25.3 removed the --no-use-pep517 option and no longer calls setup.py bdist_wheel, enforcing PEP 517 build isolation by default. Without pyproject.toml, pip cannot install Cython in the isolated build environment, preventing the generation of .c files from .pyx sources during the build.

This commit adds pyproject.toml to all four pybind modules (rados, cephfs, rbd, rgw) declaring Cython as a build dependency. This ensures Cython is available in pip 25.3's isolated build environment, allowing the build to proceed successfully.

How it works:
ReadTheDocs builds pybind modules by running:
pip install -r admin/doc-pybind.txt

This file lists local directory paths:
src/pybind/rados
src/pybind/cephfs
src/pybind/rbd
src/pybind/rgw

When pip processes each local directory, it automatically:

  1. Looks for pyproject.toml in that directory (per PEP 517/518)
  2. Reads the [build-system] section
  3. Installs the dependencies listed in "requires" into an isolated build environment
  4. Invokes the build backend (setup.py via setuptools.build_meta)

With pyproject.toml present, Cython is now installed in step 3,
making it available when setup.py runs in step 4.

References:

Fixes: ReadTheDocs build failures with pip 25.3+

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@tchaikov
tchaikov requested a review from a team as a code owner January 19, 2026 11:32
@github-actions github-actions Bot added cephfs Ceph File System pybind rbd labels Jan 19, 2026
@tchaikov

Copy link
Copy Markdown
Contributor Author

@tchaikov
tchaikov force-pushed the wip-pybind-build-failure branch from b5f7099 to bbb5b91 Compare January 19, 2026 11:35
@tchaikov tchaikov mentioned this pull request Jan 19, 2026
3 of 14 tasks
@tchaikov

Copy link
Copy Markdown
Contributor Author

jenkins test api

Comment thread src/pybind/rbd/pyproject.toml Resolved
ReadTheDocs builds started failing when pip 25.3 began enforcing PEP 517
build isolation. Under build isolation, pip creates a clean temporary
environment to build packages. Without pyproject.toml declaring build
dependencies, Cython is not available in this isolated environment,
causing builds to fail.

Error from failing builds:
  Processing ./src/pybind/rados
    Getting requirements to build wheel: finished with status 'error'
    × Getting requirements to build wheel did not run successfully.
    │ exit code: 1
    ╰─> [2 lines of output]
        ERROR: Cannot find Cythonized file rados.c
        WARNING: Cython is not installed.

pip 25.3 removed the --no-use-pep517 option and no longer calls
setup.py bdist_wheel, enforcing PEP 517 build isolation by default.
Without pyproject.toml, pip cannot install Cython in the isolated
build environment, preventing the generation of .c files from .pyx
sources during the build.

This commit adds pyproject.toml to all four pybind modules (rados,
cephfs, rbd, rgw) declaring Cython>=0.29 as a build dependency. This
ensures Cython is available in pip 25.3's isolated build environment,
allowing the build to proceed successfully.

How it works:
  ReadTheDocs builds pybind modules by running:
    pip install -r admin/doc-pybind.txt

  This file lists local directory paths:
    src/pybind/rados
    src/pybind/cephfs
    src/pybind/rbd
    src/pybind/rgw

  When pip processes each local directory, it automatically:
  1. Looks for pyproject.toml in that directory (per PEP 517/518)
  2. Reads the [build-system] section
  3. Installs the dependencies listed in "requires" into an isolated
     build environment
  4. Invokes the build backend (setup.py via setuptools.build_meta)

  With pyproject.toml present, Cython is now installed in step 3,
  making it available when setup.py runs in step 4.

References:
- pip 25.3 Changelog: https://pip.pypa.io/en/stable/news/
- pip Issue: pypa/pip#6334
- PEP 517 (Build System Interface): https://peps.python.org/pep-0517/
- PEP 518 (Build System Requirements): https://peps.python.org/pep-0518/

Signed-off-by: Kefu Chai <[email protected]>
@tchaikov
tchaikov force-pushed the wip-pybind-build-failure branch from bbb5b91 to 7dd00ca Compare January 22, 2026 06:13

@idryomov idryomov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack from the RBD perspective

@idryomov
idryomov requested review from a team January 22, 2026 09:13
@afreen23

Copy link
Copy Markdown
Contributor

Are the doc failures here #67003 related @tchaikov ?

@ljflores

Copy link
Copy Markdown
Member

jenkins test api

@tchaikov

Copy link
Copy Markdown
Contributor Author

Are the doc failures here #67003 related @tchaikov ?

@afreen23 Yes, it appears to be the same issue. The doc build failure in #67003 shows the same symptoms I've been observing recently.

@tchaikov

This comment was marked as resolved.

@tchaikov
tchaikov marked this pull request as draft January 28, 2026 04:36
@tchaikov tchaikov removed the needs-qa label Jan 28, 2026
@tchaikov
tchaikov marked this pull request as ready for review January 29, 2026 23:00
@tchaikov

Copy link
Copy Markdown
Contributor Author

@tchaikov
tchaikov merged commit 3f935e0 into ceph:main Jan 29, 2026
@tchaikov
tchaikov deleted the wip-pybind-build-failure branch January 29, 2026 23:01
@bluikko

bluikko commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

Tracker issue for this was in https://tracker.ceph.com/issues/73645

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants