commit:     89cd543cc1143287106cb4ab907cd5a5b90a78ed
Author:     Tim Harder <radhermit <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 25 07:20:15 2017 +0000
Commit:     Tim Harder <radhermit <AT> gentoo <DOT> org>
CommitDate: Wed Jan 25 07:23:20 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89cd543c

dev-python/appdirs: force usage of distutils instead of setuptools

In order to break a cyclic dependency with setuptools since appdirs is
required by setuptools and isn't vendored anymore.

 dev-python/appdirs/appdirs-1.4.0-r1.ebuild         | 30 ++++++++++++++++++++++
 .../appdirs/files/appdirs-1.4.0-distutils.patch    | 22 ++++++++++++++++
 2 files changed, 52 insertions(+)

diff --git a/dev-python/appdirs/appdirs-1.4.0-r1.ebuild 
b/dev-python/appdirs/appdirs-1.4.0-r1.ebuild
new file mode 100644
index 00000000..fc2827a
--- /dev/null
+++ b/dev-python/appdirs/appdirs-1.4.0-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5} pypy pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="Module for determining appropriate platform-specific dirs"
+HOMEPAGE="https://github.com/ActiveState/appdirs";
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 
~sh ~sparc ~x86"
+IUSE=""
+
+# api.doctests is missing in the dist zipfile
+# and the 'internal' doctest does nothing
+RESTRICT=test
+
+PATCHES=( "${FILESDIR}"/${P}-distutils.patch )
+
+python_test() {
+       cd test || die
+       "${PYTHON}" test.py \
+               || die "Tests fail with ${EPYTHON}"
+}

diff --git a/dev-python/appdirs/files/appdirs-1.4.0-distutils.patch 
b/dev-python/appdirs/files/appdirs-1.4.0-distutils.patch
new file mode 100644
index 00000000..eb0cf82
--- /dev/null
+++ b/dev-python/appdirs/files/appdirs-1.4.0-distutils.patch
@@ -0,0 +1,22 @@
+Force setup.py to use distutils in order to break setuptools cyclic dependency.
+
+--- appdirs-1.4.0/setup.py
++++ appdirs-1.4.0/setup.py
+@@ -2,7 +2,7 @@
+ import sys
+ import os
+ import os.path
+-from setuptools import setup
++from distutils.core import setup
+ import appdirs
+ 
+ tests_require = []
+@@ -38,8 +38,6 @@
+         Programming Language :: Python :: 3.2
+         Topic :: Software Development :: Libraries :: Python Modules
+         """.split('\n') if c.strip()],
+-    test_suite='test.test_api',
+-    tests_require=tests_require,
+     keywords='application directory log cache user',
+     author='Trent Mick',
+     author_email='tre...@gmail.com',

Reply via email to