Skip to content

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

Open
boolangery wants to merge 2 commits into
masterfrom
fix/modern-python-build
Open

fix: replace distutils with setuptools, modernize Python support#5
boolangery wants to merge 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.
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