thumbor-9999.ebuild: Patch 'argparse' dependency out of setup.py dev-python/thumbor
authorW. Trevor King <wking@tremily.us>
Fri, 12 Aug 2016 19:53:51 +0000 (12:53 -0700)
committerW. Trevor King <wking@tremily.us>
Fri, 12 Aug 2016 21:06:18 +0000 (14:06 -0700)
Details in the patch header.

files/9999-0001-setup.py-Remove-argparse-dependency.patch [new file with mode: 0644]
thumbor-9999.ebuild

diff --git a/files/9999-0001-setup.py-Remove-argparse-dependency.patch b/files/9999-0001-setup.py-Remove-argparse-dependency.patch
new file mode 100644 (file)
index 0000000..479d610
--- /dev/null
@@ -0,0 +1,48 @@
+From b95c44e51fb19ba83c0bcdc07e76392f52f9a700 Mon Sep 17 00:00:00 2001
+Message-Id: <b95c44e51fb19ba83c0bcdc07e76392f52f9a700.1471031141.git.wking@tremily.us>
+From: "W. Trevor King" <wking@tremily.us>
+Date: Fri, 12 Aug 2016 12:42:18 -0700
+Subject: [PATCH] setup.py: Remove argparse dependency
+
+Python 2.7 has argparse built in [1], so we don't need to explicitly
+list the dependency.  And if we do list it, 'emerge thumbor' crashes
+with:
+
+   * python2_7: running distutils-r1_run_phase python_install_all
+  Traceback (most recent call last):
+    File "/var/tmp/portage/dev-python/thumbor-9999/image//usr/lib/python-exec/python2.7/thumbor-config", line 5, in <module>
+      from pkg_resources import load_entry_point
+    File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 3080, in <module>
+      @_call_aside
+    File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 3066, in _call_aside
+      f(*args, **kwargs)
+    File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 3093, in _initialize_master_working_set
+      working_set = WorkingSet._build_master()
+    File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 651, in _build_master
+      ws.require(__requires__)
+    File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 952, in require
+      needed = self.resolve(parse_requirements(requirements))
+    File "/usr/lib64/python2.7/site-packages/pkg_resources/__init__.py", line 839, in resolve
+      raise DistributionNotFound(req, requirers)
+  pkg_resources.DistributionNotFound: The 'argparse' distribution was not found and is required by thumbor
+
+[1]: https://docs.python.org/2.7/library/argparse.html
+---
+ setup.py | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 751157a..6e77273 100644
+--- a/setup.py
++++ b/setup.py
+@@ -103,7 +103,6 @@ http://<thumbor-server>/300x200/smart/s.glbimg.com/et/bb/f/original/2011/03/24/V
+             "statsd>=3.0.1",
+             "libthumbor>=1.3.2",
+             "futures",
+-            "argparse",
+             "pytz",
+         ],
+-- 
+2.1.0.60.g85f0837
+
index 5dda4c0adeb5c43b0927c773ed5ecde1ba555d89..03cea23b2682168dcf802a4f325851195df4865d 100644 (file)
@@ -62,6 +62,8 @@ DEPEND="
        )
        "
 
+PATCHES=( "${FILESDIR}/${PV}-0001-setup.py-Remove-argparse-dependency.patch" )
+
 pkg_setup() {
        P_HOME="${EPREFIX}/var/lib/${PN}"
        ebegin "Creating ${PN} user and group"