Skip to content

Commit 09ef38f

Browse files
committed
Use setuptools_scm to manage version for gdbmongo package.
1 parent c73a409 commit 09ef38f

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

gdbmongo/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_version.py

gdbmongo/__init__.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
###
2+
# Copyright 2022-present MongoDB, Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
###
16+
"""The gdbmongo package contains GDB pretty printers and commands for debugging the MongoDB Server.
17+
Its primary target audience is MongoDB employees.
18+
"""
19+
20+
try:
21+
from gdbmongo._version import version as __version__
22+
except ImportError:
23+
# The package is not installed so we don't bother giving it a version number.
24+
__version__ = None

pyproject.toml

+7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
[build-system]
22
requires = [
33
"setuptools >= 45.1.0",
4+
"setuptools_scm[toml] >= 6.3.2",
45
"wheel >= 0.36.0"
56
]
67
build-backend = "setuptools.build_meta"
78

9+
[tool.setuptools_scm]
10+
write_to = "gdbmongo/_version.py"
11+
812
[tool.pylint]
913

14+
[tool.pylint.basic]
15+
ignore = "_version.py"
16+
1017
[tool.pylint.similarities]
1118
min-similarity-lines = 6
1219

0 commit comments

Comments
 (0)