diff options
-rw-r--r-- | MANIFEST.in | 2 | ||||
-rw-r--r-- | NEWS | 2 | ||||
-rwxr-xr-x | make-release | 12 | ||||
-rw-r--r-- | setup.py | 23 |
4 files changed, 23 insertions, 16 deletions
diff --git a/MANIFEST.in b/MANIFEST.in index e0b2a3c..9e680e3 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,4 +2,4 @@ recursive-include man * recursive-include config * recursive-include src * recursive-include tests * -include ChangeLog NEWS TODO +include NEWS TODO @@ -16,7 +16,7 @@ For full ChangeLog generated from svn commit logs see ChangeLog. * Generate jdk-defaults.conf at install time having a reasonable fallback for unknown architectures. * Face lifting for 'java-config --help' - * Add test command to setup.py + * Fix sdist and add test command to setup.py 1.1.12: diff --git a/make-release b/make-release deleted file mode 100755 index 04507aa..0000000 --- a/make-release +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -version=${1} -if [[ -z ${version} ]]; then - echo "I want a version" - exit 1 -fi -svn up -svn2cl --authors=AUTHORS -sed -i "s/package_version =.*/package_version = \'${version}\',/" setup.py -python setup.py sdist --force-manifest --formats=bztar - -cp -v dist/java-config-${version}.tar.bz2 $(portageq envvar DISTDIR) @@ -7,7 +7,8 @@ package_version = '2.2.0' from distutils.cmd import Command from distutils.command.build import build from distutils.command.install import install -import fileinput, os, sys, unittest +from distutils.command.sdist import sdist +import fileinput, os, subprocess, sys, unittest class jc_build(build): @@ -92,12 +93,30 @@ class jc_install(install): f.write(defaults + "\n") +class jc_sdist(sdist): + """ + Set some defaults and generate ChangeLog from svn log + """ + + def initialize_options(self): + sdist.initialize_options(self) + self.formats = ['bztar'] + self.force_manfifest = 1 + + def run(self): + subprocess.call(['svn', 'up']) + os.mkdir(self.distribution.get_fullname()) + subprocess.call(['svn2cl', '--authors', 'AUTHORS', '--output', self.distribution.get_fullname() + '/ChangeLog']) + + sdist.run(self) + + from distutils.core import setup eprefix = os.getenv('EPREFIX', '') setup ( - cmdclass={'build' : jc_build, 'test' : jc_test, 'install' : jc_install}, + cmdclass={'build' : jc_build, 'test' : jc_test, 'install' : jc_install, 'sdist' : jc_sdist}, name = 'java-config', version = package_version, description = 'java enviroment configuration tool', |