Skip to content

Commit

Permalink
back to setting version string by hand
Browse files Browse the repository at this point in the history
  • Loading branch information
newville committed Jan 5, 2025
1 parent fcd2b4a commit 6502fe4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ poster/*.pdf
python/dist/
python/*.egg-info/
python/build
python/xraydb/version.py
python/tests/.coverage
python/tests/htmlcov
python/tests/.ipynb_checkpoints
Expand Down
21 changes: 13 additions & 8 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
##
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=6.2"]
requires = ["setuptools>=64"]
build-backend = "setuptools.build_meta"

# note: this is needed, since the SCM root is '..'
[tool.setuptools_scm]
root = ".."
write_to = "python/xraydb/version.py"
version_scheme = "post-release"
# note: using setuptools_scm does not work
# as this library is not at the top of the SCM directory
# trying this: is needed, since the SCM root is '..'
# [tool.setuptools_scm]
# root = ".."
# write_to = "python/xraydb/version.py"
# version_scheme = "post-release"
# fails to build a wheel, and even uploading the tarball
# leaves `pip install xraydb` from PyPI to fail


[tool.setuptools.packages.find]
include = ["xraydb"]
Expand All @@ -20,7 +25,7 @@ addopts = "--cov=xraydb --cov-report html"

[project]
name = "xraydb"
dynamic = ["version"]
version = "4.5.6"
requires-python = ">= 3.9"
description = "calculations with XrayDB: reference data for X-ray interactions with matter"
readme = "README.md"
Expand Down Expand Up @@ -50,7 +55,7 @@ dependencies = [

[project.urls]
Homepage = " https://github.com/xraypy/XrayDB"
Documentation = "https://xraydb.github.io/XrayDB/"
Documentation = "https://xraypy.github.io/XrayDB/"
Tracker = "https://github.com/xraypy/XrayDB/issues"

[project.optional-dependencies]
Expand Down
5 changes: 5 additions & 0 deletions python/xraydb/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""
Version data - entered by hand ;(
"""
__version__ = version = '4.5.6'
__version_tuple__ = version_tuple = (4, 5, 6)

0 comments on commit 6502fe4

Please sign in to comment.