summaryrefslogtreecommitdiff
path: root/setuptools/command
Commit message (Collapse)AuthorAgeFilesLines
...
| * make easy_install.uncache_zipdir() remove more stale zipimporter instancesJurko Gospodnetić2014-04-151-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since paths are case-insensitive on Windows, zipped egg modules may be loaded using different but equivalent paths. Importing each such different path causes a new zipimporter to be instantiated. Removing cached zipimporter instances must then not forget about removing those created for differently spelled paths to the same replaced egg. Other missed zipimporter instances are those used to access zipped eggs stored inside zipped eggs. When clearing zipimporter instances got a given path, we need to clear all the instances related to any of its subpaths as well. --HG-- extra : rebase_source : 86aeadd1e639fbc83d27a0c551fdc2b8a68a6f85
| * clean up easy_install.uncache_zipdir() code & commentsJurko Gospodnetić2014-04-151-5/+17
| | | | | | | | | | --HG-- extra : rebase_source : 79778a670897cb92c17307f2535fcac6447e16b4
| * quick-fix #168: avoid using stale cached zipped egg dist info in easy_installJurko Gospodnetić2014-04-151-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When installing a zipped egg, into a Python environment with a same named zipped egg already installed, the installation can fail with a zipimport.ZipImportError complaining about a 'bad local header' encountered in the new zip archive. This can occur if setuptools loads the original egg for some reason and the two zip archives have different content. Then if Python attempts to read a file from the new archive, it will expect it in a location pointed to by the original archive's directory. This will report an error if zipimport does not encounter the expected local file start header in the given location. The mismatch between the two archives can be reproduced by installing the same setuptools version (prior to this commit and after commit f40b810acc5f6494735c912a625d647dc2a3c582 that first introduced the requires.txt metadata information file into the setuptools project) twice from its sources - which can randomly fail due to the scenario described above. That will package the zipped egg archive twice, with each of the archives containing slightly different Python modules. In case this causes any of the compressed modules to have different size (easy_install.pyc is often the culprit here), then attempting to read any later file in the zip archive will fail (requires.txt package metadata file is often the culprit here). A similar scenario can be reproduced more consistently by manually modifying the setuptools easy_install.py source file before building the new egg, e.g. by adding some additional empty lines to its start. The underlying reason for this problem is setuptools using zipimporter instances with cached zip archive content directory information from the older zip archive, even after the old archive has been replaced. This patch cleans up only one such old zipimporter instance - one referenced via easy_install command's local_index attribute. That is the one that has been causing all the currently reported/reproduced installation failures. A clean solution needs to make certain there are no more zipimporter instances with stale archive content directory caches left behind after replacing a zipped egg archive with another. There are currently at least the following known potential sources for such stale zipimporter instances (all holding references to Distribution instances that can then hold a reference to a zipimporter related to their zipped egg archive): easy_install command attributes: local_index (Environment with a list of Distributions) package_index (PackageIndex with a list of Distributions) pth_file (PthDistributions with a list of Distributions) global pkg_resources.working_set object (holds a list of Distributions) imported module's __loader__ attribute (zipimporter instance) zipimport._zip_directory_cache sys.path_importer_cache Further debugging & development note: A complete list of all the currently active stale zipimporter instances can be read using CPython's gc module and its object reference introspection functionality (gc.get_objects() & gc.get_referrers()) from inside the uncache_zipdir() method in the setuptools easy_install.py module. That is the method called just after the old arhive has been replaced by the new one and all the stale zipimporter instances were supposed to have been released. --HG-- extra : rebase_source : 041d2819881b8f7e5c4da333a387fc86d4f7b791
* | Use modern syntax for octal valuesJason R. Coombs2014-05-052-6/+6
| |
* | Restore install._install with a comment to capture its requirement on ↵Jason R. Coombs2014-05-041-0/+4
| | | | | | | | | | | | | | earlier NumPy versions. Fixes #199. --HG-- extra : amend_source : a76d060c98e0048506e5aadddd675151db9d273c
* | Backed out changeset: b0a2fcc5275a Ref #193Jason R. Coombs2014-05-031-1/+2
| |
* | Correct indentation and clarify meaning by using namespacingJason R. Coombs2014-04-308-45/+43
|/ | | | | --HG-- extra : amend_source : 20ab7547c8478eb084767fe701e627bdd462ba16
* Re-arrange _first_line_re to put core functionality at the top levelJason R. Coombs2014-04-151-4/+8
|
* Move import to the topJason R. Coombs2014-04-151-2/+2
|
* Extract first_line_re function to encapsulate compatibility mechanismJason R. Coombs2014-04-151-4/+9
|
* Python2.x needs encode as well.yyfeng88625@gmail.com2014-03-211-2/+1
| | | | | --HG-- extra : source : ab82442e2205a4ab1016711e482388590688fa15
* Wrap unittest.main in a compatibility wrapper for Python 3.1 compatibility. ↵3.4.2Jason R. Coombs2014-04-061-4/+7
| | | | Fixes #183
* Extract the resolution of loader/runner classes. Allows None value to ↵Jason R. Coombs2014-03-301-6/+13
| | | | pass-through to unittest.main. Fixes #180.
* Reformat to add the conventional whitespace and shorter lines.Jason R. Coombs2014-03-301-11/+13
|
* Use file context for write_stubJason R. Coombs2014-03-301-3/+2
|
* Create stub template from a multiline string.Jason R. Coombs2014-03-301-12/+11
|
* Update bdist_egg for styleJason R. Coombs2014-03-301-99/+34
|
* Allow install to proceed with an egg install on IronPython and any other ↵3.4Jason R. Coombs2014-03-301-1/+11
| | | | environment that has no stack support. Fixes #177.
* variable name is superfluous nowJason R. Coombs2014-03-301-2/+1
|
* Simplify comment not to repeat the obvious implication of the 'if' test.Jason R. Coombs2014-03-301-3/+1
| | | | | --HG-- extra : amend_source : c92063405d99e7fdb7fe0a6312fa8438c3727c2f
* Update docstringJason R. Coombs2014-03-301-5/+4
|
* Use inspect module instead of _getframeJason R. Coombs2014-03-301-7/+8
|
* Extract a method to capture the intention of caller detection.Jason R. Coombs2014-03-301-13/+21
|
* Replace outdated deprecating comments with a proper doc string.Jason R. Coombs2014-03-301-4/+9
|
* The no_egg option is no longer present.Jason R. Coombs2014-03-301-4/+0
|
* Adjust to match modern style conventions.Jason R. Coombs2014-03-301-5/+9
|
* Remove legacy compatibility in bdist_rpmJason R. Coombs2014-03-301-15/+1
| | | | | --HG-- extra : amend_source : 829ebde0696d12adfb54aca74ea6b1b510177ff4
* Remove excess whitespace; Normalize imports.Jason R. Coombs2014-03-301-34/+3
| | | | | --HG-- extra : amend_source : 62f689b409b4645eda5f81b2604c50a84713ee52
* Apply patch based on patch in 2008 by Klaus Zimmerman. Fixes #176.Jason R. Coombs2014-03-281-2/+8
|
* Sort entry points when writing so they render consistentlyJason R. Coombs2014-03-161-2/+2
|
* Remove special handling of 'no_compile' option with comment about making ↵Jason R. Coombs2014-03-131-1/+0
| | | | DISTUTILS_DEBUG work right. While testing on Python 2.6 and later, I was unable to evoke any abberant or distinct behavior by removing the value (with DISTUTILS_DEBUG enabled and using variations of --compile and --no-compile). Therefore, I believe that whatever was the motivation for adding the attribute (in 2c91c12dc9b1), its purpose has passed.
* Reindent and remove excess whitespaceJason R. Coombs2014-03-131-10/+3
|
* Issue #156: Fix spelling of __PYVENV_LAUNCHER__ variable.3.0Arfrever Frehtes Taifersar Arahesis2014-03-041-1/+1
|
* Remove excess whitespaceJason R. Coombs2014-03-011-1/+0
|
* Update workaround to reference filed ticket.Jason R. Coombs2014-03-011-1/+5
|
* Remove patching of upload_names (dist_files) - Python 2.6 already does the ↵Jason R. Coombs2014-03-011-22/+0
| | | | right thing.
* Remove unused importJason R. Coombs2014-03-011-1/+0
|
* Remove get_installer_filename (copied from some version of Python now ↵Jason R. Coombs2014-03-011-15/+0
| | | | required to be supplied).
* Delint bdist_wininstJason R. Coombs2014-03-011-33/+5
|
* Clean some imports.Arfrever Frehtes Taifersar Arahesis2014-02-151-1/+1
|
* Merge backout of namespace package __init__ module generation; ref #148.3.0b1Jason R. Coombs2014-02-111-27/+3
|\
| * Backed out changeset 28901bac2f2e See #148Jason R. Coombs2014-02-111-27/+27
| | | | | | | | | | | | --HG-- branch : setuptools extra : amend_source : 73cc453f11a0b77f930138eee03b1fc8e69399af
* | Normalize whitespace and importsJason R. Coombs2014-02-091-35/+16
| |
* | Reorganize imports and remove excess whitespaceJason R. Coombs2014-02-091-28/+3
| |
* | Remove import *Jason R. Coombs2014-02-091-1/+1
| |
* | Normalize indentation and remove unused importsJason R. Coombs2014-02-091-42/+33
| |
* | Remove import *Jason R. Coombs2014-02-091-1/+2
| |
* | Remove excess whitespace and unused imports.Jason R. Coombs2014-02-091-10/+3
| |
* | Remove import *Jason R. Coombs2014-02-091-2/+3
| |
* | Remove unused import and excess whitespace.Jason R. Coombs2014-02-091-39/+1
| |