Added scm version tracking

This commit is contained in:
Jeremy Wright
2022-05-20 15:20:06 -04:00
parent ddceab1025
commit 58b28105a9
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,11 @@
from importlib.metadata import version, PackageNotFoundError
try:
version__ = version("cadquery")
except PackageNotFoundError:
# package is not installed
pass
# these items point to the OCC implementation
from .occ_impl.geom import Plane, BoundBox, Vector, Matrix, Location
from .occ_impl.shapes import (

View File

@ -41,7 +41,8 @@ if not is_rtd and not is_appveyor:
setup(
name="cadquery",
version=version,
# version=version,
use_scm_version=True,
url="https://github.com/CadQuery/cadquery",
license="Apache Public License 2.0",
author="David Cowden",
@ -50,6 +51,7 @@ setup(
long_description=open("README.md").read(),
packages=find_packages(exclude=("tests",)),
python_requires=">=3.8,<3.11",
setup_requires=["setuptools_scm"],
install_requires=reqs,
extras_require={
"dev": ["docutils", "ipython", "pytest", "black==19.10b0", "click==8.0.4",],