Python module locations

Current layout

  • Python 2.6
    • interpreter package: /opt/csw/lib/python2.6/…
    • modules (most of them): /opt/csw/lib/python/… (unversioned)
    • the prefix of module packages: CSWpy-
    • deps: CSWpython
  • Python 2.7
    • interpreter package: /opt/csw/lib/python2.7/…
    • modules: /opt/csw/lib/python2.7/… but none built so far
    • the prefix of module packages: None
    • .pyc files: compiled at install time, in /opt/csw/lib/python2.7/foo.pyc
    • deps: CSWpython27
  • Python 3.x
    • Practically nonexistent, only the interpreter exists.

Proposed layout

Python modules for the 2.x versions have the CSWpy- prefix and contain 2 copies of the code: one for 2.6 and one for 2.7. The .pyc files are also in the package. The module packages do not depend on the interpreter, but can depend on other packages (including modules) as necessary.

  • Python 2.6
    • interpreter package: /opt/csw/lib/python2.6/…
    • modules: /opt/csw/lib/python2.6/…
    • the prefix of module packages: CSWpy- (in the same package as 2.7 files)
    • .pyc files: shipped in the package
    • deps: No dependency on the interpreter
  • Python 2.7
    • interpreter package: /opt/csw/lib/python2.7/…
    • modules: /opt/csw/lib/python2.7/…
    • the prefix of module packages: CSwpy- (same package as 2.6)
    • .pyc files: shipped in the package
    • deps: No dependency on the interpreter
  • Python 3.x
    • modules kept in a shared place like /opt/csw/share/python3 thanks to the backward compatibility of the 3.x series
    • the prefix of module packages: CSWpy3-
    • .pyc files: to be solved (maybe by byte-compiling the code during installation, but something else than CAS will be required)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License