Skip to content

Drop setup.py, move metadata to pyproject.toml - #28

Closed
lidaobing wants to merge 1 commit into
masterfrom
fix
Closed

lidaobing wants to merge 1 commit into
masterfrom
fix

Conversation

@lidaobing

Copy link
Copy Markdown
Owner

Fixes python3 setup.py failing with ModuleNotFoundError: No module named 'setuptools' (modern Python no longer ships setuptools).

  • Migrates all metadata to PEP 621 [project] in pyproject.toml
  • Version stays dynamic: version = { attr = "lunardate.__version__" }, single source of truth in lunardate.py
  • Removes setup.py; builds use pip install . / python -m build with build isolation

Verified locally (Python 3.15, no setuptools installed):

  • pip wheel . builds lunardate-0.3.1-py3-none-any.whl with correct metadata (License-Expression GPL-3.0-or-later, README long description, classifiers)
  • python3 lunardate.py -v: 76 passed

python3 setup.py failed with ModuleNotFoundError: setuptools because
modern Pythons no longer bundle it. With PEP 621 metadata, builds go
through pip/build which install setuptools in an isolated env, so
running setup.py directly is no longer needed.
@lidaobing lidaobing closed this Nov 22, 2026
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