From 23f99bf14f8b6c80d359c4facc6496ab14cd3d80 Mon Sep 17 00:00:00 2001 From: zooko Date: Sun, 17 Jul 2011 08:28:56 +0530 Subject: [PATCH] copy in the latest version of zetuptoolz from the tahoe-lafs project Ignore-this: 7bbb139eb0632cb155d53700cf4239be darcs-hash:3b547744d3acb475b2d1c9e7991196ec88030d14 --- .../EGG-INFO/PKG-INFO | 183 ----------- .../EGG-INFO/PKG-INFO | 100 ++++++ .../EGG-INFO/SOURCES.txt | 1 + .../EGG-INFO/dependency_links.txt | 0 .../EGG-INFO/entry_points.txt | 5 +- .../EGG-INFO/top_level.txt | 0 .../EGG-INFO/zip-safe | 0 .../easy_install.py | 0 .../pkg_resources.py | 52 +++- .../setuptools/__init__.py | 10 +- .../setuptools/archive_util.py | 0 .../setuptools/cli.exe | Bin .../setuptools/command/__init__.py | 2 +- .../setuptools/command/alias.py | 0 .../setuptools/command/bdist_egg.py | 0 .../setuptools/command/bdist_rpm.py | 0 .../setuptools/command/bdist_wininst.py | 0 .../setuptools/command/build_ext.py | 0 .../setuptools/command/build_py.py | 6 + .../setuptools/command/develop.py | 11 +- .../setuptools/command/easy_install.py | 147 ++++----- .../setuptools/command/egg_info.py | 0 .../setuptools/command/install.py | 12 +- .../setuptools/command/install_egg_info.py | 0 .../setuptools/command/install_lib.py | 0 .../setuptools/command/install_scripts.py | 0 .../setuptools/command/register.py | 0 .../setuptools/command/rotate.py | 0 .../setuptools/command/saveopts.py | 0 .../setuptools/command/scriptsetup.py | 284 ++++++++++++++++++ .../setuptools/command/sdist.py | 0 .../setuptools/command/setopt.py | 0 .../setuptools/command/test.py | 0 .../setuptools/command/upload.py | 0 .../setuptools/depends.py | 0 .../setuptools/dist.py | 0 .../setuptools/extension.py | 0 .../setuptools/package_index.py | 43 ++- .../setuptools/sandbox.py | 0 .../setuptools/site-patch.py | 0 .../setuptools/tests/__init__.py | 0 .../setuptools/tests/test_packageindex.py | 0 .../setuptools/tests/test_resources.py | 0 zfec/setuptools-0.6c16dev3.egg/zetuptoolz.txt | 93 ++++++ 44 files changed, 658 insertions(+), 291 deletions(-) delete mode 100644 zfec/setuptools-0.6c15dev.egg/EGG-INFO/PKG-INFO create mode 100644 zfec/setuptools-0.6c16dev3.egg/EGG-INFO/PKG-INFO rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/EGG-INFO/SOURCES.txt (97%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/EGG-INFO/dependency_links.txt (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/EGG-INFO/entry_points.txt (93%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/EGG-INFO/top_level.txt (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/EGG-INFO/zip-safe (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/easy_install.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/pkg_resources.py (98%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/__init__.py (89%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/archive_util.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/cli.exe (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/__init__.py (92%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/alias.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/bdist_egg.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/bdist_rpm.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/bdist_wininst.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/build_ext.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/build_py.py (97%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/develop.py (96%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/easy_install.py (93%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/egg_info.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/install.py (95%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/install_egg_info.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/install_lib.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/install_scripts.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/register.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/rotate.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/saveopts.py (100%) create mode 100644 zfec/setuptools-0.6c16dev3.egg/setuptools/command/scriptsetup.py rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/sdist.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/setopt.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/test.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/command/upload.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/depends.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/dist.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/extension.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/package_index.py (94%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/sandbox.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/site-patch.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/tests/__init__.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/tests/test_packageindex.py (100%) rename zfec/{setuptools-0.6c15dev.egg => setuptools-0.6c16dev3.egg}/setuptools/tests/test_resources.py (100%) create mode 100644 zfec/setuptools-0.6c16dev3.egg/zetuptoolz.txt diff --git a/zfec/setuptools-0.6c15dev.egg/EGG-INFO/PKG-INFO b/zfec/setuptools-0.6c15dev.egg/EGG-INFO/PKG-INFO deleted file mode 100644 index 019cb4c..0000000 --- a/zfec/setuptools-0.6c15dev.egg/EGG-INFO/PKG-INFO +++ /dev/null @@ -1,183 +0,0 @@ -Metadata-Version: 1.0 -Name: setuptools -Version: 0.6c15dev -Summary: Download, build, install, upgrade, and uninstall Python packages -- easily! -Home-page: http://pypi.python.org/pypi/setuptools -Author: Phillip J. Eby -Author-email: distutils-sig@python.org -License: PSF or ZPL -Description: =============================== - Installing and Using Setuptools - =============================== - - .. contents:: **Table of Contents** - - - ------------------------- - Installation Instructions - ------------------------- - - Windows - ======= - - Install setuptools using the provided ``.exe`` installer. If you've previously - installed older versions of setuptools, please delete all ``setuptools*.egg`` - and ``setuptools.pth`` files from your system's ``site-packages`` directory - (and any other ``sys.path`` directories) FIRST. - - If you are upgrading a previous version of setuptools that was installed using - an ``.exe`` installer, please be sure to also *uninstall that older version* - via your system's "Add/Remove Programs" feature, BEFORE installing the newer - version. - - Once installation is complete, you will find an ``easy_install.exe`` program in - your Python ``Scripts`` subdirectory. Be sure to add this directory to your - ``PATH`` environment variable, if you haven't already done so. - - - RPM-Based Systems - ================= - - Install setuptools using the provided source RPM. The included ``.spec`` file - assumes you are installing using the default ``python`` executable, and is not - specific to a particular Python version. The ``easy_install`` executable will - be installed to a system ``bin`` directory such as ``/usr/bin``. - - If you wish to install to a location other than the default Python - installation's default ``site-packages`` directory (and ``$prefix/bin`` for - scripts), please use the ``.egg``-based installation approach described in the - following section. - - - Cygwin, Mac OS X, Linux, Other - ============================== - - 1. Download the appropriate egg for your version of Python (e.g. - ``setuptools-0.6c9-py2.4.egg``). Do NOT rename it. - - 2. Run it as if it were a shell script, e.g. ``sh setuptools-0.6c9-py2.4.egg``. - Setuptools will install itself using the matching version of Python (e.g. - ``python2.4``), and will place the ``easy_install`` executable in the - default location for installing Python scripts (as determined by the - standard distutils configuration files, or by the Python installation). - - If you want to install setuptools to somewhere other than ``site-packages`` or - your default distutils installation locations for libraries and scripts, you - may include EasyInstall command-line options such as ``--prefix``, - ``--install-dir``, and so on, following the ``.egg`` filename on the same - command line. For example:: - - sh setuptools-0.6c9-py2.4.egg --prefix=~ - - You can use ``--help`` to get a full options list, but we recommend consulting - the `EasyInstall manual`_ for detailed instructions, especially `the section - on custom installation locations`_. - - .. _EasyInstall manual: http://peak.telecommunity.com/DevCenter/EasyInstall - .. _the section on custom installation locations: http://peak.telecommunity.com/DevCenter/EasyInstall#custom-installation-locations - - - Cygwin Note - ----------- - - If you are trying to install setuptools for the **Windows** version of Python - (as opposed to the Cygwin version that lives in ``/usr/bin``), you must make - sure that an appropriate executable (``python2.3``, ``python2.4``, or - ``python2.5``) is on your **Cygwin** ``PATH`` when invoking the egg. For - example, doing the following at a Cygwin bash prompt will install setuptools - for the **Windows** Python found at ``C:\\Python24``:: - - ln -s /cygdrive/c/Python24/python.exe python2.4 - PATH=.:$PATH sh setuptools-0.6c9-py2.4.egg - rm python2.4 - - - Downloads - ========= - - All setuptools downloads can be found at `the project's home page in the Python - Package Index`_. Scroll to the very bottom of the page to find the links. - - .. _the project's home page in the Python Package Index: http://pypi.python.org/pypi/setuptools#files - - In addition to the PyPI downloads, the development version of ``setuptools`` - is available from the `Python SVN sandbox`_, and in-development versions of the - `0.6 branch`_ are available as well. - - .. _0.6 branch: http://svn.python.org/projects/sandbox/branches/setuptools-0.6/#egg=setuptools-dev06 - - .. _Python SVN sandbox: http://svn.python.org/projects/sandbox/trunk/setuptools/#egg=setuptools-dev - - -------------------------------- - Using Setuptools and EasyInstall - -------------------------------- - - Here are some of the available manuals, tutorials, and other resources for - learning about Setuptools, Python Eggs, and EasyInstall: - - * `The EasyInstall user's guide and reference manual`_ - * `The setuptools Developer's Guide`_ - * `The pkg_resources API reference`_ - * `Package Compatibility Notes`_ (user-maintained) - * `The Internal Structure of Python Eggs`_ - - Questions, comments, and bug reports should be directed to the `distutils-sig - mailing list`_. If you have written (or know of) any tutorials, documentation, - plug-ins, or other resources for setuptools users, please let us know about - them there, so this reference list can be updated. If you have working, - *tested* patches to correct problems or add features, you may submit them to - the `setuptools bug tracker`_. - - .. _setuptools bug tracker: http://bugs.python.org/setuptools/ - .. _Package Compatibility Notes: http://peak.telecommunity.com/DevCenter/PackageNotes - .. _The Internal Structure of Python Eggs: http://peak.telecommunity.com/DevCenter/EggFormats - .. _The setuptools Developer's Guide: http://peak.telecommunity.com/DevCenter/setuptools - .. _The pkg_resources API reference: http://peak.telecommunity.com/DevCenter/PkgResources - .. _The EasyInstall user's guide and reference manual: http://peak.telecommunity.com/DevCenter/EasyInstall - .. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/ - - - ------- - Credits - ------- - - * The original design for the ``.egg`` format and the ``pkg_resources`` API was - co-created by Phillip Eby and Bob Ippolito. Bob also implemented the first - version of ``pkg_resources``, and supplied the OS X operating system version - compatibility algorithm. - - * Ian Bicking implemented many early "creature comfort" features of - easy_install, including support for downloading via Sourceforge and - Subversion repositories. Ian's comments on the Web-SIG about WSGI - application deployment also inspired the concept of "entry points" in eggs, - and he has given talks at PyCon and elsewhere to inform and educate the - community about eggs and setuptools. - - * Jim Fulton contributed time and effort to build automated tests of various - aspects of ``easy_install``, and supplied the doctests for the command-line - ``.exe`` wrappers on Windows. - - * Phillip J. Eby is the principal author and maintainer of setuptools, and - first proposed the idea of an importable binary distribution format for - Python application plug-ins. - - * Significant parts of the implementation of setuptools were funded by the Open - Source Applications Foundation, to provide a plug-in infrastructure for the - Chandler PIM application. In addition, many OSAF staffers (such as Mike - "Code Bear" Taylor) contributed their time and stress as guinea pigs for the - use of eggs and setuptools, even before eggs were "cool". (Thanks, guys!) - - .. _files: - -Keywords: CPAN PyPI distutils eggs package management -Platform: UNKNOWN -Classifier: Development Status :: 3 - Alpha -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: Python Software Foundation License -Classifier: License :: OSI Approved :: Zope Public License -Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python -Classifier: Topic :: Software Development :: Libraries :: Python Modules -Classifier: Topic :: System :: Archiving :: Packaging -Classifier: Topic :: System :: Systems Administration -Classifier: Topic :: Utilities diff --git a/zfec/setuptools-0.6c16dev3.egg/EGG-INFO/PKG-INFO b/zfec/setuptools-0.6c16dev3.egg/EGG-INFO/PKG-INFO new file mode 100644 index 0000000..c9df489 --- /dev/null +++ b/zfec/setuptools-0.6c16dev3.egg/EGG-INFO/PKG-INFO @@ -0,0 +1,100 @@ +Metadata-Version: 1.0 +Name: setuptools +Version: 0.6c16dev3 +Summary: Download, build, install, upgrade, and uninstall Python packages -- easily! (zetuptoolz fork) +Home-page: http://pypi.python.org/pypi/setuptools +Author: Phillip J. Eby +Author-email: distutils-sig@python.org +License: PSF or ZPL +Description: ====================== + This is not Setuptools + ====================== + + This is the ``zetuptoolz`` fork of setuptools, which is used to install + `Tahoe-LAFS`_. It has a `darcs source repository`_ and `issue tracker`_. + + For a list of differences between this fork and setuptools, see zetuptoolz.txt. + + Note that, to avoid interfering with any setuptools installation, zetuptoolz + does not install a script called ``easy_install``. There is an ``easy_install_z`` + script, but that is intended only for developers to test differences between + setuptools and zetuptoolz. + + .. _Tahoe-LAFS: http://tahoe-lafs.org/ + .. _darcs source repository: http://tahoe-lafs.org/source/zetuptoolz/trunk + .. _issue tracker: http://tahoe-lafs.org/trac/zetuptoolz + + + -------------------------------- + Using Setuptools and EasyInstall + -------------------------------- + + Here are some of the available manuals, tutorials, and other resources for + learning about Setuptools, Python Eggs, and EasyInstall: + + * `The EasyInstall user's guide and reference manual`_ + * `The setuptools Developer's Guide`_ + * `The pkg_resources API reference`_ + * `Package Compatibility Notes`_ (user-maintained) + * `The Internal Structure of Python Eggs`_ + + Questions, comments, and bug reports should be directed to the `distutils-sig + mailing list`_. If you have written (or know of) any tutorials, documentation, + plug-ins, or other resources for setuptools users, please let us know about + them there, so this reference list can be updated. If you have working, + *tested* patches to correct problems or add features, you may submit them to + the `setuptools bug tracker`_. + + .. _setuptools bug tracker: http://bugs.python.org/setuptools/ + .. _Package Compatibility Notes: http://peak.telecommunity.com/DevCenter/PackageNotes + .. _The Internal Structure of Python Eggs: http://peak.telecommunity.com/DevCenter/EggFormats + .. _The setuptools Developer's Guide: http://peak.telecommunity.com/DevCenter/setuptools + .. _The pkg_resources API reference: http://peak.telecommunity.com/DevCenter/PkgResources + .. _The EasyInstall user's guide and reference manual: http://peak.telecommunity.com/DevCenter/EasyInstall + .. _distutils-sig mailing list: http://mail.python.org/pipermail/distutils-sig/ + + + ------- + Credits + ------- + + * The original design for the ``.egg`` format and the ``pkg_resources`` API was + co-created by Phillip Eby and Bob Ippolito. Bob also implemented the first + version of ``pkg_resources``, and supplied the OS X operating system version + compatibility algorithm. + + * Ian Bicking implemented many early "creature comfort" features of + easy_install, including support for downloading via Sourceforge and + Subversion repositories. Ian's comments on the Web-SIG about WSGI + application deployment also inspired the concept of "entry points" in eggs, + and he has given talks at PyCon and elsewhere to inform and educate the + community about eggs and setuptools. + + * Jim Fulton contributed time and effort to build automated tests of various + aspects of ``easy_install``, and supplied the doctests for the command-line + ``.exe`` wrappers on Windows. + + * Phillip J. Eby is the principal author and maintainer of setuptools, and + first proposed the idea of an importable binary distribution format for + Python application plug-ins. + + * Significant parts of the implementation of setuptools were funded by the Open + Source Applications Foundation, to provide a plug-in infrastructure for the + Chandler PIM application. In addition, many OSAF staffers (such as Mike + "Code Bear" Taylor) contributed their time and stress as guinea pigs for the + use of eggs and setuptools, even before eggs were "cool". (Thanks, guys!) + + .. _files: + +Keywords: CPAN PyPI distutils eggs package management +Platform: UNKNOWN +Classifier: Development Status :: 3 - Alpha +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: Python Software Foundation License +Classifier: License :: OSI Approved :: Zope Public License +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Classifier: Topic :: System :: Archiving :: Packaging +Classifier: Topic :: System :: Systems Administration +Classifier: Topic :: Utilities diff --git a/zfec/setuptools-0.6c15dev.egg/EGG-INFO/SOURCES.txt b/zfec/setuptools-0.6c16dev3.egg/EGG-INFO/SOURCES.txt similarity index 97% rename from zfec/setuptools-0.6c15dev.egg/EGG-INFO/SOURCES.txt rename to zfec/setuptools-0.6c16dev3.egg/EGG-INFO/SOURCES.txt index 74f5d2b..07bd4ff 100644 --- a/zfec/setuptools-0.6c15dev.egg/EGG-INFO/SOURCES.txt +++ b/zfec/setuptools-0.6c16dev3.egg/EGG-INFO/SOURCES.txt @@ -34,6 +34,7 @@ setuptools/command/install_scripts.py setuptools/command/register.py setuptools/command/rotate.py setuptools/command/saveopts.py +setuptools/command/scriptsetup.py setuptools/command/sdist.py setuptools/command/setopt.py setuptools/command/test.py diff --git a/zfec/setuptools-0.6c15dev.egg/EGG-INFO/dependency_links.txt b/zfec/setuptools-0.6c16dev3.egg/EGG-INFO/dependency_links.txt similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/EGG-INFO/dependency_links.txt rename to zfec/setuptools-0.6c16dev3.egg/EGG-INFO/dependency_links.txt diff --git a/zfec/setuptools-0.6c15dev.egg/EGG-INFO/entry_points.txt b/zfec/setuptools-0.6c16dev3.egg/EGG-INFO/entry_points.txt similarity index 93% rename from zfec/setuptools-0.6c15dev.egg/EGG-INFO/entry_points.txt rename to zfec/setuptools-0.6c16dev3.egg/EGG-INFO/entry_points.txt index 07d362c..0a31ba0 100644 --- a/zfec/setuptools-0.6c15dev.egg/EGG-INFO/entry_points.txt +++ b/zfec/setuptools-0.6c16dev3.egg/EGG-INFO/entry_points.txt @@ -4,6 +4,7 @@ rotate = setuptools.command.rotate:rotate develop = setuptools.command.develop:develop setopt = setuptools.command.setopt:setopt build_py = setuptools.command.build_py:build_py +scriptsetup = setuptools.command.scriptsetup:scriptsetup saveopts = setuptools.command.saveopts:saveopts egg_info = setuptools.command.egg_info:egg_info register = setuptools.command.register:register @@ -30,8 +31,8 @@ entry_points.txt = setuptools.command.egg_info:write_entries depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-2.5 = setuptools.command.easy_install:main +easy_install_z-2.6 = setuptools.command.easy_install:main +easy_install_z = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/zfec/setuptools-0.6c15dev.egg/EGG-INFO/top_level.txt b/zfec/setuptools-0.6c16dev3.egg/EGG-INFO/top_level.txt similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/EGG-INFO/top_level.txt rename to zfec/setuptools-0.6c16dev3.egg/EGG-INFO/top_level.txt diff --git a/zfec/setuptools-0.6c15dev.egg/EGG-INFO/zip-safe b/zfec/setuptools-0.6c16dev3.egg/EGG-INFO/zip-safe similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/EGG-INFO/zip-safe rename to zfec/setuptools-0.6c16dev3.egg/EGG-INFO/zip-safe diff --git a/zfec/setuptools-0.6c15dev.egg/easy_install.py b/zfec/setuptools-0.6c16dev3.egg/easy_install.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/easy_install.py rename to zfec/setuptools-0.6c16dev3.egg/easy_install.py diff --git a/zfec/setuptools-0.6c15dev.egg/pkg_resources.py b/zfec/setuptools-0.6c16dev3.egg/pkg_resources.py similarity index 98% rename from zfec/setuptools-0.6c15dev.egg/pkg_resources.py rename to zfec/setuptools-0.6c16dev3.egg/pkg_resources.py index 83e346b..00d9722 100644 --- a/zfec/setuptools-0.6c15dev.egg/pkg_resources.py +++ b/zfec/setuptools-0.6c16dev3.egg/pkg_resources.py @@ -13,7 +13,7 @@ The package resource API is designed to work with normal filesystem packages, method. """ -import sys, os, zipimport, time, re, imp, new, pkgutil # XXX +import sys, os, zipimport, time, re, imp try: frozenset @@ -524,6 +524,16 @@ class WorkingSet(object): if dist.key in self.by_key: return # ignore hidden distros + # If we have a __requires__ then we can already tell if this + # dist is unsatisfactory, in which case we won't add it. + if __requires__ is not None: + for thisreqstr in __requires__: + for thisreq in parse_requirements(thisreqstr): + if thisreq.key == dist.key: + if dist not in thisreq: + return + + self.by_key[dist.key] = dist if dist.key not in keys: keys.append(dist.key) @@ -783,19 +793,33 @@ class Environment(object): This calls the ``find(req)`` method of the `working_set` to see if a suitable distribution is already active. (This may raise ``VersionConflict`` if an unsuitable version of the project is already - active in the specified `working_set`.) If a suitable distribution - isn't active, this method returns the newest distribution in the - environment that meets the ``Requirement`` in `req`. If no suitable - distribution is found, and `installer` is supplied, then the result of - calling the environment's ``obtain(req, installer)`` method will be - returned. + active in the specified `working_set`.) + + If a suitable distribution isn't active, this method returns the + newest platform-dependent distribution in the environment that meets + the ``Requirement`` in `req`. If no suitable platform-dependent + distribution is found, then the newest platform-independent + distribution that meets the requirement is returned. (A platform- + dependent distribution will typically have code compiled or + specialized for that platform.) + + Otherwise, if `installer` is supplied, then the result of calling the + environment's ``obtain(req, installer)`` method will be returned. """ dist = working_set.find(req) if dist is not None: return dist + + # first try to find a platform-dependent dist + for dist in self[req.key]: + if dist in req and dist.platform is not None: + return dist + + # then try any other dist for dist in self[req.key]: if dist in req: return dist + return self.obtain(req, installer) # try and download/install def obtain(self, requirement, installer=None): @@ -2591,6 +2615,7 @@ def _initialize(g): _initialize(globals()) # Prepare the master working set and make the ``require()`` API available +__requires__ = None _declare_state('object', working_set = WorkingSet()) try: # Does the main program list any requirements? @@ -2601,12 +2626,15 @@ else: # Yes: ensure the requirements are met, by prefixing sys.path if necessary try: working_set.require(__requires__) - except VersionConflict: # try it without defaults already on sys.path + except (VersionConflict, DistributionNotFound): # try it without defaults already on sys.path working_set = WorkingSet([]) # by starting with an empty path - for dist in working_set.resolve( - parse_requirements(__requires__), Environment() - ): - working_set.add(dist) + try: + for dist in working_set.resolve( + parse_requirements(__requires__), Environment() + ): + working_set.add(dist) + except DistributionNotFound: + pass for entry in sys.path: # add any missing entries from sys.path if entry not in working_set.entries: working_set.add_entry(entry) diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/__init__.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/__init__.py similarity index 89% rename from zfec/setuptools-0.6c15dev.egg/setuptools/__init__.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/__init__.py index c8e461f..d57448f 100644 --- a/zfec/setuptools-0.6c15dev.egg/setuptools/__init__.py +++ b/zfec/setuptools-0.6c16dev3.egg/setuptools/__init__.py @@ -6,8 +6,10 @@ from setuptools.depends import Require from distutils.core import Command as _Command from distutils.util import convert_path import os.path +import os +import sys -__version__ = '0.6c15' +__version__ = '0.6c16dev3' __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', 'find_packages' @@ -80,3 +82,9 @@ import distutils.filelist distutils.filelist.findall = findall # fix findall bug in distutils. +# sys.dont_write_bytecode was introduced in Python 2.6. +if ((hasattr(sys, "dont_write_bytecode") and sys.dont_write_bytecode) or + (not hasattr(sys, "dont_write_bytecode") and os.environ.get("PYTHONDONTWRITEBYTECODE"))): + _dont_write_bytecode = True +else: + _dont_write_bytecode = False diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/archive_util.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/archive_util.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/archive_util.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/archive_util.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/cli.exe b/zfec/setuptools-0.6c16dev3.egg/setuptools/cli.exe similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/cli.exe rename to zfec/setuptools-0.6c16dev3.egg/setuptools/cli.exe diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/__init__.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/__init__.py similarity index 92% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/__init__.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/__init__.py index dfed693..80969f3 100644 --- a/zfec/setuptools-0.6c15dev.egg/setuptools/command/__init__.py +++ b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/__init__.py @@ -2,7 +2,7 @@ __all__ = [ 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop', 'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts', 'sdist', 'setopt', 'test', 'upload', 'install_egg_info', 'install_scripts', - 'register', 'bdist_wininst', + 'register', 'bdist_wininst', 'scriptsetup', ] import sys diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/alias.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/alias.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/alias.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/alias.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/bdist_egg.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/bdist_egg.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/bdist_egg.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/bdist_egg.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/bdist_rpm.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/bdist_rpm.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/bdist_rpm.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/bdist_rpm.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/bdist_wininst.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/bdist_wininst.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/bdist_wininst.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/bdist_wininst.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/build_ext.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/build_ext.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/build_ext.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/build_ext.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/build_py.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/build_py.py similarity index 97% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/build_py.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/build_py.py index aadbc55..c5e3d7f 100644 --- a/zfec/setuptools-0.6c15dev.egg/setuptools/command/build_py.py +++ b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/build_py.py @@ -19,6 +19,12 @@ class build_py(_build_py): if 'data_files' in self.__dict__: del self.__dict__['data_files'] def run(self): + self.old_run() + if sys.platform == "win32": + from setuptools.command.scriptsetup import do_scriptsetup + do_scriptsetup() + + def old_run(self): """Build modules, packages, and copy data files to build directory""" if not self.py_modules and not self.packages: return diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/develop.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/develop.py similarity index 96% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/develop.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/develop.py index 429ad8e..303f488 100644 --- a/zfec/setuptools-0.6c15dev.egg/setuptools/command/develop.py +++ b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/develop.py @@ -20,6 +20,12 @@ class develop(easy_install): command_consumes_arguments = False # override base def run(self): + self.old_run() + if sys.platform == "win32": + from setuptools.command.scriptsetup import do_scriptsetup + do_scriptsetup() + + def old_run(self): if self.uninstall: self.multi_version = True self.uninstall_link() @@ -34,11 +40,6 @@ class develop(easy_install): self.setup_path = None self.always_copy_from = '.' # always copy eggs installed in curdir - - - - - def finalize_options(self): ei = self.get_finalized_command("egg_info") if ei.broken_egg_info: diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/easy_install.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/easy_install.py similarity index 93% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/easy_install.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/easy_install.py index b2948d2..8ac42b4 100755 --- a/zfec/setuptools-0.6c15dev.egg/setuptools/command/easy_install.py +++ b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/easy_install.py @@ -11,7 +11,8 @@ __ http://peak.telecommunity.com/DevCenter/EasyInstall """ import sys, os.path, zipimport, shutil, tempfile, zipfile, re, stat, random from glob import glob -from setuptools import Command +from setuptools import Command, _dont_write_bytecode +from setuptools import __version__ as setuptools_version from setuptools.sandbox import run_setup from distutils import log, dir_util from distutils.sysconfig import get_python_lib @@ -573,7 +574,7 @@ Please make the appropriate changes for your system and try again. def install_wrapper_scripts(self, dist): if not self.exclude_scripts: - for args in get_script_args(dist): + for args in get_script_args(dist, script_dir=self.script_dir): self.write_script(*args) @@ -583,10 +584,11 @@ Please make the appropriate changes for your system and try again. spec = str(dist.as_requirement()) is_script = is_python_script(script_text, script_name) + requires = [spec] + [str(r) for r in dist.requires()] if is_script and dev_path: script_text = get_script_header(script_text) + ( "# EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r\n" - "__requires__ = %(spec)r\n" + "__requires__ = %(requires)r\n" "from pkg_resources import require; require(%(spec)r)\n" "del require\n" "__file__ = %(dev_path)r\n" @@ -595,7 +597,7 @@ Please make the appropriate changes for your system and try again. elif is_script: script_text = get_script_header(script_text) + ( "# EASY-INSTALL-SCRIPT: %(spec)r,%(script_name)r\n" - "__requires__ = %(spec)r\n" + "__requires__ = %(requires)r\n" "import pkg_resources\n" "pkg_resources.run_script(%(spec)r, %(script_name)r)\n" ) % locals() @@ -1007,6 +1009,9 @@ See the setuptools documentation for the "develop" command for more info. chmod(f, mode) def byte_compile(self, to_compile): + if _dont_write_bytecode: + self.warn('byte-compiling is disabled, skipping.') + return from distutils.util import byte_compile try: # try to make the byte compile messages quieter @@ -1086,10 +1091,14 @@ these changes you will not be able to run the installed code. log.debug("Checking existing site.py in %s", self.install_dir) current = open(sitepy,'rb').read() if not current.startswith('def __boot():'): - raise DistutilsError( - "%s is not a setuptools-generated site.py; please" - " remove it." % sitepy - ) + print ("\n" + "***********************************************************************\n" + "Warning: %s is not a\n" + "setuptools-generated site.py. It will not be overwritten.\n" + "***********************************************************************\n" + ) % (sitepy,) + self.sitepy_installed = True + return if current != source: log.info("Creating %s", sitepy) @@ -1564,86 +1573,86 @@ def fix_jython_executable(executable, options): return executable -def get_script_args(dist, executable=sys_executable, wininst=False): +def get_script_args(dist, executable=sys_executable, wininst=False, script_dir=None): """Yield write_script() argument tuples for a distribution's entrypoints""" spec = str(dist.as_requirement()) + requires = [spec] + [str(r) for r in dist.requires()] header = get_script_header("", executable, wininst) + generated_by = "# generated by zetuptoolz %s" % (setuptools_version,) + for group in 'console_scripts', 'gui_scripts': - for name,ep in dist.get_entry_map(group).items(): - script_text = ( + for name, ep in dist.get_entry_map(group).items(): + script_head, script_tail = (( "# EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r\n" - "__requires__ = %(spec)r\n" + "%(generated_by)s\n" + "__requires__ = %(requires)r\n" "import sys\n" "from pkg_resources import load_entry_point\n" "\n" + ) % locals(), ( "sys.exit(\n" " load_entry_point(%(spec)r, %(group)r, %(name)r)()\n" ")\n" - ) % locals() - if sys.platform=='win32' or wininst: - # On Windows/wininst, add a .py extension and an .exe launcher + ) % locals()) + + if wininst or sys.platform == "win32": + # On Windows/wininst, add a .py[w] extension. Delete any existing + # -script.py[w], .exe, and .exe.manifest. if group=='gui_scripts': - ext, launcher = '-script.pyw', 'gui.exe' - old = ['.pyw'] - new_header = re.sub('(?i)python.exe','pythonw.exe',header) + ext = '.pyw' + old = ['','.pyw','-script.pyw','.exe','.exe.manifest'] + which_python = 'pythonw.exe' + new_header = re.sub('(?i)python.exe', which_python, header) else: - ext, launcher = '-script.py', 'cli.exe' - old = ['.py','.pyc','.pyo'] - new_header = re.sub('(?i)pythonw.exe','python.exe',header) - - if os.path.exists(new_header[2:-1]) or sys.platform!='win32': + ext = '.pyscript' + old = ['','.pyscript','.py','.pyc','.pyo','-script.py','.exe','.exe.manifest'] + which_python = 'python.exe' + new_header = re.sub('(?i)pythonw.exe', which_python, header) + + len_ext = len(ext) + script_head += ( + "# If this script doesn't work for you, make sure that the %(ext)s\n" + "# extension is included in the PATHEXT environment variable, and is\n" + "# associated with %(which_python)s in the registry.\n" + "\n" + "if sys.argv[0].endswith(%(ext)r):\n" + " sys.argv[0] = sys.argv[0][:-%(len_ext)r]\n" + "\n" + ) % locals() + + if os.path.exists(new_header[2:-1]) or sys.platform != 'win32': hdr = new_header else: hdr = header - yield (name+ext, hdr+script_text, 't', [name+x for x in old]) - yield ( - name+'.exe', resource_string('setuptools', launcher), - 'b') # write in binary mode - yield (name+'.exe.manifest', _launcher_manifest % (name,), 't') + yield (name+ext, hdr + script_head + script_tail, 't', [name+x for x in old]) + + # Also write a shell script that runs the .pyscript, for cygwin. + # + # We can't use a Python script, because the Python interpreter that we want + # to use is the native Windows one, which won't understand a cygwin path. + # Windows paths written with forward slashes are universally understood + # (by native Python, cygwin Python, and bash), so we'll use 'cygpath -m' to + # get the directory from which the script was run in that form. This makes + # the cygwin script and .pyscript position-independent, provided they are + # in the same directory. + + def quote_path(s): + return "\\'".join("'" + p.replace('\\', '/') + "'" for p in s.split("'")) + + pyscript = quote_path("/"+name+ext) + python_path = quote_path(sys.executable) + shell_script_text = ( + '#!/bin/sh\n' + '%(generated_by)s\n' + '\n' + 'ScriptDir=`cygpath -m "$0/.."`\n' + '%(python_path)s "${ScriptDir}"%(pyscript)s "$@"\n' + ) % locals() + yield (name, shell_script_text, 'b') else: # On other platforms, we assume the right thing to do is to # just write the stub with no extension. - yield (name, header+script_text) - -_launcher_manifest = """ - - - - - - - - - - - - -""" - - - - - - - - - - - - - - - - - - - - - - + yield (name, header + script_head + script_tail) def rmtree(path, ignore_errors=False, onerror=auto_chmod): diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/egg_info.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/egg_info.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/egg_info.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/egg_info.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/install.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/install.py similarity index 95% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/install.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/install.py index a150c43..adaaeca 100644 --- a/zfec/setuptools-0.6c15dev.egg/setuptools/command/install.py +++ b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/install.py @@ -49,8 +49,13 @@ class install(_install): self.path_file = None self.extra_dirs = '' - def run(self): + self.old_run() + if sys.platform == "win32": + from setuptools.command.scriptsetup import do_scriptsetup + do_scriptsetup() + + def old_run(self): # Explicit request for old-style install? Just do it if self.old_and_unmanageable or self.single_version_externally_managed: return _install.run(self) @@ -75,11 +80,6 @@ class install(_install): else: self.do_egg_install() - - - - - def do_egg_install(self): easy_install = self.distribution.get_command_class('easy_install') diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/install_egg_info.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/install_egg_info.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/install_egg_info.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/install_egg_info.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/install_lib.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/install_lib.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/install_lib.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/install_lib.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/install_scripts.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/install_scripts.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/install_scripts.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/install_scripts.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/register.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/register.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/register.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/register.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/rotate.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/rotate.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/rotate.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/rotate.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/saveopts.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/saveopts.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/saveopts.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/saveopts.py diff --git a/zfec/setuptools-0.6c16dev3.egg/setuptools/command/scriptsetup.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/scriptsetup.py new file mode 100644 index 0000000..db68c07 --- /dev/null +++ b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/scriptsetup.py @@ -0,0 +1,284 @@ +from distutils.errors import DistutilsSetupError +from setuptools import Command +import sys + +class scriptsetup(Command): + action = (sys.platform == "win32" + and "set up .pyscript association and PATHEXT variable to run scripts" + or "this does nothing on non-Windows platforms") + + user_options = [ + ('allusers', 'a', + 'make changes for all users of this Windows installation (requires Administrator privileges)'), + ] + boolean_options = ['allusers'] + + def initialize_options(self): + self.allusers = False + + def finalize_options(self): + pass + + def run(self): + if sys.platform != "win32": + print "\n'scriptsetup' isn't needed on non-Windows platforms." + else: + do_scriptsetup(self.allusers) + + +def do_scriptsetup(allusers=False): + print "\nSetting up environment to run scripts for %s..." % (allusers and "all users" or "the current user") + + from _winreg import HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_CLASSES_ROOT, \ + REG_SZ, REG_EXPAND_SZ, KEY_QUERY_VALUE, KEY_SET_VALUE, \ + OpenKey, CreateKey, QueryValueEx, SetValueEx, FlushKey, CloseKey + + USER_ENV = "Environment" + try: + user_env = OpenKey(HKEY_CURRENT_USER, USER_ENV, 0, KEY_QUERY_VALUE) + except WindowsError, e: + raise DistutilsSetupError("I could not read the user environment from the registry.\n%r" % (e,)) + + SYSTEM_ENV = "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment" + try: + system_env = OpenKey(HKEY_LOCAL_MACHINE, SYSTEM_ENV, 0, KEY_QUERY_VALUE) + except WindowsError, e: + raise DistutilsSetupError("I could not read the system environment from the registry.\n%r" % (e,)) + + + # HKEY_CLASSES_ROOT is a merged view that would only confuse us. + # + + USER_CLASSES = "SOFTWARE\\Classes" + try: + user_classes = OpenKey(HKEY_CURRENT_USER, USER_CLASSES, 0, KEY_QUERY_VALUE) + except WindowsError, e: + raise DistutilsSetupError("I could not read the user filetype associations from the registry.\n%r" % (e,)) + + SYSTEM_CLASSES = "SOFTWARE\\Classes" + try: + system_classes = OpenKey(HKEY_LOCAL_MACHINE, SYSTEM_CLASSES, 0, KEY_QUERY_VALUE) + except WindowsError, e: + raise DistutilsSetupError("I could not read the system filetype associations from the registry.\n%r" % (e,)) + + + def query(key, subkey, what): + try: + (value, type) = QueryValueEx(key, subkey) + except WindowsError, e: + if e.winerror == 2: # not found + return None + raise DistutilsSetupError("I could not read %s from the registry.\n%r" % (what, e)) + + # It does not matter that we don't expand environment strings, in fact it's better not to. + + if type != REG_SZ and type != REG_EXPAND_SZ: + raise DistutilsSetupError("I expected the registry entry for %s to have a string type (REG_SZ or REG_EXPAND_SZ), " + "and was flummoxed by it having type code %r." % (what, type)) + return (value, type) + + + def open_and_query(key, path, subkey, what): + try: + read_key = OpenKey(key, path, 0, KEY_QUERY_VALUE) + except WindowsError, e: + if e.winerror == 2: # not found + return None + raise DistutilsSetupError("I could not read %s from the registry because I could not open " + "the parent key.\n%r" % (what, e)) + + try: + return query(read_key, subkey, what) + finally: + CloseKey(read_key) + + + def update(key_name_path, subkey, desired_value, desired_type, goal, what): + (key, name, path) = key_name_path + + (old_value, old_type) = open_and_query(key, path, subkey, what) or (None, None) + if (old_value, old_type) == (desired_value, desired_type): + print "Already done: %s." % (goal,) + return False + + try: + update_key = OpenKey(key, path, 0, KEY_SET_VALUE|KEY_QUERY_VALUE) + except WindowsError, e: + if e.winerror != 2: + raise DistutilsSetupError("I tried to %s, but was not successful because I could not open " + "the registry key %s\\%s for writing.\n%r" + % (goal, name, path, e)) + try: + update_key = CreateKey(key, path) + except WindowsError, e: + raise DistutilsSetupError("I tried to %s, but was not successful because the registry key %s\\%s " + "did not exist, and I was unable to create it.\n%r" + % (goal, name, path, e)) + + (new_value, new_type) = (None, None) + try: + SetValueEx(update_key, subkey, 0, desired_type, desired_value) + except WindowsError, e: + raise DistutilsSetupError("I tried to %s, but was not able to set the subkey %r under %s\\%s to be %r.\n%r" + % (goal, subkey, name, path, desired_value)) + else: + (new_value, new_type) = query(update_key, subkey, what) or (None, None) + finally: + FlushKey(update_key) + CloseKey(update_key) + + if (new_value, new_type) != (desired_value, desired_type): + raise DistutilsSetupError("I tried to %s by setting the subkey %r under %s\\%s to be %r, " + "and the call to SetValueEx succeeded, but the value ended up as " + "%r instead (it was previously %r). Maybe the update was unexpectedly virtualized?" + % (goal, subkey, name, path, desired_value, new_value, old_value)) + + print "Done: %s." % (goal,) + return True + + + # Maintenance hazard: 'add_to_environment' and 'associate' use very similar, but not identical logic. + + def add_to_environment(varname, addition, change_allusers): + changed = False + what = "the %s environment variable %s" % (change_allusers and "system" or "user", varname) + goal = "add %s to %s" % (addition, what) + + system_valueandtype = query(system_env, varname, "the system environment variable %s" % (varname,)) + user_valueandtype = query(user_env, varname, "the user environment variable %s" % (varname,)) + + if change_allusers: + (value, type) = system_valueandtype or (u'', REG_SZ) + key_name_path = (HKEY_LOCAL_MACHINE, "HKEY_LOCAL_MACHINE", SYSTEM_ENV) + else: + (value, type) = user_valueandtype or system_valueandtype or (u'', REG_SZ) + key_name_path = (HKEY_CURRENT_USER, "HKEY_CURRENT_USER", USER_ENV) + + if addition.lower() in value.lower().split(u';'): + print "Already done: %s." % (goal,) + else: + changed |= update(key_name_path, varname, value + u';' + addition, type, goal, what) + + if change_allusers: + # Also change any overriding environment entry for the current user. + (user_value, user_type) = user_valueandtype or (u'', REG_SZ) + split_value = user_value.lower().split(u';') + + if not (addition.lower() in split_value or u'%'+varname.lower()+u'%' in split_value): + now_what = "the overriding user environment variable %s" % (varname,) + changed |= update((HKEY_CURRENT_USER, "HKEY_CURRENT_USER", USER_ENV), + varname, user_value + u';' + addition, user_type, + "add %s to %s" % (addition, now_what), now_what) + + return changed + + + def associate(ext, target, change_allusers): + changed = False + what = "the %s association for %s" % (change_allusers and "system" or "user", ext) + goal = "associate the filetype %s with %s for %s" % (ext, target, change_allusers and "all users" or "the current user") + + try: + if change_allusers: + target_key = OpenKey(HKEY_LOCAL_MACHINE, "%s\\%s" % (SYSTEM_CLASSES, target), 0, KEY_QUERY_VALUE) + else: + target_key = OpenKey(HKEY_CLASSES_ROOT, target, 0, KEY_QUERY_VALUE) + except WindowsError, e: + raise DistutilsSetupError("I was going to %s, but that won't work because the %s class does not exist in the registry, " + "as far as I can tell.\n%r" % (goal, target, e)) + CloseKey(target_key) + + system_key_name_path = (HKEY_LOCAL_MACHINE, "HKEY_LOCAL_MACHINE", "%s\\%s" % (SYSTEM_CLASSES, ext)) + user_key_name_path = (HKEY_CURRENT_USER, "HKEY_CURRENT_USER", "%s\\%s" % (USER_CLASSES, ext)) + + system_valueandtype = open_and_query(system_classes, ext, "", "the system association for %s" % (ext,)) + user_valueandtype = open_and_query(user_classes, ext, "", "the user association for %s" % (ext,)) + + if change_allusers: + (value, type) = system_valueandtype or (u'', REG_SZ) + key_name_path = system_key_name_path + else: + (value, type) = user_valueandtype or system_valueandtype or (u'', REG_SZ) + key_name_path = user_key_name_path + + if value == target: + print "Already done: %s." % (goal,) + else: + changed |= update(key_name_path, "", unicode(target), REG_SZ, goal, what) + + if change_allusers: + # Also change any overriding association for the current user. + (user_value, user_type) = user_valueandtype or (u'', REG_SZ) + + if user_value != target: + changed |= update(user_key_name_path, "", unicode(target), REG_SZ, + "associate the filetype %s with %s for the current user " \ + "(because the system association is overridden)" % (ext, target), + "the overriding user association for %s" % (ext,)) + + return changed + + + def broadcast_settingchange(change_allusers): + print "Broadcasting that the environment has changed, please wait..." + + # + # + # LRESULT WINAPI SendMessageTimeoutW(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, + # UINT fuFlags, UINT uTimeout, PDWORD_PTR lpdwResult); + + try: + from ctypes import WINFUNCTYPE, POINTER, windll, addressof, c_wchar_p + from ctypes.wintypes import LONG, HWND, UINT, WPARAM, LPARAM, DWORD + + SendMessageTimeout = WINFUNCTYPE(POINTER(LONG), HWND, UINT, WPARAM, LPARAM, UINT, UINT, POINTER(POINTER(DWORD))) \ + (("SendMessageTimeoutW", windll.user32)) + HWND_BROADCAST = 0xFFFF + WM_SETTINGCHANGE = 0x001A + SMTO_ABORTIFHUNG = 0x0002 + SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, change_allusers and 1 or 0, + addressof(c_wchar_p(u"Environment")), SMTO_ABORTIFHUNG, 5000, None); + except Exception, e: + print "Warning: %r" % (e,) + + + changed_assoc = associate(".pyscript", "Python.File", allusers) + + changed_env = False + try: + changed_env |= add_to_environment("PATHEXT", ".pyscript", allusers) + changed_env |= add_to_environment("PATHEXT", ".pyw", allusers) + finally: + CloseKey(user_env) + CloseKey(system_env) + + if changed_assoc or changed_env: + broadcast_settingchange(allusers) + + if changed_env: + # whether logout is needed seems to randomly differ between installations + # of XP, but it is not needed in Vista or later. + try: + import platform, re + need_logout = not re.search(r'^[6-9]|([1-9][0-9]+)\.', platform.version()) + except Exception, e: + e # hush pyflakes + need_logout = True + + if need_logout: + print """ +*********************************************************************** +Changes have been made to the persistent environment, but they may not +take effect in this Windows session. Running installed Python scripts +from a Command Prompt may only work after you have logged out and back +in again, or rebooted. +*********************************************************************** +""" + else: + print """ +*********************************************************************** +Changes have been made to the persistent environment, but not in this +Command Prompt. Running installed Python scripts will only work from +new Command Prompts opened from now on. +*********************************************************************** +""" diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/sdist.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/sdist.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/sdist.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/sdist.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/setopt.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/setopt.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/setopt.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/setopt.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/test.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/test.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/test.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/test.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/command/upload.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/command/upload.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/command/upload.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/command/upload.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/depends.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/depends.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/depends.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/depends.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/dist.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/dist.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/dist.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/dist.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/extension.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/extension.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/extension.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/extension.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/package_index.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/package_index.py similarity index 94% rename from zfec/setuptools-0.6c15dev.egg/setuptools/package_index.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/package_index.py index 32498d0..3d82d93 100644 --- a/zfec/setuptools-0.6c15dev.egg/setuptools/package_index.py +++ b/zfec/setuptools-0.6c16dev3.egg/setuptools/package_index.py @@ -19,6 +19,21 @@ PYPI_MD5 = re.compile( URL_SCHEME = re.compile('([-+.a-z0-9]{2,}):',re.I).match EXTENSIONS = ".tar.gz .tar.bz2 .tar .zip .tgz".split() +def is_local(url_or_fname): + """ Return True if url_or_fname is a "file:" url or if it is a schemaless thing (which is presumably a filename). """ + mo = URL_SCHEME(url_or_fname) + return not (mo and mo.group(1).lower()!='file') + +def url_or_fname_to_fname(url_or_fname): + """ Assert that is_local(url_or_fname) then if it is a "file:" url, parse it and run url2pathname on it, else just return it. """ + assert is_local(url_or_fname) + + mo = URL_SCHEME(url_or_fname) + if mo: + return urllib2.url2pathname(urlparse.urlparse(url)[2]) + else: + return url_or_fname + __all__ = [ 'PackageIndex', 'distros_for_url', 'parse_bdist_wininst', 'interpret_distro_name', @@ -436,18 +451,22 @@ class PackageIndex(Environment): def find(env, req): # Find a matching distribution; may be called more than once - for dist in env[req.key]: - - if dist.precedence==DEVELOP_DIST and not develop_ok: - if dist not in skipped: - self.warn("Skipping development or system egg: %s",dist) - skipped[dist] = 1 - continue - - if dist in req and (dist.precedence<=SOURCE_DIST or not source): - return dist - - + # first try to find a local dist + for allow_remote in (False, True): + # then try to find a platform-dependent dist + for allow_platform_independent in (False, True): + for dist in env[req.key]: + if dist.precedence==DEVELOP_DIST and not develop_ok: + if dist not in skipped: + self.warn("Skipping development or system egg: %s",dist) + skipped[dist] = 1 + continue + + if ((is_local(dist.location) or allow_remote) and + (dist in req) and + ((allow_platform_independent or dist.platform is not None) and + (dist.precedence<=SOURCE_DIST or not source))): + return dist if force_scan: self.prescan() diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/sandbox.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/sandbox.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/sandbox.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/sandbox.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/site-patch.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/site-patch.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/site-patch.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/site-patch.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/tests/__init__.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/tests/__init__.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/tests/__init__.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/tests/__init__.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/tests/test_packageindex.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/tests/test_packageindex.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/tests/test_packageindex.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/tests/test_packageindex.py diff --git a/zfec/setuptools-0.6c15dev.egg/setuptools/tests/test_resources.py b/zfec/setuptools-0.6c16dev3.egg/setuptools/tests/test_resources.py similarity index 100% rename from zfec/setuptools-0.6c15dev.egg/setuptools/tests/test_resources.py rename to zfec/setuptools-0.6c16dev3.egg/setuptools/tests/test_resources.py diff --git a/zfec/setuptools-0.6c16dev3.egg/zetuptoolz.txt b/zfec/setuptools-0.6c16dev3.egg/zetuptoolz.txt new file mode 100644 index 0000000..25c029d --- /dev/null +++ b/zfec/setuptools-0.6c16dev3.egg/zetuptoolz.txt @@ -0,0 +1,93 @@ +This is the "zetuptoolz" fork of setuptools. This version is forked from +setuptools trunk r80621 (which is current as of 2010-08-31), with the following +differences: + + + * Zooko's patches for the following bugs and features have been applied: + + + "easy_install will install a package that is already there" + + + "be more like distutils with regard to --prefix=" + + + "respect the PYTHONPATH" + (Note: this patch does not work as intended when site.py has been modified. + This will be fixed in a future version.) + + + * The following patch to setuptools introduced bugs, and has been reverted + in zetuptoolz: + + $ svn log -r 45514 + ------------------------------------------------------------------------ + r45514 | phillip.eby | 2006-04-18 04:03:16 +0100 (Tue, 18 Apr 2006) | 9 lines + + Backport pkgutil, pydoc, and doctest from the 2.5 trunk to setuptools + 0.7 trunk. (Sideport?) Setuptools 0.7 will install these in place of + the 2.3/2.4 versions (at least of pydoc and doctest) to let them work + properly with eggs. pkg_resources now depends on the 2.5 pkgutil, which + is included here as _pkgutil, to work around the fact that some system + packagers will install setuptools without overriding the stdlib modules. + But users who install their own setuptools will get them, and the system + packaged people probably don't need them. + ------------------------------------------------------------------------ + + + * If unpatched setuptools decides that it needs to change an existing site.py + file that appears not to have been written by it (because the file does not + start with "def __boot():"), it aborts the installation. + zetuptoolz leaves the file alone and outputs a warning, but continues with + the installation. + + + * The scripts written by zetuptoolz have the following extra line: + + # generated by zetuptoolz + + after the header. + + + * Windows-specific changes (native Python): + + Python distributions may have command-line or GUI scripts. + On Windows, setuptools creates an executable wrapper to run each + script. zetuptools uses a different approach that does not require + an .exe wrapper. It writes approximately the same script file that + is used on other platforms, but with a .pyscript extension. + It also writes a shell-script wrapper (without any extension) that + is only used when the command is run from a Cygwin shell. + + Some of the advantages of this approach are: + + * Unicode arguments are preserved (although the program will + need to use some Windows-specific code to get at them in + current versions of Python); + * it works correctly on 64-bit Windows; + * the zetuptoolz distribution need not contain either any + binary executables, or any C code that needs to be compiled. + + See setuptools\tests\win_script_wrapper.txt for further details. + + Installing or building any distribution on Windows will automatically + associate .pyscript with the native Python interpreter for the current + user. It will also add .pyscript and .pyw to the PATHEXT variable for + the current user, which is needed to allow scripts to be run without + typing any extension. + + There is an additional setup.py command that can be used to perform + these steps separately (which isn't normally needed, but might be + useful for debugging): + + python setup.py scriptsetup + + Adding the --allusers option, i.e. + + python setup.py scriptsetup --allusers + + will make the .pyscript association and changes to the PATHEXT variable + for all users of this Windows installation, except those that have it + overridden in their per-user environment. In this case setup.py must be + run with Administrator privileges, e.g. from a Command Prompt whose + shortcut has been set to run as Administrator. -- 2.45.2