summaryrefslogtreecommitdiff
path: root/setuptools/command
Commit message (Collapse)AuthorAgeFilesLines
* Now that 2to3 is no longer run on the codebase, it's safe for the templates ↵Jason R. Coombs2014-06-141-7/+1
| | | | to be syntactically incorrect (prior to substitution).
* Normalize whitespaceJason R. Coombs2014-06-141-13/+7
|
* Reorganize importsJason R. Coombs2014-06-141-5/+6
|
* Use compat's StringIO. Should fix bitbucket #213Matthew Iversen2014-06-021-3/+2
| | | | | | | https://bitbucket.org/pypa/setuptools/issue/213/regression-setuptools-37-installation --HG-- extra : source : 182f68beacf5e436609fb7d1064a18279cbbd24a
* Restore Python 2 compatibility.Jason R. Coombs2014-05-171-1/+1
|
* Use StringIO to write out requirements. Use more common convention of adding ↵Jason R. Coombs2014-05-171-4/+12
| | | | newline to each line of the file, not just intervening lines.
* Write requirements in a deterministic order.Jason R. Coombs2014-05-171-1/+2
|
* Extract variableJason R. Coombs2014-05-171-1/+2
|
* Use PY3 and PY2 throughoutJason R. Coombs2014-05-175-15/+17
|
* with_statement is available naturally in Python 2.6Jason R. Coombs2014-05-171-3/+2
|
* In corporate the old unicode with the spirit of what the FileList updating.Philip Thiem2014-05-171-6/+25
| | | | | --HG-- extra : source : 199c917b8a0be209144878872269c3bd08936d6a
* with_statements and output utf-8 outputPhilip Thiem2014-05-171-6/+9
| | | | | | | | | | *Since py2.5 has been dropped, we can use future imports to make use of with statements. *End goal was to always decode to utf-8 in write_file on 307 --HG-- extra : rebase_source : 502ea7128f4e3b843b16c6d64d6d0b2ac56ce87d
* Add a _repair method to repair the FileList after unsafe entries have been ↵Jason R. Coombs2014-05-161-0/+12
| | | | added.
* Also override extend to check paths for safety.Jason R. Coombs2014-05-161-0/+3
|
* Move Python 3 code to the body of the functionJason R. Coombs2014-05-161-9/+8
|
* Use compat for Python 3 detectionJason R. Coombs2014-05-161-2/+2
|
* Extract _safe_pathJason R. Coombs2014-05-161-3/+6
|
* ReindentJason R. Coombs2014-05-161-2/+2
|
* Fix failure on non-Windows systemsJason R. Coombs2014-05-161-2/+1
|
* FileList.append already excludes files that are not UTF-8 encodable, so rely ↵Jason R. Coombs2014-05-151-14/+1
| | | | on it when building the manifest. Ref #193
* ReindentJason R. Coombs2014-05-151-2/+2
|
* This code path doesn't make sense. If the UnicodeEncodeError occurred above, ↵Jason R. Coombs2014-05-151-4/+0
| | | | it will occur here too.
* Clean up docstringJason R. Coombs2014-05-151-2/+2
|
* Merge Pull Request #483.5.2Jason R. Coombs2014-05-071-14/+37
|\
| * 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
|