-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from dihm/metadata_overhaul
Metadata overhaul
- Loading branch information
Showing
5 changed files
with
83 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
import os | ||
from pathlib import Path | ||
|
||
try: | ||
import importlib.metadata as importlib_metadata | ||
except ImportError: | ||
import importlib_metadata | ||
|
||
VERSION_SCHEME = { | ||
"version_scheme": os.getenv("SCM_VERSION_SCHEME", "release-branch-semver"), | ||
"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) | ||
try: | ||
from setuptools_scm import get_version | ||
VERSION_SCHEME = { | ||
"version_scheme": "release-branch-semver", | ||
"local_scheme": "node-and-date", | ||
} | ||
scm_version = get_version(root, **VERSION_SCHEME) | ||
except ImportError: | ||
scm_version = None | ||
else: | ||
scm_version = None | ||
|
||
if scm_version is not None: | ||
__version__ = scm_version | ||
else: | ||
try: | ||
__version__ = importlib_metadata.version(__package__) | ||
except importlib_metadata.PackageNotFoundError: | ||
__version__ = None | ||
__version__ = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,71 @@ | |
requires = ["setuptools>=64", "wheel", "setuptools_scm>=8"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] | ||
[tool.setuptools_scm] | ||
version_scheme = "release-branch-semver" | ||
local_scheme = "no-local-version" | ||
|
||
[tool.setuptools] | ||
zip-safe = false | ||
include-package-data = true | ||
packages = [ | ||
"labscript_utils", | ||
"labscript_profile", | ||
] | ||
|
||
[tool.setuptools.package-data] | ||
labscript_profile = ["../labscript-suite.pth"] | ||
|
||
[project] | ||
name = "labscript-utils" | ||
description = "Shared utilities for the labscript suite" | ||
authors = [ | ||
{name = "The labscript suite community", email = "[email protected]"}, | ||
] | ||
keywords = ["experiment control", "automation"] | ||
license = {file = 'LICENSE.txt'} | ||
classifiers = [ | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
] | ||
requires-python = ">=3.6" | ||
dependencies = [ | ||
"importlib_metadata>=1.0", | ||
"h5py>=2.9", | ||
"numpy>=1.15", | ||
"packaging>=20.4", | ||
"pyqtgraph>=0.11.0rc0", | ||
"qtutils>=2.2.3", | ||
"scipy", | ||
"setuptools_scm>=4.1.0", | ||
"zprocess>=2.18.0", | ||
] | ||
dynamic = ["version"] | ||
|
||
[project.readme] | ||
file = "README.md" | ||
content-type = "text/markdown" | ||
|
||
[project.urls] | ||
Homepage = "http://labscriptsuite.org/" | ||
Documentation = "https://docs.labscriptsuite.org/" | ||
Repository = "https://github.com/labscript-suite/labscript-utils/" | ||
Downloads = "https://github.com/labscript-suite/labscript-utils/releases/" | ||
Tracker = "https://github.com/labscript-suite/labscript-utils/issues/" | ||
|
||
[project.optional-dependencies] | ||
docs = [ | ||
"PyQt5", | ||
"Sphinx==7.2.6", | ||
"sphinx-rtd-theme==2.0.0", | ||
"myst_parser==2.0.0", | ||
] | ||
|
||
[project.scripts] | ||
labscript-profile-create = "labscript_profile.create:create_profile" |