Added scm version tracking
This commit is contained in:
@ -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
|
# these items point to the OCC implementation
|
||||||
from .occ_impl.geom import Plane, BoundBox, Vector, Matrix, Location
|
from .occ_impl.geom import Plane, BoundBox, Vector, Matrix, Location
|
||||||
from .occ_impl.shapes import (
|
from .occ_impl.shapes import (
|
||||||
|
|||||||
4
setup.py
4
setup.py
@ -41,7 +41,8 @@ if not is_rtd and not is_appveyor:
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="cadquery",
|
name="cadquery",
|
||||||
version=version,
|
# version=version,
|
||||||
|
use_scm_version=True,
|
||||||
url="https://github.com/CadQuery/cadquery",
|
url="https://github.com/CadQuery/cadquery",
|
||||||
license="Apache Public License 2.0",
|
license="Apache Public License 2.0",
|
||||||
author="David Cowden",
|
author="David Cowden",
|
||||||
@ -50,6 +51,7 @@ setup(
|
|||||||
long_description=open("README.md").read(),
|
long_description=open("README.md").read(),
|
||||||
packages=find_packages(exclude=("tests",)),
|
packages=find_packages(exclude=("tests",)),
|
||||||
python_requires=">=3.8,<3.11",
|
python_requires=">=3.8,<3.11",
|
||||||
|
setup_requires=["setuptools_scm"],
|
||||||
install_requires=reqs,
|
install_requires=reqs,
|
||||||
extras_require={
|
extras_require={
|
||||||
"dev": ["docutils", "ipython", "pytest", "black==19.10b0", "click==8.0.4",],
|
"dev": ["docutils", "ipython", "pytest", "black==19.10b0", "click==8.0.4",],
|
||||||
|
|||||||
Reference in New Issue
Block a user