Open
Conversation
- Replace deprecated distutils imports with setuptools equivalents - Use setuptools.command.build_ext instead of distutils.command.build_ext - Replace compiler type classes with string-based detection - Update sarge dependency to flexible version (>=0.1.5) - Add fallback for versioneer import errors - Tested successfully on Python 3.11.2 with OctoPrint 1.11.4 Fixes compatibility issues with Python 3.11+ where distutils module was removed from the standard library.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Purpose
Add support for Python 3.11 and 3.12 to ensure Octolapse works with modern OctoPrint installations.
🔧 Changes
setup.pyto include Python 3.11 and 3.12 in supported versions✅ Testing
📌 Related Issues
Resolves compatibility issues preventing installation on Python 3.11+
💡 Notes
This PR ensures Octolapse can be installed on systems running newer Python versions while maintaining support for legacy systems.
Note
Refactors setup.py to standard setuptools with versioneer fallback, platform-specific C++14 flags, dynamic requirements/package data, Python 3.11 classifiers, and updated C++ extension sources/paths.
setuptools.setup(...)(replace OctoPrint-specific setup helpers) and integratecmdclasswith custombuild_ext.requirements.txtviaget_requirementsand gather package data viapackage_data_dirs.DEBUG_chardetandIS_PYTHON_EXTENSION.octoprint_octolapse.gcode_parserand move sources tooctoprint_octolapse/*.cppfiles.entry_pointsforoctoprint.pluginand explicitly list packages includingoctoprint_octolapse_setuptools.Written by Cursor Bugbot for commit 2639e52. This will update automatically on new commits. Configure here.