Skip to content

Commit

Permalink
fix release version (#1658)
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz committed Aug 10, 2022
1 parent 10fd5d6 commit cc6e324
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,4 @@ bundle.*
pip-wheel-metadata/

_build/
reacnetgenerator/_version2.py
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
requires = ["setuptools>=40.8.0", "wheel", "oldest-supported-numpy"]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
write_to = "reacnetgenerator/_version.py"
write_to = "reacnetgenerator/_version2.py"
fallback_version = "Unknown"
9 changes: 6 additions & 3 deletions reacnetgenerator/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"""Obtain the version."""
from pkg_resources import DistributionNotFound, get_distribution
try:
__version__ = get_distribution('reacnetgenerator').version
except DistributionNotFound:
__version__ = 'Unknown'
from ._version2 import version as __version__
except ImportError:
try:
__version__ = get_distribution('reacnetgenerator').version
except DistributionNotFound:
__version__ = 'Unknown'

0 comments on commit cc6e324

Please sign in to comment.