dist: get release in setup.py by reading lib/solaar/__init__.py

This commit is contained in:
Peter F. Patel-Schneider 2022-11-19 11:01:06 -05:00
parent c7ff89c817
commit 0a2f57f51a
2 changed files with 8 additions and 5 deletions

View File

@ -7,8 +7,9 @@ candidates (ex. `1.0.0rc1`). Release candidates must have a `rcX` suffix.
Release routine:
- Update `ChangeLog.md`, `setup.py`, `lib/solaar/__init__.py` to the new release
- Add the new release to `share/solaar/io.github.pwr_solaar.solaar.metainfo.xml`
- Update `lib/solaar/__init__.py` to the new release
- Add release changes to `ChangeLog.md`
- Add release information to `share/solaar/io.github.pwr_solaar.solaar.metainfo.xml`
- Create a commit that starts with `release VERSION`
- Push commit to Solaar repository
- Invoke `./release.sh`

View File

@ -7,9 +7,11 @@ try:
except ImportError:
from distutils.core import setup
# from solaar import NAME, __version__
__version__ = '1.1.7'
NAME = 'Solaar'
main_ns = {}
with open('lib/solaar/__init__.py') as ver_file:
exec(ver_file.read(), main_ns)
NAME = main_ns['NAME']
__version__ = main_ns['__version__']
def _data_files():