Part of libcloud.utils View Source
Function | relative_to | Gets 'relativee' relative to 'basepath'. |
Function | get_packages | Get all packages which are under dname. This is necessary for Python 2.2's distutils. Pretty similar arguments to getDataFiles, including 'parent'. |
Function | get_data_files | Get all the data files that should be included in this distutils Project. |
Function | _filter_names | Given a list of file names, return those names that should be copied. |
Given a list of file names, return those names that should be copied.
Gets 'relativee' relative to 'basepath'. i.e., >>> relative_to('/home/', '/home/radix/') 'radix' >>> relative_to('.', '/home/radix/Projects/Twisted') # curdir is /home/radix 'Projects/Twisted' The 'relativee' must be a child of 'basepath'.
Get all packages which are under dname. This is necessary for Python 2.2's distutils. Pretty similar arguments to getDataFiles, including 'parent'.
Get all the data files that should be included in this distutils Project. 'dname' should be the path to the package that you're distributing. 'ignore' is a list of sub-packages to ignore. This facilitates disparate package hierarchies. That's a fancy way of saying that the 'twisted' package doesn't want to include the 'twisted.conch' package, so it will pass ['conch'] as the value. 'parent' is necessary if you're distributing a subpackage like twisted.conch. 'dname' should point to 'twisted/conch' and 'parent' should point to 'twisted'. This ensures that your data_files are generated correctly, only using relative paths for the first element of the tuple ('twisted/conch/*'). The default 'parent' is the current working directory.