diff options
author | sunpoet <none@none> | 2015-11-20 05:54:41 +0800 |
---|---|---|
committer | sunpoet <none@none> | 2015-11-20 05:54:41 +0800 |
commit | 32237eae19b3722b2a1c87bc0a74613c5f12d6fd (patch) | |
tree | 8029fdd9784cab602be4b6e00e5f9d62425602ae /setuptools/command/install_lib.py | |
parent | cff3a4820a926b379b5556ab28c9e5bd67152926 (diff) | |
download | python-setuptools-git-32237eae19b3722b2a1c87bc0a74613c5f12d6fd.tar.gz |
Fix package list inconsistency caused by namespace package on Python 3.5
namespace package will be skipped during installation. Since Python 3.5, .pyo files are removed and new .opt-1.pyc (and .opt-2.pyc) files are introduced [1]. However setuptools does not understand that new naming therefore the corresponding foo.opt-1.pyc is still added into package list (via --record). The inconsistency leads to a packaging error.
[1] https://www.python.org/dev/peps/pep-0488/
Diffstat (limited to 'setuptools/command/install_lib.py')
-rw-r--r-- | setuptools/command/install_lib.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/setuptools/command/install_lib.py b/setuptools/command/install_lib.py index 9b772227..78fe6891 100644 --- a/setuptools/command/install_lib.py +++ b/setuptools/command/install_lib.py @@ -79,6 +79,8 @@ class install_lib(orig.install_lib): base = os.path.join('__pycache__', '__init__.' + imp.get_tag()) yield base + '.pyc' yield base + '.pyo' + yield base + '.opt-1.pyc' + yield base + '.opt-2.pyc' def copy_tree( self, infile, outfile, |