B
bN @ s d dl Z d dlZdd ZdS ) Nc C s| t j| } | }tt jjtj}g }d}xN| |kr<d|S |dt j| t j| } || krpt d| | }q*W dS )zo
Given a directory, finds the equivalent package name. If it
is directly in sys.path, returns ''.
N.r z*%s is not under any path found in sys.path)
ospathabspathmapsysjoininsertbasenamedirname
ValueError)dirZorig_dirr packagesZlast_dir r G/opt/alt/python37/lib/python3.7/site-packages/paste/util/findpackage.pyfind_package s
r )r r r r r r r <module> s