This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: package.pth file name not used as described.
Type: Stage:
Components: Documentation Versions:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: carlfk, loewis, sf-robot
Priority: normal Keywords:

Created on 2007-04-09 19:58 by carlfk, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg31735 - (view) Author: Carl Karsten (carlfk) Date: 2007-04-09 19:58
"...whose name has the form package.pth" http://www.python.org/doc/lib/module-site.html 

as far as I can tell, that is incorrect.  the .pth file can be named anything - only the name of the dir listed in it is used as a package/module name.

It is implemented in site.py : 

def addpackage(sitedir, name, known_paths):

    fullname = os.path.join(sitedir, name)

        f = open(fullname, "rU")

        for line in f:

            dir, dircase = makepath(sitedir, line)
            if not dircase in known_paths and os.path.exists(dir):
                sys.path.append(dir)


Notice name is not added to sys.path.
msg31736 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-04-14 19:12
I fail to see the problem. "package" is deliberately type-set in italics to indicate that the name of the pth is a placeholder. Nowhere it says that it must be the string "package", or a specific string.

Tentatively closing as won't fix.
msg31737 - (view) Author: SourceForge Robot (sf-robot) Date: 2007-04-29 02:20
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
History
Date User Action Args
2022-04-11 14:56:23adminsetgithub: 44820
2007-04-09 19:58:04carlfkcreate