[Revision 3: Fri Sep 23 12:47:19 PDT 2005] Template Version: @(#)sac_nextcase 1.55 08/11/04 SMI Copyright 2005 Sun Microsystems, Inc. 1. Introduction 1.1. Project/Component Working Name: Python "vendor-packages" support. 1.2. Name of Document Author/Supplier: Author: Rich Burridge 1.3 Date of This Document: 22 September 2005 1.4. Technical Description Modification of Solaris Python 2.4.x, to automatically look for vendor supplied Python library and application files under the /usr/lib/python2.4/vendor-packages directory 2. Summary This proposal is to adjust the Solaris Python 2.4.x distribution to allow it to automatically search in /usr/lib/python2.4/vendor-packages for vendor supplied Python files. The project team will also work with the Python community to get this change adopted for a future community version of Python. The requested release binding is minor. 3. Background A recent case (PSARC 2005/532 [1]) requested the migration of Python from /usr/sfw to /usr and an upgrade from v2.3.x to v2.4.x. The rational behind this was so that the Orca screen reader (LSARC 2005/504 [2]) and various Python support libraries that it needs (LSARC 2005/506 [3]) could be installed under /usr/lib/python2.4/site-packages rather than under /usr/sfw/lib/python2.3/site-packages as there is an active migration of applications away from /usr/sfw. Feedback on this proposal told us that the "site-packages" directory is an inappropriate place to put files that we (as a vendor) deliver, just as "site_perl" would be inappropriate if we were delivering Perl files. Perl's solution is to have a "vendor_perl" directory for vendor delivered files. There is currently no such equivalent in Python. A "/usr/lib/python2.4/vendor-packages" directory for these Python files could easily be created, but unfortunately that doesn't "just work". In other words, it's not one of the known places that Python will look for library or application Python files. Each Python application that wanted to use those files would have to set PYTHONPATH and make sure that "/usr/lib/python2.4/vendor-packages" was on it. 4. Proposed Solution To adjust the Solaris Python 2.4.x distribution (by way of a patch automatically applied at build time), so that Python will append /usr/lib/python2.4/vendor-packages to the end of the list of known places where it automatically looks for library and application files To work with the Python community to get this proposed change integrated into a future generic Python distribution, so that we (Sun) don't have to have to make any changes to provide this functionality. To that end we solicited feedback from the Python community, via one of their mailing lists [4]. This didn't generate a definitive answer, so Guido van Rossum, (the creator of Python) was contacted. He replied that he thought this was a reasonable request and that we should use the SourceForge patch manager for the Python project to upload the patch that provides this functionality, and then inform the members of the python-dev mailing list. We have done this [5] [6]. We plan to continue working with the Python community to ensure that this change is integrated into a future Python release. 5. Interface Stability Python, as an Open Source effort, is revised by a group external to Sun. This group maintains compatibility with previous releases of Python and defines its reference syntax in their provided documentation [2]. INTERFACE | CLASSIFICATION ------------------------------------------------------+----------------- Python 2.4.x code base | External | directory layout | Evolving | | /usr/lib/python2.4/site-packages/vendor-packages.pth | Evolving | | | /usr/lib/python2.4/site-packages/ | Sun Private 6. Documentation The Python documentation will continue to be provided in the form of an external manual page, python.1, which contains pointers to the complete Python documentation on the Internet. It will also be updated to reflect that Sun supplied Python files are located under /usr/lib/python2.4/vendor-packages. 7. Resources and Schedule 7.4. Steering Committee requested information 7.4.1. Consolidation C-team Name: JDS 7.5. ARC review type: FastTrack 8. References [1] PSARC/2005/532 - Python migration from /usr/sfw to /usr and upgrade to v2.4.x [2] LSARC/2005/504 - Orca Screen Reader/Magnifier for the JDS Desktop [3] LSARC/2005/506 - Support Libraries for the Orca Screen Reader/Magnifier [4] Informing the Python community of the request for a "vendor-packages" directory and asking for feedback. http://mail.python.org/pipermail/python-list/2005-September/300029.html [5] Patch supplied to the SourceForge patch manager for Python http://sourceforge.net/tracker/index.php?func=detail&aid=1298835&group_id=5470&atid=305470 [6] Informing the Python development community of the request for a "vendor-packages" directory. http://mail.python.org/pipermail/python-dev/2005-September/056682.html