aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Sennhauser <sera@gentoo.org>2013-02-14 22:04:41 +0000
committerRalph Sennhauser <sera@gentoo.org>2013-02-14 22:04:41 +0000
commit8a4d3bfe3e3be9f2bdd8b8ffdb72084489f05ef3 (patch)
tree772b43c600a7844b33d6713c7a5adf52c1f07653
parentUpdate NEWS (diff)
downloadjava-config-8a4d3bfe3e3be9f2bdd8b8ffdb72084489f05ef3.tar.gz
java-config-8a4d3bfe3e3be9f2bdd8b8ffdb72084489f05ef3.tar.bz2
java-config-8a4d3bfe3e3be9f2bdd8b8ffdb72084489f05ef3.zip
Fix sdist and so make make-releas obsolete2.2.0
svn path=/projects/java-config-2/trunk/; revision=9221
-rw-r--r--MANIFEST.in2
-rw-r--r--NEWS2
-rwxr-xr-xmake-release12
-rw-r--r--setup.py23
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
diff --git a/NEWS b/NEWS
index d4cc134..57c5290 100644
--- a/NEWS
+++ b/NEWS
@@ -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)
diff --git a/setup.py b/setup.py
index c97c488..bc48852 100644
--- a/setup.py
+++ b/setup.py
@@ -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',