Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/packagescan.py @ 2402:82cef38fea56
packagescan can't scan nested packages
author | Eung-Ju PARK <eungju@gmail.com> |
---|---|
date | Fri, 02 Jun 2006 16:19:47 +0900 |
parents | c4ea7f927dab |
children | 976b6b2a1613 |
comparison
equal
deleted
inserted
replaced
2401:dbeaa4369121 | 2402:82cef38fea56 |
---|---|
63 def scan(libpath,packagename): | 63 def scan(libpath,packagename): |
64 """ helper for finding all required modules of package <packagename> """ | 64 """ helper for finding all required modules of package <packagename> """ |
65 # Use the package in the build directory | 65 # Use the package in the build directory |
66 libpath = os.path.abspath(libpath) | 66 libpath = os.path.abspath(libpath) |
67 sys.path.insert(0,libpath) | 67 sys.path.insert(0,libpath) |
68 packdir = os.path.join(libpath,packagename) | 68 packdir = os.path.join(libpath,packagename.replace('.', '/')) |
69 # A normal import would not find the package in | 69 # A normal import would not find the package in |
70 # the build directory. ihook is used to force the import. | 70 # the build directory. ihook is used to force the import. |
71 # After the package is imported the import scope for | 71 # After the package is imported the import scope for |
72 # the following imports is settled. | 72 # the following imports is settled. |
73 p = importfrom(packdir) | 73 p = importfrom(packdir) |