-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the version detection slightly more flexible
Just in case someone using GPax as a dev copy does not have dunamai installed, GPax will now gracefully fail to detect the version and will simply use "dev" as the version name.
- Loading branch information
1 parent
e3cfefd
commit 7d8156b
Showing
2 changed files
with
7 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
"""Version file. This is overwritten during build and will contain a static | ||
__version__ variable.""" | ||
|
||
import dunamai as _dunamai | ||
try: | ||
import dunamai as _dunamai | ||
|
||
__version__ = _dunamai.Version.from_any_vcs().serialize() | ||
del _dunamai | ||
__version__ = _dunamai.Version.from_any_vcs().serialize() | ||
del _dunamai | ||
except ImportError: | ||
__version__ = "dev" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#!/bin/bash | ||
|
||
pip install flit~=3.7 | ||
pip install dunamai==1.19.2 | ||
echo "__version__ = '$(dunamai from any --style=pep440 --no-metadata)'" >gpax/_version.py | ||
flit build |