Skip to content

Commit fc5a27f

Browse files
committed
Use datajoint/_version.py written by setuptools_scm
1 parent 0812fe1 commit fc5a27f

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jupyter_custom.js
2626
.eggs
2727
*.code-workspace
2828
docs/site
29+
datajoint/_version.py
2930

3031

3132
!.vscode/settings.json

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ USER root
1919
RUN \
2020
chown -R ${HOST_UID:-1000}:mambauser /main && \
2121
chown -R ${HOST_UID:-1000}:mambauser /src && \
22-
micromamba run -n base pip install -q --no-cache-dir /main && \
22+
${CONDA_BIN} run -n base pip install -q --no-cache-dir /main && \
2323
rm -r /main/*
2424
USER ${MAMBA_USER}

datajoint/version.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
__version__ = "0.14.3"
1+
try:
2+
# Use datajoint/_version.py written by setuptools_scm if it exists
3+
# This module is not tracked in VCS and defines a __version_tuple__ like
4+
# (0, 14, 3, 'dev224', 'g0812fe17.d20240919')
5+
from ._version import __version_tuple__ as version_tuple
6+
except ImportError:
7+
version_tuple = (0, 14, 3)
8+
9+
__version__ = ".".join(str(x) for x in version_tuple[:3])
210

311
assert len(__version__) <= 10 # The log table limits version to the 10 characters

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ datajoint = "datajoint.cli:cli"
6363
[tool.setuptools]
6464
packages = ["datajoint"]
6565

66+
[tool.setuptools_scm]
67+
version_file = "datajoint/_version.py"
68+
6669
[build-system]
6770
requires = [
6871
"setuptools>=60",

0 commit comments

Comments
 (0)