Skip to content

Conversation

@Valley-15
Copy link

@Valley-15 Valley-15 commented Feb 2, 2026

Description

This PR resolves the ModuleNotFoundError: No module named 'distutils' error reported in #490.

Python 3.12+ has officially removed the distutils module. Since the Wiki app now targets modern Python versions (verified on Python 3.13), we need to explicitly include setuptools in our dependencies. setuptools provides the necessary distutils shim required for the build process to complete successfully.

Key Changes

  • Added setuptools to the dependencies list in pyproject.toml.

Automated Tests

  • Verified the fix by running bench build --app wiki on a local environment using Python 3.13.11. The build now completes successfully without crashing.

Closes #490

Summary by CodeRabbit

  • Chores
    • Extended Python compatibility to support Python 3.13 and later (previously required 3.14+).
    • Added/updated project dependency: setuptools >= 75.7.0.

@coderabbitai
Copy link

coderabbitai bot commented Feb 2, 2026

Walkthrough

The pyproject.toml file was changed: requires-python in [project] was updated from ">=3.14" to ">=3.13", and the [project].dependencies list gained "setuptools>=75.7.0". These edits total two additions and one deletion to the configuration.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: adding setuptools as a dependency to resolve the distutils error.
Linked Issues check ✅ Passed The PR directly addresses issue #490 by adding setuptools to resolve the missing distutils error reported during builds on Python 3.12+.
Out of Scope Changes check ✅ Passed All changes are in scope: Python requirement adjusted from 3.14 to 3.13, and setuptools dependency added to fix the distutils error per issue #490.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@pyproject.toml`:
- Around line 10-13: The pyproject.toml's project dependencies list currently
pins "setuptools" without a version constraint; change the "setuptools" entry in
the [project].dependencies array to "setuptools>=75.7.0" so runtime installs
include the version that supports the Python 3.13 distutils shim; update the
dependency string for "setuptools" (alongside existing "mistune>=3.0") to add
this minimum version constraint.

@MohammedNoureldin
Copy link

If I am not mistaken it was somewhere mentioned officially that Frappe 16 needs Python 3.14, meaning IMO it makes sense to use 3.14 here.

Who can review this? As the App is currently broken because of this in Frappe 16

@Valley-15
Copy link
Author

Valley-15 commented Feb 4, 2026

Thanks for pointing that out @MohammedNoureldin! I kept it at 3.13 for now because that’s the latest stable release and the distutils fix is working properly there. Since 3.14 is still in pre-alpha, making it a strict requirement might just block users who aren't on experimental versions yet.

@NagariaHussain, what do you say? Should we keep it at 3.13 so everyone can use it, or do you want to change it to 3.14 to match Frappe 16?

@MohammedNoureldin
Copy link

MohammedNoureldin commented Feb 4, 2026

Maybe I am missing something, but for me the latest Python stable (not alpha) version is 3.14.3, if I am not mistaken I would use it.

We still need someone to approve the PR and merge it back.

@MohammedNoureldin
Copy link

FYI, I have just tested the new beta release: v3.0.0-beta.1, and I was able to create custom image with wiki app.

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.

No module named 'distutils'

2 participants