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: Release routine:
- Update `ChangeLog.md`, `setup.py`, `lib/solaar/__init__.py` to the new release - Update `lib/solaar/__init__.py` to the new release
- Add the new release to `share/solaar/io.github.pwr_solaar.solaar.metainfo.xml` - 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` - Create a commit that starts with `release VERSION`
- Push commit to Solaar repository - Push commit to Solaar repository
- Invoke `./release.sh` - Invoke `./release.sh`

View File

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