Skip to content

Commit

Permalink
pip: use setuptools scm instead of hand crafted version numbers
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Scherf <[email protected]>
  • Loading branch information
fscherf committed Jul 20, 2024
1 parent 9aa1774 commit 8ea2807
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ tags
[._]*.un~

# End of https://www.toptal.com/developers/gitignore/api/python,vim,emacs,eclipse
/milan/_version.py
/envs/
/artifacts/
/playwright-video/*
Expand Down
5 changes: 3 additions & 2 deletions milan/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import logging

from milan.frontend.commands import FrontendError # NOQA
from milan._version import version_tuple, version
from milan.chromium import Chromium # NOQA
from milan.firefox import Firefox # NOQA
from milan.webkit import Webkit # NOQA
from milan.errors import * # NOQA

VERSION = (0, 0, 0)
VERSION_STRING = '.'.join(str(i) for i in VERSION)
VERSION = version_tuple
VERSION_STRING = version

BROWSER = {
'chromium': Chromium,
Expand Down
10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[build-system]
requires = ["setuptools>=61.0"]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"


[project]
version = "0.0.0"
name = "milan"

description = "Browser testing and capturing tool"
readme = "README.md"
dynamic = ["version"]
requires-python = ">=3.8"

dependencies = [
Expand Down Expand Up @@ -67,3 +68,6 @@ include = ["milan*"]
"*.swp",
"*.pyc",
]

[tool.setuptools_scm]
version_file = "milan/_version.py"

0 comments on commit 8ea2807

Please sign in to comment.