فهرست منبع

Better versioning

oz123 11 سال پیش
والد
کامیت
cb6af8ec85
2فایلهای تغییر یافته به همراه5 افزوده شده و 4 حذف شده
  1. 3 2
      pwman/__init__.py
  2. 2 2
      setup.py

+ 3 - 2
pwman/__init__.py

@@ -18,15 +18,16 @@
 #============================================================================
 # Copyright (C) 2006 Ivan Kelly <ivan@ivankelly.net>
 #============================================================================
+import os
+import pkg_resources
 
 appname = "Pwman3"
-version = "0.5-dev"
+version = pkg_resources.get_distribution('pwman3').version
 website = "http://github.com/pwman3/pwman3"
 author = "Oz Nahum"
 authoremail = "nahumoz@gmail.com"
 description = "Pwman -a command line password management application."
 keywords = "password management sqlite crypto"
-import os
 
 
 def which(cmd):

+ 2 - 2
setup.py

@@ -10,7 +10,7 @@ from setuptools.command.install import install
 import os
 from subprocess import Popen,  PIPE
 
-def descibe():
+def describe():
     des = Popen('git describe', shell=True, stdout=PIPE)
     ver = des.stdout.readlines()
     if ver:
@@ -44,7 +44,7 @@ class PyCryptoInstallCommand(install):
 
 
 setup(name=pwman.appname,
-      version=descibe(),
+      version=describe(),
       description=pwman.description,
       author=pwman.author,
       author_email=pwman.authoremail,