summaryrefslogtreecommitdiff
path: root/setuptools/command/install_lib.py
diff options
context:
space:
mode:
authorsunpoet <devnull@localhost>2015-11-20 05:54:41 +0800
committersunpoet <devnull@localhost>2015-11-20 05:54:41 +0800
commit605d5eb854602bd2f36f57725dfa64b6b5bc97a8 (patch)
treea69606783a5d65ad270c0a08d0b2af2773bbcbf7 /setuptools/command/install_lib.py
parentfb4e16dd7217067b72a54e35f146c1257f4df2de (diff)
downloadpython-setuptools-bitbucket-605d5eb854602bd2f36f57725dfa64b6b5bc97a8.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.py2
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,