Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ defaults:

env:
PACKAGE_NAME: blacs
SCM_VERSION_SCHEME: release-branch-semver
SCM_LOCAL_SCHEME: no-local-version
ANACONDA_USER: labscript-suite

Expand Down
7 changes: 1 addition & 6 deletions blacs/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,10 @@
except ImportError:
import importlib_metadata

VERSION_SCHEME = {
"version_scheme": os.getenv("SCM_VERSION_SCHEME", "guess-next-dev"),
"local_scheme": os.getenv("SCM_LOCAL_SCHEME", "node-and-date"),
}

root = Path(__file__).parent.parent
if (root / '.git').is_dir():
from setuptools_scm import get_version
__version__ = get_version(root, **VERSION_SCHEME)
__version__ = get_version(root, version_scheme="release-branch-semver")
else:
try:
__version__ = importlib_metadata.version(__package__)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = ["setuptools", "wheel", "setuptools_scm"]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=4.1.0"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dihm What's the reason for the toml requirement?

Seems to me that it shouldn't be necessary since setuptools_scm only uses toml to read its configuration from pyproject.toml. Since we still need to set its config in setup.py based on an environment variable, we aren't using that.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, looks like you were probably copying from the recommended usage here: https://pypi.org/project/setuptools-scm/

including the requirement to use setuptools > 42.

I'm going to leave these changes out for simplicity.

build-backend = "setuptools.build_meta"
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ install_requires =
labscript_devices>=3.0.0
labscript_utils>=3.0.0
qtutils>=2.3.2
setuptools_scm>=4.1.0
zprocess>=2.14.1

[options.entry_points]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup

VERSION_SCHEME = {
"version_scheme": os.getenv("SCM_VERSION_SCHEME", "guess-next-dev"),
"version_scheme": os.getenv("SCM_VERSION_SCHEME", "release-branch-semver"),
"local_scheme": os.getenv("SCM_LOCAL_SCHEME", "node-and-date"),
}

Expand Down