Skip to content

Commit

Permalink
Use macros instead of file generation to embed __version__ in Cytho…
Browse files Browse the repository at this point in the history
…n files
  • Loading branch information
althonos committed Oct 28, 2024
1 parent b0d34f8 commit c7ddfed
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
5 changes: 0 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ build-dir = "build/{build_type}"
editable.rebuild = true
editable.verbose = false

[[tool.scikit-build.generate]]
path = "src/pyrodigal/_version.py"
template = '__version__ = "${version}"'
location = 'source'

[[tool.scikit-build.overrides]]
if.state = "editable"
cmake.build-type = "Debug"
Expand Down
3 changes: 1 addition & 2 deletions src/pyrodigal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
Sized as _Sized,
)

from ._version import __version__

from . import lib
from .lib import (
__version__,
Gene,
Genes,
GeneFinder,
Expand Down
2 changes: 1 addition & 1 deletion src/pyrodigal/lib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ import textwrap
import threading
import warnings

include "_version.py"
__version__ = PROJECT_VERSION

# --- Module-level constants -------------------------------------------------

Expand Down

0 comments on commit c7ddfed

Please sign in to comment.