Skip to content

Commit 7abf829

Browse files
daniel-wernormanrz
andauthored
Fix wkcuber --version (#494)
* fix wkcuber --version * include version.py * fix placing version.py Co-authored-by: Norman Rzepka <[email protected]>
1 parent 7ac691d commit 7abf829

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

publish.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ for PKG in */pyproject.toml; do
1515
cp pyproject.toml pyproject.toml.bak
1616
PKG_VERSION="$(dunamai from git)"
1717

18+
echo "__version__ = '$PKG_VERSION'" > ./"$PKG"/version.py
19+
1820
poetry version "$PKG_VERSION"
1921
# replace all relative path dependencies with the current version:
2022
sed -i 's/\(.*\) = .* path \= \"\.\..*/\1 = "'"$PKG_VERSION"'"/g' pyproject.toml
2123
poetry publish --build -u "$PYPI_USERNAME" -p "$PYPI_PASSWORD"
2224

23-
echo "__version__ = '$PKG_VERSION'" > ./"$PKG"/version.py
24-
2525
# Restore files
2626
mv pyproject.toml.bak pyproject.toml
2727

webknossos/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ readme = "README.md"
77
license = "AGPL-3.0"
88
repository = "https://github.com/scalableminds/webknossos-libs"
99
homepage = "https://docs.webknossos.org"
10+
include = ["webknossos/version.py"]
1011

1112
[tool.poetry.dependencies]
1213
python = "^3.7,>=3.7.1"

wkcuber/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
[tool.poetry]
22
name = "wkcuber"
3-
version = "0.0.0" # filled by setuptools-scm
3+
version = "0.0.0" # filled by dunamai
44
description = "Python package to create, cube, and work with webKnossos WKW datasets"
55
authors = ["scalable minds <[email protected]>"]
66
readme = "README.md"
77
license = "AGPL-3.0"
8+
include = ["wkcuber/version.py"]
89

910
[tool.poetry.dependencies]
1011
python = "^3.7"

wkcuber/wkcuber/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from typing import List, Dict
22

3-
from versioning import get_available_version
43
from wkcuber import downsample_mags
54
from .compress import compress_mag_inplace
65
from .metadata import refresh_metadata
@@ -15,6 +14,7 @@
1514
create_parser as create_conversion_parser,
1615
main as auto_detect_and_run_conversion,
1716
)
17+
from .versioning import get_available_version
1818
from argparse import Namespace, ArgumentParser
1919
from pathlib import Path
2020

File renamed without changes.

0 commit comments

Comments
 (0)