summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2012-12-16 16:14:33 +0000
committerMichał Górny <mgorny@gentoo.org>2012-12-16 16:14:33 +0000
commit09c16ec2eefef6548f99e2a2f9327a981bb7730b (patch)
tree1646b7270f35ef9ba6b9c2354e5f2b0f2ea5817b /dev-python/python-gflags
parentFix LICENSE, see README file, bug 447278. (diff)
downloadhistorical-09c16ec2eefef6548f99e2a2f9327a981bb7730b.tar.gz
historical-09c16ec2eefef6548f99e2a2f9327a981bb7730b.tar.bz2
historical-09c16ec2eefef6548f99e2a2f9327a981bb7730b.zip
Migrate to distutils-r1, run tests and make Python team a maintainer.
Package-Manager: portage-2.2.0_alpha148/cvs/Linux x86_64 Manifest-Sign-Key: 0x42B9401D
Diffstat (limited to 'dev-python/python-gflags')
-rw-r--r--dev-python/python-gflags/ChangeLog8
-rw-r--r--dev-python/python-gflags/Manifest16
-rw-r--r--dev-python/python-gflags/files/python-gflags-2.0-scripts-install.patch26
-rw-r--r--dev-python/python-gflags/files/python-gflags-2.0-tests-respect-tmpdir.patch55
-rw-r--r--dev-python/python-gflags/metadata.xml4
-rw-r--r--dev-python/python-gflags/python-gflags-2.0.ebuild32
6 files changed, 122 insertions, 19 deletions
diff --git a/dev-python/python-gflags/ChangeLog b/dev-python/python-gflags/ChangeLog
index 6cd495d22a5f..e0db40a8a94e 100644
--- a/dev-python/python-gflags/ChangeLog
+++ b/dev-python/python-gflags/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-python/python-gflags
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/python-gflags/ChangeLog,v 1.9 2012/12/16 14:15:02 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/python-gflags/ChangeLog,v 1.10 2012/12/16 16:14:31 mgorny Exp $
+
+ 16 Dec 2012; Michał Górny <mgorny@gentoo.org>
+ +files/python-gflags-2.0-scripts-install.patch,
+ +files/python-gflags-2.0-tests-respect-tmpdir.patch, metadata.xml,
+ python-gflags-2.0.ebuild:
+ Migrate to distutils-r1, run tests and make Python team a maintainer.
16 Dec 2012; Pacho Ramos <pacho@gentoo.org> -python-gflags-1.6.ebuild,
metadata.xml:
diff --git a/dev-python/python-gflags/Manifest b/dev-python/python-gflags/Manifest
index 6d2c17832b4c..10d1a0ccd138 100644
--- a/dev-python/python-gflags/Manifest
+++ b/dev-python/python-gflags/Manifest
@@ -1,14 +1,18 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
+AUX python-gflags-2.0-scripts-install.patch 859 SHA256 2f9dec0ad45249aea43701ce43eab8c49a4d423f9defcab84ee864ab4ba32f4c SHA512 38f3272bb6b392ede04ab3e8edaacd5e12fb9f0fbb16abfe0eebed251d08a1a8223840d38dae48089bc1d265c14a2e485045385b00d7d9a8714a063c489feda7 WHIRLPOOL ecf82010e8a831ca90d7feb3b26603b811df07be6e8b3140a179f78fefeedf5339014bbb25faefc4a29e2b7e8763f33d69b1e7e39c054594265ca25b508d7a67
+AUX python-gflags-2.0-tests-respect-tmpdir.patch 1749 SHA256 dc11b5f239f4b955b99a642179dc27aee7778c2d19ef9be124c6256d7c84512d SHA512 cfc6fabe7fe1543d589cf130a3eb0360ac42bda3f5a1b2d1ef014af177874b44f05b18459c9915b8cbaf3fe0ecbcdd923d0e3b8d4da3992cea395792c6caa16b WHIRLPOOL 7a5fb7e8ea89b64dc1c04e98bc42cc8d3d6cb62c8b9ae22a449c128e2db1cc7549cf0429ce384586eaf00f1d7b6195b9fdca2c8d447c027debad475b2a786cda
DIST python-gflags-2.0.tar.gz 64929 SHA256 311066217acb8cd8519a4c872cb3fe64f02bcf105802bb761ab0de55c2386cd6 SHA512 28566acffd092f09105f3b9ad3be4ada11f024f940914e6efb103907f3779283c63bdfe13edad83aa470c5e887b49ad8b05031fc1895f3bad9b5d9c368bbfe18 WHIRLPOOL 61054cce9033ef26ee6d6296fc761c840f394de07f068a899b52a5d4212de4e4601f9a203fd8033db576e79369e4d53a0bb04bfca0e50cf828ff94105a2b453a
-EBUILD python-gflags-2.0.ebuild 758 SHA256 864c70ccfe719b7c4aaca47ab5fad543a5f8f49227b396ea4e073d4a0bdfd6a2 SHA512 1181afd4392348dc996ccbb7d7f25c72fd6ddf89c7bd041a3ebf3f1bfccd516f588e235f13e2b22ab8d95ce73bfd57895aadaed32a13857ff914a3d0aa5e88eb WHIRLPOOL e6c9da8f7c77411ff34a4db5afde8f6a3038ecd425d42a33de29b7b771131c2ce416bdf983220283b34a77a58197f16aef1b4e4563f613e852ec8ecfec70deb8
-MISC ChangeLog 1768 SHA256 ddf965c570ce165c78e5a15e8c129bc6d4ab9f8f4fa13d9b8e3149628cda2a40 SHA512 a607df7d74c30ccabc4864948b115016fa91a62c9458314aabe5a98b3cb05bd6b8b8700991ca437117068f924d5cfce4ed29736e8c82e80da85617729a755d6a WHIRLPOOL 4711cb7f35aa8c94decbc7668e67e017793d9fb3c72f173b07c9d9fcd8f5ae9a32cd7d2f159afaa1f8c4f9677d09acc6f70fc37eede4da51a280ba6bb8283500
-MISC metadata.xml 296 SHA256 9528fdf2e0926e9324fb6367c3e6591fb2cd62c3fb6fc69364375a59efabc2f4 SHA512 b77a8782281ade1e964a79f2a1aab1c2add23e1a8c4e3cdeeae723c1f45a355574e6bc56ac5e51a9d63ac6c59030d0bf83ab1e3cb7dbad9e6e64c41b1d1138f9 WHIRLPOOL f25f373db33d3a6ff59b280ca74496cc4786b6e32333078582d6aac9ba665675e7387ede1cc233fa648ecfcf79a7acb70624dc05860f20274b7e5d237382805f
+EBUILD python-gflags-2.0.ebuild 1109 SHA256 f315abbae568e76fcd1741bc4c9626de754486a2ff7d71d33d03ba7fafa88420 SHA512 ad738334b27c0ae14a14e362c9f2be6c038991fea7802d230497b9a47de0a94d3ec5720c1e1cf6170f85aa14e9f86e8e56a3682b2f4364ba1c16286c32641a8f WHIRLPOOL f7473005485933c7b6a237523d6433f07da2d9d1337fd5f23d7a431ce5ced2d99433b458aab10ca4d0d38bacf9a944b67b049b5ac6dc82fa6ad3a1c274152906
+MISC ChangeLog 2040 SHA256 8fcda877a274e81cde165b36d10755a7e3d781329665c0dc77e5284a8f18c6b0 SHA512 7ef5b539662ec64bfaf3be062ab70493297f9dcb5360d3217a0d54acb93e05a902e71eb508054c4dd979a9582ca628ecd1f0bda660dd576dd4f6280b0f6e0226 WHIRLPOOL b838ad5ae1fff2e33319ab2d786126570a66f78432ff6db9fcebc4c995237f323b4630fb894abef4d00160bee536cbe9bd661f48b4f01f80126ebb024215c721
+MISC metadata.xml 243 SHA256 d50b13bbe1de5e911a663e8c66936ab0f21f281b228d07e3dbe5669f5e1daa16 SHA512 5bd582044af93dab87ae0c18e223253384e4df14a91b06463aabd5625850181778dc562beb04ad1b350552b84c06a9811b5d794fee908cbe3c889820abb8b6dd WHIRLPOOL 15f6e797876844accd5400645b308927a37cc913d4020fedb5fef787936f415a4a6d9cf93dafb3de5dcc68148f37bc0b3fc50c9e259c36b7301297c97fc373e3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iEYEAREIAAYFAlDN12gACgkQCaWpQKGI+9QGzACcDrVNo0uUYKF3mxM4fu24i32N
-cgoAn1pYsg3i5m6g05VATrCjELpWmVFn
-=yKqT
+iJwEAQEIAAYFAlDN82gACgkQfXuS5UK5QB3KJwP/Z6+vqJ5WxGfzgwT9149SAXtC
+HKbvuzSwLJ4UkDe7RsfvTEqvvCcwNyouFrRtP2NfrRndGVuIQqhlVIVGzmbBK6Bb
+IH4KsvIHKsPZbG7zkY8+ZwsQl2xF4/zEtmCvCbOLJgyzGE4RwhxHvkG3diRvwzS/
+SwoU1vP4pLYpYOy5xFk=
+=3ZZl
-----END PGP SIGNATURE-----
diff --git a/dev-python/python-gflags/files/python-gflags-2.0-scripts-install.patch b/dev-python/python-gflags/files/python-gflags-2.0-scripts-install.patch
new file mode 100644
index 000000000000..357121c61aab
--- /dev/null
+++ b/dev-python/python-gflags/files/python-gflags-2.0-scripts-install.patch
@@ -0,0 +1,26 @@
+From d544cdad63faa5a53ba524e39f091f4a18e1eeb8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 16 Dec 2012 16:27:13 +0100
+Subject: [PATCH] Install Python scripts using 'scripts' key.
+
+This is necessary to ensure that the shebangs are properly replaced when
+installing for multiple Python implementations.
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 573db2d..ddad318 100755
+--- a/setup.py
++++ b/setup.py
+@@ -39,6 +39,6 @@ setup(name='python-gflags',
+ author_email='google-gflags@googlegroups.com',
+ url='http://code.google.com/p/python-gflags',
+ py_modules=["gflags", "gflags_validators"],
+- data_files=[("bin", ["gflags2man.py"])],
++ scripts=["gflags2man.py"],
+ include_package_data=True,
+ )
+--
+1.8.0.2
+
diff --git a/dev-python/python-gflags/files/python-gflags-2.0-tests-respect-tmpdir.patch b/dev-python/python-gflags/files/python-gflags-2.0-tests-respect-tmpdir.patch
new file mode 100644
index 000000000000..035b6b6be404
--- /dev/null
+++ b/dev-python/python-gflags/files/python-gflags-2.0-tests-respect-tmpdir.patch
@@ -0,0 +1,55 @@
+From 4a430830e75bfe2228e9d953b12f74a20ec2cb8f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sun, 16 Dec 2012 16:53:24 +0100
+Subject: [PATCH] Use tempfile.mkdtemp() to create temporary directory.
+
+This creates an unique directory, and respects TMPDIR.
+---
+ tests/gflags_unittest.py | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/tests/gflags_unittest.py b/tests/gflags_unittest.py
+index 8e948bf..fcddb7b 100755
+--- a/tests/gflags_unittest.py
++++ b/tests/gflags_unittest.py
+@@ -38,6 +38,7 @@ import cStringIO
+ import sys
+ import os
+ import shutil
++import tempfile
+
+ import gflags
+ from flags_modules_for_testing import module_foo
+@@ -907,17 +908,16 @@ class LoadFromFlagFileTest(googletest.TestCase):
+ flag_values=self.flag_values)
+ self.files_to_delete = []
+
++ # Figure out where to create temporary files
++ self.tmp_path = tempfile.mkdtemp(prefix='gflags_unittest')
++
+ def tearDown(self):
+ self._RemoveTestFiles()
+
+ def _SetupTestFiles(self):
+ """ Creates and sets up some dummy flagfile files with bogus flags"""
+
+- # Figure out where to create temporary files
+- tmp_path = '/tmp/flags_unittest'
+- if os.path.exists(tmp_path):
+- shutil.rmtree(tmp_path)
+- os.makedirs(tmp_path)
++ tmp_path = self.tmp_path
+
+ try:
+ tmp_flag_file_1 = open(tmp_path + '/UnitTestFile1.tst', 'w')
+@@ -973,6 +973,7 @@ class LoadFromFlagFileTest(googletest.TestCase):
+ os.remove(file_name)
+ except OSError, e_msg:
+ print '%s\n, Problem deleting test file' % e_msg
++ shutil.rmtree(self.tmp_path)
+ #end RemoveTestFiles def
+
+ def _ReadFlagsFromFiles(self, argv, force_gnu):
+--
+1.8.0.2
+
diff --git a/dev-python/python-gflags/metadata.xml b/dev-python/python-gflags/metadata.xml
index 3aa4bc9253ad..acab986467bf 100644
--- a/dev-python/python-gflags/metadata.xml
+++ b/dev-python/python-gflags/metadata.xml
@@ -1,9 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer>
- <email>maintainer-needed@gentoo.org</email>
- </maintainer>
+ <herd>python</herd>
<upstream>
<remote-id type="google-code">python-gflags</remote-id>
</upstream>
diff --git a/dev-python/python-gflags/python-gflags-2.0.ebuild b/dev-python/python-gflags/python-gflags-2.0.ebuild
index f9b910a65105..b48f4fc9800a 100644
--- a/dev-python/python-gflags/python-gflags-2.0.ebuild
+++ b/dev-python/python-gflags/python-gflags-2.0.ebuild
@@ -1,14 +1,14 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/python-gflags/python-gflags-2.0.ebuild,v 1.3 2012/06/27 05:05:34 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/python-gflags/python-gflags-2.0.ebuild,v 1.4 2012/12/16 16:14:31 mgorny Exp $
EAPI="4"
-PYTHON_COMPAT="python2_5 python2_6 python2_7 pypy1_8 pypy1_9"
+PYTHON_COMPAT=( python{2_5,2_6,2_7} pypy{1_8,1_9} )
-inherit python-distutils-ng
+inherit distutils-r1
-DESCRIPTION="Google's Python argument parsing library."
+DESCRIPTION="Google's Python argument parsing library"
HOMEPAGE="http://code.google.com/p/python-gflags/"
SRC_URI="http://python-gflags.googlecode.com/files/${P}.tar.gz"
@@ -17,11 +17,25 @@ SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
-DEPEND="dev-python/setuptools"
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
RDEPEND=""
-python_prepare_all() {
- sed \
- -e 's/data_files=\[("bin", \["gflags2man.py"\])\]/scripts=\["gflags2man.py"\]/' \
- -i setup.py || die "sed failed"
+PATCHES=(
+ # The scripts are installed as 'data' rather than scripts.
+ # http://code.google.com/p/python-gflags/issues/detail?id=12
+ "${FILESDIR}"/${P}-scripts-install.patch
+
+ # Tests try to write to /tmp (sandbox).
+ # http://code.google.com/p/python-gflags/issues/detail?id=13
+ "${FILESDIR}"/${P}-tests-respect-tmpdir.patch
+)
+
+python_test() {
+ local t
+
+ cd tests || die
+ for t in *.py; do
+ # (it's ok to run the gflags_googletest.py too)
+ "${PYTHON}" "${t}" || die "Tests fail with ${EPYTHON}"
+ done
}