소스 검색

Fix versioning for travis

oz123 11 년 전
부모
커밋
a6e8e75621
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  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"