Commit 32237eae authored by sunpoet's avatar sunpoet

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/
parent cff3a482
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment