Create a VERSION file to replace /etc/gentoolkit-version
authorfuzzyray <fuzzyray@gentoo.org>
Wed, 20 May 2009 14:27:01 +0000 (14:27 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Wed, 20 May 2009 14:27:01 +0000 (14:27 -0000)
svn path=/trunk/gentoolkit/; revision=642

MANIFEST.in
Makefile
VERSION [new file with mode: 0644]
setup.py

index f68c33dd9129d7b4ce055b95517d8dd6aba50459..9bb143ebb3643c608c6b7f9e47cc823363252fa9 100644 (file)
@@ -1,3 +1,3 @@
-include AUTHORS ChangeLog COPYING NEWS README README.Developer THANKS TODO
+include AUTHORS ChangeLog COPYING NEWS README README.Developer THANKS TODO VERSION
 recursive-include data *
 recursive-include man *
index 462bc56e59208ee038fc420c26ac4be68390472c..27dd699fc0d430ec80177c1a31e285d9f20c127d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,10 @@
 #
 # $Header$
 
+ifeq ($(origin VERSION), undefined)
+       VERSION = 9999
+endif
+
 all:
        echo "YARMOUTH (vb.) To shout at foreigners in the belief that the louder you speak, the better they'll understand you." 
        echo $(VERSION)
@@ -15,7 +19,7 @@ dist: dist-gentoolkit
 
 dist-gentoolkit:
        mkdir -p release
-       sed -i "s/^VER =.*/VER = '$(VERSION)'/" setup.py
+       echo "$(VERSION)" > VERSION
        python setup.py sdist --dist-dir release
-       svn revert setup.py
+       svn revert VERSION
        rm -f MANIFEST
diff --git a/VERSION b/VERSION
new file mode 100644 (file)
index 0000000..3c2df07
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+9999
index 062475f48ceb0a98f785157a6bf62e0ba617fad2..446b3c792b4e15a68730da2cd40194484c297738 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -2,11 +2,11 @@
 
 from distutils.core import setup
 
-VER = '9.9.9.9'
+__version__ = open("VERSION").read().strip()
 
 setup(
        name='gentoolkit',
-       version=VER,
+       version=__version__,
        description='Set of tools that work with and enhance portage.',
        author='',
        author_email='',
@@ -14,7 +14,7 @@ setup(
        maintainer_email='tools-portage@gentoo.org',
        url='http://www.gentoo.org/proj/en/portage/tools/index.xml',
        download_url='http://distfiles.gentoo.org/distfiles/gentoolkit-%s.tar.gz'\
-               % VER,
+               % __version__,
        package_dir={'': 'pym'},
        packages=(
                'gentoolkit',