Skip to content

Commit 58b2810

Browse files
committed
Added scm version tracking
1 parent ddceab1 commit 58b2810

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

cadquery/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
from importlib.metadata import version, PackageNotFoundError
2+
3+
try:
4+
version__ = version("cadquery")
5+
except PackageNotFoundError:
6+
# package is not installed
7+
pass
8+
19
# these items point to the OCC implementation
210
from .occ_impl.geom import Plane, BoundBox, Vector, Matrix, Location
311
from .occ_impl.shapes import (

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141

4242
setup(
4343
name="cadquery",
44-
version=version,
44+
# version=version,
45+
use_scm_version=True,
4546
url="https://github.com/CadQuery/cadquery",
4647
license="Apache Public License 2.0",
4748
author="David Cowden",
@@ -50,6 +51,7 @@
5051
long_description=open("README.md").read(),
5152
packages=find_packages(exclude=("tests",)),
5253
python_requires=">=3.8,<3.11",
54+
setup_requires=["setuptools_scm"],
5355
install_requires=reqs,
5456
extras_require={
5557
"dev": ["docutils", "ipython", "pytest", "black==19.10b0", "click==8.0.4",],

0 commit comments

Comments
 (0)