diff options
4 files changed, 198 insertions, 1 deletions
diff --git a/dev-python/setuptools/ChangeLog b/dev-python/setuptools/ChangeLog index 4155ba933f00..551ae51e7bdf 100644 --- a/dev-python/setuptools/ChangeLog +++ b/dev-python/setuptools/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-python/setuptools # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/setuptools/ChangeLog,v 1.105 2010/02/13 15:49:59 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/setuptools/ChangeLog,v 1.106 2010/05/06 22:18:13 arfrever Exp $ + +*setuptools-0.6.12 (06 May 2010) + + 06 May 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> + +setuptools-0.6.12.ebuild, + +files/distribute-0.6.12-disable_versioned_easy_install.patch, + +files/distribute-0.6.12-fix_deprecation_warnings.patch: + Version bump. 13 Feb 2010; Raúl Porcel <armin76@gentoo.org> setuptools-0.6.10.ebuild: alpha/arm/ia64/s390/sh/sparc stable wrt #300709 diff --git a/dev-python/setuptools/files/distribute-0.6.12-disable_versioned_easy_install.patch b/dev-python/setuptools/files/distribute-0.6.12-disable_versioned_easy_install.patch new file mode 100644 index 000000000000..39d1f37e894c --- /dev/null +++ b/dev-python/setuptools/files/distribute-0.6.12-disable_versioned_easy_install.patch @@ -0,0 +1,11 @@ +--- setup.py ++++ setup.py +@@ -150,8 +150,6 @@ + + "console_scripts": [ + "easy_install = setuptools.command.easy_install:main", +- "easy_install-%s = setuptools.command.easy_install:main" +- % sys.version[:3] + ], + + "setuptools.file_finders": diff --git a/dev-python/setuptools/files/distribute-0.6.12-fix_deprecation_warnings.patch b/dev-python/setuptools/files/distribute-0.6.12-fix_deprecation_warnings.patch new file mode 100644 index 000000000000..100baf914c60 --- /dev/null +++ b/dev-python/setuptools/files/distribute-0.6.12-fix_deprecation_warnings.patch @@ -0,0 +1,122 @@ +--- pkg_resources.py ++++ pkg_resources.py +@@ -209,9 +209,10 @@ + needs some hacks for Linux and Mac OS X. + """ + try: +- from distutils.util import get_platform +- except ImportError: ++ # Python 2.7 or >=3.2 + from sysconfig import get_platform ++ except ImportError: ++ from distutils.util import get_platform + + plat = get_platform() + if sys.platform == "darwin" and not plat.startswith('macosx-'): +--- setuptools/command/bdist_egg.py ++++ setuptools/command/bdist_egg.py +@@ -7,10 +7,14 @@ + from setuptools import Command + from distutils.dir_util import remove_tree, mkpath + try: +- from distutils.sysconfig import get_python_version, get_python_lib ++ # Python 2.7 or >=3.2 ++ from sysconfig import get_path, get_python_version ++ def _get_purelib(): ++ return get_path("purelib") + except ImportError: +- from sysconfig import get_python_version +- from distutils.sysconfig import get_python_lib ++ from distutils.sysconfig import get_python_version, get_python_lib ++ def _get_purelib(): ++ return get_python_lib(False) + + from distutils import log + from distutils.errors import DistutilsSetupError +@@ -130,7 +134,7 @@ + # Hack for packages that install data to install's --install-lib + self.get_finalized_command('install').install_lib = self.bdist_dir + +- site_packages = os.path.normcase(os.path.realpath(get_python_lib())) ++ site_packages = os.path.normcase(os.path.realpath(_get_purelib())) + old, self.distribution.data_files = self.distribution.data_files,[] + + for item in old: +--- setuptools/command/build_ext.py ++++ setuptools/command/build_ext.py +@@ -9,9 +9,14 @@ + from distutils.file_util import copy_file + from setuptools.extension import Library + from distutils.ccompiler import new_compiler +-from distutils.sysconfig import customize_compiler, get_config_var +-get_config_var("LDSHARED") # make sure _config_vars is initialized +-from distutils.sysconfig import _config_vars ++try: ++ # Python 2.7 or >=3.2 ++ from distutils.ccompiler import customize_compiler ++ from sysconfig import get_config_var, _CONFIG_VARS ++except ImportError: ++ from distutils.sysconfig import customize_compiler, get_config_var ++ get_config_var("LDSHARED") # make sure _config_vars is initialized ++ from distutils.sysconfig import _config_vars as _CONFIG_VARS + from distutils import log + from distutils.errors import * + +@@ -133,16 +138,16 @@ + compiler=self.compiler, dry_run=self.dry_run, force=self.force + ) + if sys.platform == "darwin": +- tmp = _config_vars.copy() ++ tmp = _CONFIG_VARS.copy() + try: + # XXX Help! I don't have any idea whether these are right... +- _config_vars['LDSHARED'] = "gcc -Wl,-x -dynamiclib -undefined dynamic_lookup" +- _config_vars['CCSHARED'] = " -dynamiclib" +- _config_vars['SO'] = ".dylib" ++ _CONFIG_VARS['LDSHARED'] = "gcc -Wl,-x -dynamiclib -undefined dynamic_lookup" ++ _CONFIG_VARS['CCSHARED'] = " -dynamiclib" ++ _CONFIG_VARS['SO'] = ".dylib" + customize_compiler(compiler) + finally: +- _config_vars.clear() +- _config_vars.update(tmp) ++ _CONFIG_VARS.clear() ++ _CONFIG_VARS.update(tmp) + else: + customize_compiler(compiler) + +--- setuptools/command/easy_install.py ++++ setuptools/command/easy_install.py +@@ -15,8 +15,21 @@ + from setuptools import Command, _dont_write_bytecode + from setuptools.sandbox import run_setup + from distutils import log, dir_util ++try: ++ # Python 2.7 or >=3.2 ++ from sysconfig import get_config_vars, get_path ++ def _get_platlib(): ++ return get_path("platlib") ++ def _get_purelib(): ++ return get_path("purelib") ++except ImportError: ++ from distutils.sysconfig import get_config_vars, get_python_lib ++ def _get_platlib(): ++ return get_python_lib(True) ++ def _get_purelib(): ++ return get_python_lib(False) ++ + from distutils.util import convert_path, subst_vars +-from distutils.sysconfig import get_python_lib, get_config_vars + from distutils.errors import DistutilsArgError, DistutilsOptionError, \ + DistutilsError, DistutilsPlatformError + from distutils.command.install import INSTALL_SCHEMES, SCHEME_KEYS +@@ -1344,8 +1357,7 @@ + 'Python', + sys.version[:3], + 'site-packages')) +- for plat_specific in (0,1): +- site_lib = get_python_lib(plat_specific) ++ for site_lib in (_get_purelib(), _get_platlib()): + if site_lib not in sitedirs: sitedirs.append(site_lib) + + if sys.version >= "2.6": diff --git a/dev-python/setuptools/setuptools-0.6.12.ebuild b/dev-python/setuptools/setuptools-0.6.12.ebuild new file mode 100644 index 000000000000..6aa839499fe1 --- /dev/null +++ b/dev-python/setuptools/setuptools-0.6.12.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/setuptools/setuptools-0.6.12.ebuild,v 1.1 2010/05/06 22:18:13 arfrever Exp $ + +EAPI="3" +SUPPORT_PYTHON_ABIS="1" +DISTUTILS_SRC_TEST="setup.py" + +inherit distutils eutils + +MY_PN="distribute" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Distribute (fork of Setuptools) is a collection of extensions to Distutils" +HOMEPAGE="http://pypi.python.org/pypi/distribute" +SRC_URI="http://pypi.python.org/packages/source/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz" + +LICENSE="PSF-2.2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +DEPEND="" +RDEPEND="" + +S="${WORKDIR}/${MY_P}" + +PYTHON_MODNAME="easy_install.py pkg_resources.py setuptools site.py" +DOCS="README.txt docs/easy_install.txt docs/pkg_resources.txt docs/setuptools.txt" + +src_prepare() { + distutils_src_prepare + + epatch "${FILESDIR}/${PN}-0.6_rc7-noexe.patch" + + # Remove tests that access the network (bugs #198312, #191117) + rm setuptools/tests/test_packageindex.py + + epatch "${FILESDIR}/distribute-${PV}-disable_versioned_easy_install.patch" + epatch "${FILESDIR}/distribute-${PV}-fix_deprecation_warnings.patch" +} + +src_test() { + # test_install_site_py fails with disabled byte-compiling in Python 2.7 / >=3.2. + python_enable_pyc + + distutils_src_test + + python_disable_pyc + find build-* -name "*.pyc" -print0 | xargs -0 rm -f + find build-* -name "__pycache__" -print0 | xargs -0 rmdir +} + +src_install() { + DONT_PATCH_SETUPTOOLS="1" distutils_src_install +} |