Commits

Denis Darii  committed 3c8060b

changed setup.py and version variable in fagungis __init__.py

  • Participants
  • Parent commits 254fd3e

Comments (0)

Files changed (2)

File fagungis/__init__.py

 __import__("pkg_resources").declare_namespace(__name__)
-__version__ = "0.0.14"
+VERSION = (0, 0, 15, 'alpha', 1)
+
+
+def get_version(version=None):
+    """Derives a PEP386-compliant version number from VERSION."""
+    if version is None:
+        version = VERSION
+    assert len(version) == 5
+    assert version[3] in ('alpha', 'beta', 'rc', 'final')
+
+    # Now build the two parts of the version number:
+    # main = X.Y[.Z]
+    # sub = .devN - for pre-alpha releases
+    #     | {a|b|c}N - for alpha, beta and rc releases
+
+    parts = 2 if version[2] == 0 else 3
+    return '.'.join(str(x) for x in version[:parts])
 
 setup(
     name="django-fagungis",
-    version=__import__('fagungis').__version__,
+    version=__import__('fagungis').get_version(),
     url='https://bitbucket.org/DNX/django-fagungis/wiki/Home',
     download_url='http://bitbucket.org/DNX/django-fagungis/downloads',
     license='BSD License',
     description="DJANGO + FAbric + GUnicorn + NGInx + Supervisor deployment",
     long_description=open(os.path.join(os.path.dirname(__file__), 'README.rst')).read(),
-    author='Darii Denis',
-    author_email='info@ddenis.com',
+    author='Denis Darii',
+    author_email='denis.darii@gmail.com',
     keywords='django fabric gunicorn nginx supervisor',
     packages=find_packages(),
     namespace_packages=['fagungis'],