Skip to content

Commit a092f22

Browse files
authored
Merge pull request #116 from dihm/pyproject_overhaul
Project Metadata overhaul
2 parents 7067a77 + 14596db commit a092f22

File tree

5 files changed

+80
-70
lines changed

5 files changed

+80
-70
lines changed

.github/workflows/release.yml

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111

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

1716
# Configuration for a package with compiled extensions:

pyproject.toml

+66-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,69 @@
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 = "runmanager"
19+
description = "Graphical control of parameterised experiments composed in labscript"
20+
authors = [
21+
{name = "The labscript suite community", email = "labscriptsuite@googlegroups.com"},
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+
"desktop-app>=0.1.2",
38+
"importlib_metadata",
39+
"labscript>=3.0.0",
40+
"labscript_utils>=3.3.0",
41+
"pandas>=0.13",
42+
"qtutils>=2.2.2",
43+
"matplotlib",
44+
]
45+
dynamic = ["version"]
46+
47+
[project.readme]
48+
file = "README.md"
49+
content-type = "text/markdown"
50+
51+
[project.urls]
52+
Homepage = "http://labscriptsuite.org/"
53+
Documentation = "https://docs.labscriptsuite.org/"
54+
Repository = "https://github.com/labscript-suite/runmanager/"
55+
Downloads = "https://github.com/labscript-suite/runmanager/releases/"
56+
Tracker = "https://github.com/labscript-suite/runmanager/issues/"
57+
58+
[project.optional-dependencies]
59+
docs = [
60+
"PyQt5",
61+
"Sphinx==7.2.6",
62+
"sphinx-rtd-theme==2.0.0",
63+
"myst_parser==2.0.0",
64+
]
65+
66+
[project.scripts]
67+
runmanager = "desktop_app:entry_point"
68+
69+
[project.gui-scripts]
70+
runmanger-gui = "desktop_app:entry_point"

runmanager/__version__.py

+14-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
1-
import os
21
from pathlib import Path
32
try:
43
import importlib.metadata as importlib_metadata
54
except ImportError:
65
import importlib_metadata
76

8-
VERSION_SCHEME = {
9-
"version_scheme": os.getenv("SCM_VERSION_SCHEME", "release-branch-semver"),
10-
"local_scheme": os.getenv("SCM_LOCAL_SCHEME", "node-and-date"),
11-
}
12-
137
root = Path(__file__).parent.parent
148
if (root / '.git').is_dir():
15-
from setuptools_scm import get_version
16-
__version__ = get_version(root, **VERSION_SCHEME)
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
1723
else:
1824
try:
1925
__version__ = importlib_metadata.version(__package__)

setup.cfg

-51
This file was deleted.

setup.py

-9
This file was deleted.

0 commit comments

Comments
 (0)