2009/5/26 P.J. Eby <[email protected]>: > * There is extensive coupling both to sys.path and to the global cache; in > particular, the owns() operation properly belongs to an object representing > a *directory*, rather than an object representing an individual project. > > Note too that such "directory" objects would then also be an appropriate > cache target, and a suitable home for egg_info_dirs() and get_file_users() > operations. This also simplifies get_egg_infos, since it would simply > either retrieves directories from the cache or creates them and optionally > caches them, without also meddling in the details of cache contents. > > Also, an application that wishes to do so can simply create directory > objects of its own and manage their lifecycle accordingly. > > Personally, I would also make an object for a collection of directories, but > you could possibly get away without it.
I can see the benefit of having such objects, I'll work on that. (and other points I didn't mention) Just one point though: - do we want to scan egg-info directories that are *directly* added in sys.path ? If we do so, using directories objects would require looking for the parent directory to create a directory object that hold each one of those "top" egg-info directories. This seems like a bad idea to me. Or maybe a specific global directory object could handle those top egg-info dirs. Its path would be virtual, and it would use "sys.path" instead of "os.listdir()" to list the elements it works it. Tarek -- Tarek Ziadé | http://ziade.org _______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
