Skip to content

Commit

Permalink
add setuptools-scm into pyproject.toml
Browse files Browse the repository at this point in the history
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/
  • Loading branch information
fruch committed Jan 30, 2025
1 parent f36dbf2 commit aacb150
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 1 addition & 4 deletions cassandra/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from enum import Enum
import logging

from cassandra._version import __version__, __version_tuple__ as __version_info__

class NullHandler(logging.Handler):

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

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

__version_info__ = (3, 28, 2)
__version__ = '.'.join(map(str, __version_info__))


class ConsistencyLevel(object):
"""
Expand Down
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,17 @@ readme = {file = "README.rst", content-type = "text/x-rst"}

[build-system]
requires = [
"setuptools>=42",
"setuptools>=64",
"Cython",
"setuptools_scm>=8"
]

build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
version_file = "cassandra/_version.py"
tag_regex = '(?P<version>\d*?\.\d*?\.\d*?)-scylla'

#### CI BUILDWHEEL CONFIG ####

[tool.cibuildwheel]
Expand Down

0 comments on commit aacb150

Please sign in to comment.