Skip to content

Commit 3c13176

Browse files
committed
CASSPYTHON-3 Introduce pyproject.toml to explicitly declare build dependencies
patch by Bret McGuire; reviewed by Bret McGuire and Brad Schoening reference: #1264
1 parent 56713fa commit 3c13176

3 files changed

Lines changed: 117 additions & 382 deletions

File tree

cassandra/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# limitations under the License.
1616

1717
import logging
18-
18+
import importlib.metadata
1919

2020
class NullHandler(logging.Handler):
2121

@@ -24,9 +24,7 @@ def emit(self, record):
2424

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

27-
__version_info__ = (3, 29, 3)
28-
__version__ = '.'.join(map(str, __version_info__))
29-
27+
__version__ = importlib.metadata.version('cassandra-driver')
3028

3129
class ConsistencyLevel(object):
3230
"""

pyproject.toml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
[build-system]
2+
build-backend = "setuptools.build_meta"
3+
requires = ["setuptools", "Cython>=3.0", "tomli"]
4+
5+
[project]
6+
name = "cassandra-driver"
7+
description = "Apache Cassandra Python Driver"
8+
version = "3.30.0"
9+
dependencies = ['geomet>=1.1']
10+
readme = "README.rst"
11+
authors = [{name = "DataStax"}]
12+
license = "Apache-2.0"
13+
license-files = ["LICENSE"]
14+
requires-python = ">= 3.10"
15+
keywords = ["cassandra","cql","orm","dse","graph"]
16+
classifiers = [
17+
"Development Status :: 5 - Production/Stable",
18+
"Intended Audience :: Developers",
19+
"Natural Language :: English",
20+
"Operating System :: OS Independent",
21+
"Programming Language :: Python",
22+
"Programming Language :: Python :: 3.9",
23+
"Programming Language :: Python :: 3.10",
24+
"Programming Language :: Python :: 3.11",
25+
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
27+
"Programming Language :: Python :: Implementation :: CPython",
28+
"Programming Language :: Python :: Implementation :: PyPy",
29+
"Topic :: Software Development :: Libraries :: Python Modules"
30+
]
31+
32+
[project.optional-dependencies]
33+
graph = ["gremlinpython==3.4.6"]
34+
cle = ["cryptography>=42.0"]
35+
test = ["pytest", "PyYAML", "pytz"]
36+
37+
[project.urls]
38+
homepage = "https://github.com/apache/cassandra-python-driver/"
39+
documentation = "https://docs.datastax.com/en/developer/python-driver/latest/"
40+
source = "https://github.com/apache/cassandra-python-driver/"
41+
issues = "https://issues.apache.org/jira/issues/?jql=project%20%3D%20CASSPYTHON%20ORDER%20BY%20key%20DESC"
42+
changelog = "https://github.com/apache/cassandra-python-driver/blob/trunk/CHANGELOG.rst"
43+
44+
[tool.setuptools.packages.find]
45+
include = ['cassandra', 'cassandra.io', 'cassandra.cqlengine', 'cassandra.graph',
46+
'cassandra.datastax', 'cassandra.datastax.insights', 'cassandra.datastax.graph',
47+
'cassandra.datastax.graph.fluent', 'cassandra.datastax.cloud',
48+
"cassandra.column_encryption"]
49+
50+
[tool.cassandra-driver]
51+
build-murmur3-extension = true
52+
build-libev-extension = true
53+
build-cython-extensions = true
54+
libev-includes = []
55+
libev-libs = []
56+
build-concurrency = 0

0 commit comments

Comments
 (0)