dist: add 8-character commit hash to version information

This commit is contained in:
Peter F. Patel-Schneider 2022-11-19 11:49:59 -05:00
parent d61d507a2b
commit 49c7e5cc44
2 changed files with 9 additions and 2 deletions

View File

@ -16,5 +16,11 @@
## with this program; if not, write to the Free Software Foundation, Inc.,
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
__version__ = '1.1.7'
__version_short__ = '1.1.7'
NAME = 'Solaar'
try:
import gitinfo
__version__ = __version_short__ + '-' + gitinfo.get_git_info()['commit'][:8]
except Exception:
__version__ = __version_short__

View File

@ -11,7 +11,7 @@ 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__']
__version__ = main_ns['__version_short__']
def _data_files():
@ -72,6 +72,7 @@ For instructions on installing Solaar see https://pwr-solaar.github.io/Solaar/in
extras_require={
'report-descriptor': ['hid-parser'],
'desktop-notifications': ['Notify (>= 0.7)'],
'git-commit': ['python-git-info'],
},
package_dir={'': 'lib'},
packages=['keysyms', 'hidapi', 'logitech_receiver', 'solaar', 'solaar.ui', 'solaar.cli'],