change versioning to dynamic versions with setuptools-scm
This commit is contained in:
parent
b837501881
commit
66faf9cf33
3 changed files with 27 additions and 4 deletions
|
|
@ -20,4 +20,3 @@ from .import input as input
|
||||||
from .initialization import *
|
from .initialization import *
|
||||||
from .meas_io import *
|
from .meas_io import *
|
||||||
from .find import *
|
from .find import *
|
||||||
from .version import __version__
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
import typer
|
import typer
|
||||||
from corrlib import __app_name__, __version__
|
from corrlib import __app_name__
|
||||||
from .initialization import create
|
from .initialization import create
|
||||||
from .toml import import_tomls, update_project, reimport_project
|
from .toml import import_tomls, update_project, reimport_project
|
||||||
from .find import find_record, list_projects
|
from .find import find_record, list_projects
|
||||||
|
|
@ -8,6 +8,7 @@ from .tools import str2list
|
||||||
from .main import update_aliases
|
from .main import update_aliases
|
||||||
from .meas_io import drop_cache as mio_drop_cache
|
from .meas_io import drop_cache as mio_drop_cache
|
||||||
import os
|
import os
|
||||||
|
from importlib.metadata import version, PackageNotFoundError
|
||||||
|
|
||||||
|
|
||||||
app = typer.Typer()
|
app = typer.Typer()
|
||||||
|
|
@ -15,7 +16,7 @@ app = typer.Typer()
|
||||||
|
|
||||||
def _version_callback(value: bool) -> None:
|
def _version_callback(value: bool) -> None:
|
||||||
if value:
|
if value:
|
||||||
typer.echo(f"{__app_name__} v{__version__}")
|
print(__app_name__, version(__app_name__))
|
||||||
raise typer.Exit()
|
raise typer.Exit()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,30 @@
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["setuptools >= 63.0.0", "wheel"]
|
requires = ["setuptools >= 63.0.0", "wheel", "setuptools-scm"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "corrlib"
|
||||||
|
dynamic = ["version"]
|
||||||
|
dependencies = [
|
||||||
|
"gitpython>=3.1.45",
|
||||||
|
'pyerrors>=2.11.1',
|
||||||
|
'datalad>=1.1.0',
|
||||||
|
'typer>=0.12.5'
|
||||||
|
]
|
||||||
|
description = "Python correlation library"
|
||||||
|
authors = [
|
||||||
|
{ name = 'Justus Kuhlmann', email = 'j_kuhl19@uni-muenster.de'}
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
pcl = "corrlib.cli:app"
|
||||||
|
|
||||||
|
[tool.setuptools.packages.find]
|
||||||
|
include = ["corrlib", "corrlib.*"]
|
||||||
|
|
||||||
|
[tool.setuptools.dynamic]
|
||||||
|
version = { file = "corrlib/version.py" }
|
||||||
|
|
||||||
[tool.ruff.lint]
|
[tool.ruff.lint]
|
||||||
ignore = ["F403"]
|
ignore = ["F403"]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue