Skip to content

fix: replace distutils with setuptools, modernize Python support#5

Merged
boolangery merged 2 commits into
masterfrom
fix/modern-python-build
Jul 20, 2026
Merged

fix: replace distutils with setuptools, modernize Python support#5
boolangery merged 2 commits into
masterfrom
fix/modern-python-build

Conversation

@boolangery

Copy link
Copy Markdown
Owner

Problem

py-lua-style uses distutils which was removed in Python 3.12. This causes import errors:

  • distutils.command.sdist
  • distutils.command.build_ext
  • distutils.cmd.Command

Additionally, the Python version classifiers only listed 3.6 and 3.7, which are long EOL.

Fix

  • Replace distutils imports with setuptools equivalents
  • Update Python version classifiers to 3.8–3.12
  • Add python_requires='>=3.8'
  • Add *.html to .gitignore for Cython annotation files

Testing

  • Cythonize step succeeds
  • Build requires python3-dev system package for C extension compilation (installed on CI)

- Replace distutils imports with setuptools equivalents:
  - distutils.command.sdist → setuptools.command.sdist
  - distutils.command.build_ext → setuptools.command.build_ext
  - distutils.cmd.Command → setuptools.Command
- Update Python version classifiers from 3.6/3.7 to 3.8-3.12
- Add python_requires='>=3.8'

distutils was removed in Python 3.12, causing import errors.
@boolangery
boolangery force-pushed the fix/modern-python-build branch from d80b5cf to cabab50 Compare July 20, 2026 17:02
@boolangery
boolangery merged commit 9d7b938 into master Jul 20, 2026
4 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