Parcourir la source

Fix versioning for travis

oz123 il y a 11 ans
Parent
commit
a6e8e75621
1 fichiers modifiés avec 6 ajouts et 1 suppressions
  1. 6 1
      pwman/__init__.py

+ 6 - 1
pwman/__init__.py

@@ -22,7 +22,12 @@ import os
 import pkg_resources
 
 appname = "Pwman3"
-version = pkg_resources.get_distribution('pwman3').version
+try:
+    version = pkg_resources.get_distribution('pwman3').version
+except pkg_resources.DistributionNotFound:
+    version = "0.5-dev"
+    os.system('git describe')
+
 website = "http://github.com/pwman3/pwman3"
 author = "Oz Nahum"
 authoremail = "nahumoz@gmail.com"