Permalink
Browse files

ENH: add setuptools-0.6.25

  • Loading branch information...
1 parent 3963d36 commit 6fbfe489274228116a6398310c4f385da49a859b @npinto committed Mar 13, 2012

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,8 @@
+AUX distribute-0.6.12-disable_versioned_easy_install.patch 303 RMD160 e66cc81d50c4069f6cec5222280f2e8ae514753c SHA1 5b02f41ac641bc2e3e55f55b713c2c8a48e3730b SHA256 cd1eea81e845f891316006527becacaa3f1f511e41b8fec5a6b01954fbe997a9
+AUX distribute-0.6.12-fix_deprecation_warnings.patch 4846 RMD160 13b93e767610c9233495932f7e0bde397687da71 SHA1 7da66412f4995b9ea30b7e0da2b57785048a71f3 SHA256 e2f340ddf4ca98b1a5dd4fe342f7434232dffe17bf38a2fcdcc9f4377e4826fb
+AUX distribute-0.6.16-fix_deprecation_warnings.patch 4880 RMD160 0b2457f386e38c58a1d2161ada3051637a1e3d86 SHA1 a3f83f340f4955e52d798d06547e4568842c9483 SHA256 abf78f789b846c32e1e857b3f50347034b68592a7d0e12d34a3d9d463323dfcd
+AUX setuptools-0.6_rc7-noexe.patch 351 RMD160 6c978d3494b1025e8730796a923dd69f5872a823 SHA1 0f63e1a885f37aca375023ca845de3d7044e7c9d SHA256 772731de7539b71d45da2ac77062965c1ea36294781d4113a2845868b98d8b83
+DIST distribute-0.6.25.tar.gz 629502 RMD160 ae458b80f3fa8c8624b1a2c04787c4209fe6562d SHA1 6f402212f294840468d80dc154ebd454e76eba4b SHA256 ed11ff44b68b8dd274f11d7d5ca1659620be0620fb7dc305b3d39b0742788c31
+EBUILD setuptools-0.6.25.ebuild 1653 RMD160 beddc54a96c08ba9ff38440aee338a46da3a814f SHA1 41f7d55e3dcfc0e54568a62bf73af3de632582b9 SHA256 2bdc52688459f6d06b6005b5a94f9ddf600c191b27fd98f9539e6671e6790757
+MISC ChangeLog 21582 RMD160 82f126cf3d357c6c30e88dd663998498b6e18cd0 SHA1 1e713326520adff9b508fd4ad770e86cfb4df267 SHA256 c061f138ddf161bc6bbbea4632770ed3bc8ba553ec748f4879f6fc0d615e1c56
+MISC metadata.xml 160 RMD160 e730f96ab97c5be577a6d6d05f04990374a0dffb SHA1 2aa5e6be9c265c0e7bceb78ee9fd20df5f818e36 SHA256 6cd954a9de2307c57d32b25fa3599dee2908a4ddc6a98594f593d53577307a3a
@@ -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":
@@ -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":
@@ -0,0 +1,123 @@
+--- pkg_resources.py
++++ pkg_resources.py
+@@ -210,9 +210,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,9 +15,22 @@
+ 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 get_platform
+ 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
+@@ -1348,8 +1361,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 HAS_USER_SITE:
@@ -0,0 +1,10 @@
+--- setup.py 2007-09-04 19:18:46.000000000 +0300
++++ setup.py 2007-11-04 09:49:18.000000000 +0200
+@@ -26,7 +26,6 @@
+ url = "http://pypi.python.org/pypi/setuptools",
+ test_suite = 'setuptools.tests',
+ packages = find_packages(),
+- package_data = {'setuptools':['*.exe']},
+
+ py_modules = ['pkg_resources', 'easy_install', 'site'],
+
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>python</herd>
+</pkgmetadata>
@@ -0,0 +1,54 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+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="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="PSF-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS="README.txt docs/easy_install.txt docs/pkg_resources.txt docs/setuptools.txt"
+PYTHON_MODNAME="easy_install.py pkg_resources.py setuptools site.py"
+
+src_prepare() {
+ distutils_src_prepare
+
+ epatch "${FILESDIR}/${PN}-0.6_rc7-noexe.patch"
+ epatch "${FILESDIR}/distribute-0.6.16-fix_deprecation_warnings.patch"
+
+ # Disable tests requiring network connection.
+ rm -f setuptools/tests/test_packageindex.py
+}
+
+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 "(" -name "*.pyc" -o -name "*\$py.class" ")" -print0 | xargs -0 rm -f
+ find -name "__pycache__" -print0 | xargs -0 rmdir
+}
+
+src_install() {
+ DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT="1" DONT_PATCH_SETUPTOOLS="1" distutils_src_install
+}

0 comments on commit 6fbfe48

Please sign in to comment.