Skip to content

Commit e46630a

Browse files
committed
Moves all metadata to pyproject.toml,
updates setuptools-scm settings
1 parent 0945101 commit e46630a

File tree

5 files changed

+82
-70
lines changed

5 files changed

+82
-70
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111

1212
env:
1313
PACKAGE_NAME: labscript-devices
14-
SCM_LOCAL_SCHEME: no-local-version
1514
ANACONDA_USER: labscript-suite
1615

1716
# Configuration for a package with compiled extensions:

labscript_devices/__version__.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import os
21
from pathlib import Path
32
try:
43
import importlib.metadata as importlib_metadata
@@ -7,12 +6,20 @@
76

87
root = Path(__file__).parent.parent
98
if (root / '.git').is_dir():
10-
from setuptools_scm import get_version
11-
__version__ = get_version(
12-
root,
13-
version_scheme=os.getenv("SCM_VERSION_SCHEME", "release-branch-semver"),
14-
local_scheme=os.getenv("SCM_LOCAL_SCHEME", "node-and-date"),
15-
)
9+
try:
10+
from setuptools_scm import get_version
11+
VERSION_SCHEME = {
12+
"version_scheme": "release-branch-semver",
13+
"local_scheme": "node-and-date",
14+
}
15+
scm_version = get_version(root, **VERSION_SCHEME)
16+
except ImportError:
17+
scm_version = None
18+
else:
19+
scm_version = None
20+
21+
if scm_version is not None:
22+
__version__ = scm_version
1623
else:
1724
try:
1825
__version__ = importlib_metadata.version(__package__)

pyproject.toml

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,71 @@
22
requires = ["setuptools>=64", "wheel", "setuptools_scm>=8"]
33
build-backend = "setuptools.build_meta"
44

5-
[tool.setuptools_scm]
5+
[tool.setuptools_scm]
6+
version_scheme = "release-branch-semver"
7+
local_scheme = "no-local-version"
8+
9+
[tool.setuptools]
10+
zip-safe = false
11+
include-package-data = true
12+
13+
[tool.setuptools.packages]
14+
find = {namespaces = false}
15+
16+
17+
[project]
18+
name = "labscript-devices"
19+
description = "Device drivers for hardware controlled by the labscript suite"
20+
authors = [
21+
{name = "The labscript suite community", email = "[email protected]"},
22+
]
23+
keywords = ["experiment control", "automation"]
24+
license = {file = 'LICENSE.txt'}
25+
classifiers = [
26+
"License :: OSI Approved :: BSD License",
27+
"Programming Language :: Python :: 3 :: Only",
28+
"Programming Language :: Python :: 3.6",
29+
"Programming Language :: Python :: 3.7",
30+
"Programming Language :: Python :: 3.8",
31+
"Programming Language :: Python :: 3.9",
32+
"Programming Language :: Python :: 3.10",
33+
"Programming Language :: Python :: 3.11",
34+
]
35+
requires-python = ">=3.6"
36+
dependencies = [
37+
"blacs>=3.0.0",
38+
"runmanager>=3.0.0",
39+
"importlib_metadata",
40+
"labscript>=3.0.0",
41+
"labscript_utils>=3.0.0",
42+
"numpy>=1.15.1",
43+
"pillow",
44+
"tqdm",
45+
"PyDAQmx",
46+
"PyVISA",
47+
"PyNIVision",
48+
"pyserial",
49+
"qtutils>=2.2.3",
50+
"spinapi",
51+
"zprocess>=2.18.0",
52+
]
53+
dynamic = ["version"]
54+
55+
[project.readme]
56+
file = "README.md"
57+
content-type = "text/markdown"
58+
59+
[project.urls]
60+
Homepage = "http://labscriptsuite.org/"
61+
Documentation = "https://docs.labscriptsuite.org/"
62+
Repository = "https://github.com/labscript-suite/labscript-devices/"
63+
Downloads = "https://github.com/labscript-suite/labscript-devices/releases/"
64+
Tracker = "https://github.com/labscript-suite/labscript-devices/issues/"
65+
66+
[project.optional-dependencies]
67+
docs = [
68+
"PyQt5",
69+
"Sphinx==7.2.6",
70+
"sphinx-rtd-theme==2.0.0",
71+
"myst_parser==2.0.0",
72+
]

setup.cfg

Lines changed: 0 additions & 52 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)