sassoftware / conary

Distributed software repository, build, and system management tool
Apache License 2.0
46 stars 10 forks source link

Python3 changes the way pyc and so files are named #5

Closed wfscheper closed 9 years ago

wfscheper commented 9 years ago

PEPs 3147 and 3149 introduced a new naming convention for python bytecode and shared object files.

PEP 3147 introduces a directory, __pycahce__/, where compiled bytecode files are created. Additionally, to solve the issue of different python interpreters attempting to compile the same .py file, the filename includes the interpreter name and version, resulting in files like foo.cpython-34.pyc or foo.unladen-10.pyc.

PEP 3149 took the idea of encoding interpreter and version in pyc filenames, and extended it to shared objects, leading to file names like syslog.cpython-34m.so.

Currently, conary does not handle these files correctly when processing dependency information. It wil naively include the interpreter portion as part of the dependency. In order to properly support python3 packages, conary needs to strip the interpreter portion of the filename before creating the dependency.