commit:     24134443deb83f6685dad375bd395d0b9d66370c
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue May  9 20:09:48 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May  9 20:10:25 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24134443

dev-python/python-gflags: Bump to 3.1.1

 dev-python/python-gflags/Manifest                  |  1 +
 .../files/python-gflags-3.1.1-script-install.patch | 33 ++++++++++++++++++++++
 .../python-gflags/python-gflags-3.1.1.ebuild       | 32 +++++++++++++++++++++
 3 files changed, 66 insertions(+)

diff --git a/dev-python/python-gflags/Manifest 
b/dev-python/python-gflags/Manifest
index 701cf8ef797..60380e78e64 100644
--- a/dev-python/python-gflags/Manifest
+++ b/dev-python/python-gflags/Manifest
@@ -1 +1,2 @@
 DIST python-gflags-2.0.tar.gz 65094 SHA256 
0dff6360423f3ec08cbe3bfaf37b339461a54a21d13be0dd5d9c9999ce531078 SHA512 
43bddf631501f08537167c3915a6ace9a5e70b1bac0351614b07d3de1e149475c2cbb04a9770096dc033fefd35d12eea0b4c849f5660f9950db1129023dd36ac
 WHIRLPOOL 
23769400b455352ea9f0d0a09f78df1ddc640a59c3bb65bafc1a0020d678453ed35aec3ee4224a8ded1b83f0b1c62c348c77b1065dc034bbe29a5a177f93f0ad
+DIST python-gflags-3.1.1.tar.gz 52633 SHA256 
aaff6449ca74320c709052e4664a52337832b2338f4a4267088564f3e98f6c63 SHA512 
28009cdc09b94b416af5237d3897d6ab516cc3b6a3eed18a31adb8c199f31a8c7d07b1d69794cb37de84b50eefbde1de57f9f0afaeac0a4747b352f4024ef12c
 WHIRLPOOL 
2b0bdc5150b87d98c07431203c57aa94e535b564ab4cd3a2e307b9d5030360e06172853c9497895c5b42cc5058ac9c4b73d10db14e935f2569693b86cec7de05

diff --git 
a/dev-python/python-gflags/files/python-gflags-3.1.1-script-install.patch 
b/dev-python/python-gflags/files/python-gflags-3.1.1-script-install.patch
new file mode 100644
index 00000000000..4fc79138309
--- /dev/null
+++ b/dev-python/python-gflags/files/python-gflags-3.1.1-script-install.patch
@@ -0,0 +1,33 @@
+From 3bc427f5ba0b612430066d5da0ba7a67252ebc75 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgo...@gentoo.org>
+Date: Tue, 9 May 2017 21:47:08 +0200
+Subject: [PATCH] setup.py: Install the script as 'scripts', rather than
+ 'data_files'
+
+Install the Python script using the 'scripts' key rather than
+the 'data_files' hack. This ensures that it is installed
+in the correct location (respecting install options) and its shebang
+is updated to match the correct Python interpreter.
+
+This is the same patch as I've sent back in 2012, rebased on top
+of the newest release.
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 647db36..1f9e8cb 100644
+--- a/setup.py
++++ b/setup.py
+@@ -39,7 +39,7 @@ setup(name='python-gflags',
+       author_email='google-gfl...@googlegroups.com',
+       url='https://github.com/google/python-gflags',
+       packages=['gflags', 'gflags.third_party', 'gflags.third_party.pep257'],
+-      data_files=[('bin', ['gflags2man.py'])],
++      scripts=['gflags2man.py'],
+       requires=['six'],
+       classifiers=[
+           'Programming Language :: Python :: 2.7',
+-- 
+2.13.0.rc2
+

diff --git a/dev-python/python-gflags/python-gflags-3.1.1.ebuild 
b/dev-python/python-gflags/python-gflags-3.1.1.ebuild
new file mode 100644
index 00000000000..7353c6aa476
--- /dev/null
+++ b/dev-python/python-gflags/python-gflags-3.1.1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 pypy )
+
+inherit distutils-r1
+
+DESCRIPTION="Google's Python argument parsing library"
+HOMEPAGE="https://github.com/google/python-gflags";
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc64 ~s390 ~sh 
~x86"
+IUSE=""
+
+RDEPEND="dev-python/six[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+       dev-python/setuptools[${PYTHON_USEDEP}]"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-script-install.patch
+)
+
+python_test() {
+       # note: each test needs to be run separately, otherwise they fail
+       "${PYTHON}" -m gflags._helpers_test -v || die
+       "${PYTHON}" -m gflags.flags_formatting_test -v || die
+       "${PYTHON}" -m gflags.flags_unicode_literals_test -v || die
+}

Reply via email to