summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2015-07-16 09:15:07 +0200
committerKyle Keen <keenerd@gmail.com>2016-01-31 15:57:33 -0500
commit079261be888e112df780ec71229a1894e33084ff (patch)
tree7bf17cf67b695d443ba6393ce10e87a655b2ea4d
parent27cd5958a0b1f265aba51f94e51a697e50f2d993 (diff)
downloadnamcap-079261be888e112df780ec71229a1894e33084ff.tar.gz
namcap-079261be888e112df780ec71229a1894e33084ff.zip
Extract version from setup.py
This will make it possible to reuse the function, and avoid having the version number defined in multiple places. Signed-off-by: Kyle Keen <keenerd@gmail.com>
-rw-r--r--Namcap/version.py25
-rwxr-xr-xsetup.py3
2 files changed, 27 insertions, 1 deletions
diff --git a/Namcap/version.py b/Namcap/version.py
new file mode 100644
index 0000000..641f147
--- /dev/null
+++ b/Namcap/version.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+#
+# namcap - version
+# Copyright (c) 2015 Rikard Falkeborn <rikard.falkeborn@gmail.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+#
+
+def get_version():
+ return '3.2.6'
+
+# vim: set ts=4 sw=4 noet:
diff --git a/setup.py b/setup.py
index ef4272a..369bd3e 100755
--- a/setup.py
+++ b/setup.py
@@ -1,12 +1,13 @@
#!/usr/bin/env python
from setuptools import setup, find_packages
+import Namcap.version
DATAFILES = [('/usr/share/man/man1', ['namcap.1']),
('/usr/share/namcap', ['namcap-tags', 'parsepkgbuild.sh']),
('/usr/share/doc/namcap',['README','AUTHORS','TODO'])]
setup(name="namcap",
- version="3.2.6",
+ version=Namcap.version.get_version(),
description="Pacman package analyzer",
author="Arch Dev Team",