From 89cd543cc1143287106cb4ab907cd5a5b90a78ed Mon Sep 17 00:00:00 2001 From: Tim Harder Date: Wed, 25 Jan 2017 02:20:15 -0500 Subject: 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(+) create mode 100644 dev-python/appdirs/appdirs-1.4.0-r1.ebuild create mode 100644 dev-python/appdirs/files/appdirs-1.4.0-distutils.patch (limited to 'dev-python/appdirs') 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 000000000000..fc2827a2030a --- /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 000000000000..eb0cf8217545 --- /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='trentm@gmail.com', -- cgit v1.2.3-65-gdbad