[arch-commits] Commit in python-distribute/trunk (3 files)

Stéphane Gaudreault stephane at archlinux.org
Tue May 3 17:48:09 UTC 2011


    Date: Tuesday, May 3, 2011 @ 13:48:08
  Author: stephane
Revision: 122277

upgpkg: python-distribute 0.6.16-1
version bump, fix deprecation warnings

Added:
  python-distribute/trunk/distribute-0.6.16-fix_deprecation_warnings.patch
Modified:
  python-distribute/trunk/PKGBUILD
  python-distribute/trunk/distribute-python2_and_3.patch

--------------------------------------------------+
 PKGBUILD                                         |   18 +-
 distribute-0.6.16-fix_deprecation_warnings.patch |  127 +++++++++++++++++++++
 distribute-python2_and_3.patch                   |   30 ++--
 3 files changed, 153 insertions(+), 22 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-05-03 16:27:27 UTC (rev 122276)
+++ PKGBUILD	2011-05-03 17:48:08 UTC (rev 122277)
@@ -3,31 +3,37 @@
 # Contributor: Sebastien Binet <binet at farnsworth>
 pkgbase=python-distribute
 pkgname=('python-distribute' 'python2-distribute')
-pkgver=0.6.15
-pkgrel=3
+pkgver=0.6.16
+pkgrel=1
 pkgdesc="Easily build and distribute Python packages"
 arch=('any')
 license=('PSF')
 url="http://pypi.python.org/pypi/distribute"
 makedepends=('python' 'python2')
 source=(http://pypi.python.org/packages/source/d/distribute/distribute-${pkgver}.tar.gz
+        distribute-0.6.16-fix_deprecation_warnings.patch
         distribute-python2_and_3.patch)
-sha1sums=('af088df456ea6b25c0e23647648fd317ed6e0d1b'
-          'de635febfb11dc6878e5bdbac4a0e1d539c19d79')
+sha1sums=('d31026d1b80f6340d4a85b9b45e5a5703d443104'
+          'a20bb3f35a03847ebe02199f2ce1a1c3883ef171' 
+          'bcdafbe9b74b4bc2fbb866a3383a2b40c8f72543')
 
 build() {
    cd "${srcdir}"
+
+   pushd distribute-${pkgver}
+   patch -Np1 -i ../distribute-python2_and_3.patch
+   patch -Np1 -i ../distribute-0.6.16-fix_deprecation_warnings.patch
+   popd
+
    cp -a distribute-${pkgver}{,-python2}
 
    # Build python 3 module
    cd distribute-${pkgver}
-   patch -Np1 -i ../distribute-python2_and_3.patch
    python setup.py build
    python setup.py test
 
    # Build python 2 module
    cd ../distribute-${pkgver}-python2
-   patch -Np1 -i ../distribute-python2_and_3.patch
    python2 setup.py build
    python2 setup.py test
 }

Added: distribute-0.6.16-fix_deprecation_warnings.patch
===================================================================
--- distribute-0.6.16-fix_deprecation_warnings.patch	                        (rev 0)
+++ distribute-0.6.16-fix_deprecation_warnings.patch	2011-05-03 17:48:08 UTC (rev 122277)
@@ -0,0 +1,127 @@
+diff -Naur distribute-0.6.16.ori/pkg_resources.py distribute-0.6.16/pkg_resources.py
+--- distribute-0.6.16.ori/pkg_resources.py	2010-07-31 12:28:15.000000000 -0700
++++ distribute-0.6.16/pkg_resources.py	2011-05-03 10:29:38.757750390 -0700
+@@ -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-'):
+diff -Naur distribute-0.6.16.ori/setuptools/command/bdist_egg.py distribute-0.6.16/setuptools/command/bdist_egg.py
+--- distribute-0.6.16.ori/setuptools/command/bdist_egg.py	2011-03-18 07:32:22.000000000 -0700
++++ distribute-0.6.16/setuptools/command/bdist_egg.py	2011-05-03 10:29:38.757750390 -0700
+@@ -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:
+diff -Naur distribute-0.6.16.ori/setuptools/command/build_ext.py distribute-0.6.16/setuptools/command/build_ext.py
+--- distribute-0.6.16.ori/setuptools/command/build_ext.py	2010-07-31 12:28:15.000000000 -0700
++++ distribute-0.6.16/setuptools/command/build_ext.py	2011-05-03 10:29:38.757750390 -0700
+@@ -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)
+ 
+diff -Naur distribute-0.6.16.ori/setuptools/command/easy_install.py distribute-0.6.16/setuptools/command/easy_install.py
+--- distribute-0.6.16.ori/setuptools/command/easy_install.py	2011-04-28 06:33:30.000000000 -0700
++++ distribute-0.6.16/setuptools/command/easy_install.py	2011-05-03 10:29:38.757750390 -0700
+@@ -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:

Modified: distribute-python2_and_3.patch
===================================================================
--- distribute-python2_and_3.patch	2011-05-03 16:27:27 UTC (rev 122276)
+++ distribute-python2_and_3.patch	2011-05-03 17:48:08 UTC (rev 122277)
@@ -1,19 +1,17 @@
-diff -Naur distribute-0.6.14.ori//distribute.egg-info/entry_points.txt distribute-0.6.14/distribute.egg-info/entry_points.txt
---- distribute-0.6.14.ori//distribute.egg-info/entry_points.txt	2010-07-14 20:14:10.000000000 -0400
-+++ distribute-0.6.14/distribute.egg-info/entry_points.txt	2010-10-21 09:26:43.386667396 -0400
-@@ -31,7 +31,8 @@
- depends.txt = setuptools.command.egg_info:warn_depends_obsolete
- 
+diff -Naur distribute-0.6.16.ori/distribute.egg-info/entry_points.txt distribute-0.6.16/distribute.egg-info/entry_points.txt
+--- distribute-0.6.16.ori/distribute.egg-info/entry_points.txt	2011-04-30 06:11:02.000000000 -0700
++++ distribute-0.6.16/distribute.egg-info/entry_points.txt	2011-05-03 10:35:31.027759028 -0700
+@@ -33,6 +33,7 @@
  [console_scripts]
--easy_install = setuptools.command.easy_install:main
-+easy_install-3.1 = setuptools.command.easy_install:main
-+easy_install-2.7 = setuptools.command.easy_install:main
- easy_install-2.6 = setuptools.command.easy_install:main
+ easy_install = setuptools.command.easy_install:main
+ easy_install-2.7 = setuptools.command.easy_install:main
++easy_install-3.2 = setuptools.command.easy_install:main
  
  [setuptools.file_finders]
-diff -Naur distribute-0.6.14.ori//distribute_setup.py distribute-0.6.14/distribute_setup.py
---- distribute-0.6.14.ori//distribute_setup.py	2010-07-14 19:53:38.000000000 -0400
-+++ distribute-0.6.14/distribute_setup.py	2010-10-21 09:25:18.356667404 -0400
+ svn_cvs = setuptools.command.sdist:_default_revctrl
+diff -Naur distribute-0.6.16.ori/distribute_setup.py distribute-0.6.16/distribute_setup.py
+--- distribute-0.6.16.ori/distribute_setup.py	2011-03-18 07:32:22.000000000 -0700
++++ distribute-0.6.16/distribute_setup.py	2011-05-03 10:36:38.231094059 -0700
 @@ -299,8 +299,7 @@
          log.warn('Could not find the install location')
          return
@@ -24,9 +22,9 @@
      pkg_info = os.path.join(placeholder, setuptools_file)
      if os.path.exists(pkg_info):
          log.warn('%s already exists', pkg_info)
-diff -Naur distribute-0.6.14.ori//setup.py distribute-0.6.14/setup.py
---- distribute-0.6.14.ori//setup.py	2010-07-14 19:53:38.000000000 -0400
-+++ distribute-0.6.14/setup.py	2010-10-21 09:32:44.850000736 -0400
+diff -Naur distribute-0.6.16.ori/setup.py distribute-0.6.16/setup.py
+--- distribute-0.6.16.ori/setup.py	2011-03-18 07:32:22.000000000 -0700
++++ distribute-0.6.16/setup.py	2011-05-03 10:36:38.231094059 -0700
 @@ -96,6 +96,8 @@
                  f.close()
  




More information about the arch-commits mailing list