Skip to content

Commit d14630c

Browse files
committed
don't generate _version.py
use pkg metadata when installed from PyPI. CirPy bundles can now adjust `__version__` accordingly because it isn't indented in src. also add a dummy setup.py for older versions of pip/python
1 parent 9b62f43 commit d14630c

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ __pycache__
3333
*.pyc
3434
build/
3535
dist/
36-
_version.py
3736

3837
# Sphinx build-specific files
3938
_build

circuitpython_homie/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@
2222
from adafruit_minimqtt.adafruit_minimqtt import MQTT, MMQTTException # type: ignore
2323

2424

25-
try:
26-
from ._version import __version__ # type: ignore
27-
except ImportError:
28-
__version__ = "0.0.0+auto.0"
29-
25+
__version__ = "0.0.0+auto.0"
3026
__repo__ = "https://github.com/2bndy5/CircuitPython_Homie.git"
3127

3228
DEVICE_STATES = [

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ version_scheme= "no-guess-dev"
5555
# Test PyPI does not support local versions.
5656
local_scheme = "no-local-version"
5757
fallback_version = "0.0.0"
58-
write_to = "circuitpython_homie/_version.py"
5958

6059
[tool.pytest.ini_options]
6160
minversion = "6.0"

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""All install info now exists in pyproject.toml"""
2+
from setuptools import setup
3+
4+
setup()

0 commit comments

Comments
 (0)