Skip to content

Commit aacb150

Browse files
committed
add setuptools-scm into pyproject.toml
with this change, we version string of the driver would alway follow the git tag it would add extra information if it's development branch without a tag like git sha and date of the build Ref: https://setuptools-scm.readthedocs.io/
1 parent f36dbf2 commit aacb150

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

cassandra/__init__.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from enum import Enum
1616
import logging
17-
17+
from cassandra._version import __version__, __version_tuple__ as __version_info__
1818

1919
class NullHandler(logging.Handler):
2020

@@ -23,9 +23,6 @@ def emit(self, record):
2323

2424
logging.getLogger('cassandra').addHandler(NullHandler())
2525

26-
__version_info__ = (3, 28, 2)
27-
__version__ = '.'.join(map(str, __version_info__))
28-
2926

3027
class ConsistencyLevel(object):
3128
"""

pyproject.toml

+6-1
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,17 @@ readme = {file = "README.rst", content-type = "text/x-rst"}
7474

7575
[build-system]
7676
requires = [
77-
"setuptools>=42",
77+
"setuptools>=64",
7878
"Cython",
79+
"setuptools_scm>=8"
7980
]
8081

8182
build-backend = "setuptools.build_meta"
8283

84+
[tool.setuptools_scm]
85+
version_file = "cassandra/_version.py"
86+
tag_regex = '(?P<version>\d*?\.\d*?\.\d*?)-scylla'
87+
8388
#### CI BUILDWHEEL CONFIG ####
8489

8590
[tool.cibuildwheel]

0 commit comments

Comments
 (0)