1515
1616# todo: this module needs to be rewritten.
1717
18-
1918import setuptools
2019import py2exe
2120import imp
@@ -339,21 +338,21 @@ def get_all_data_files():
339338
340339def get_all_submodules (package_name ):
341340 '''
342- Get all submodules of a package, recursively.
341+ Get all submodules of a package, recursively, including itself .
343342
344343 This includes both modules and packages.
345344
346345 Example:
347346
348- get_all_subpackages('numpy') == ['numpy.compat._inspect',
347+ get_all_subpackages('numpy') == ['numpy', 'numpy .compat._inspect',
349348 'numpy.compat.setup', 'numpy.compat.setupscons', ... ]
350349
351350 '''
352351 package_path = cute_find_module (package_name )
353352
354- subpackage_names = [( package_name + '.' + m ) for m in
355- setuptools . find_packages ( package_path )] + \
356- [ package_name ]
353+ subpackage_names = [package_name ] + \
354+ [( package_name + '.' + m ) for m in
355+ setuptools . find_packages ( package_path ) ]
357356
358357 modules = []
359358 for subpackage_name in subpackage_names :
@@ -428,7 +427,7 @@ def get_all_submodules(package_name):
428427
429428 'py2exe' : {
430429
431- # Putting distribution files in `win_dist` at the root of the\
430+ # Putting distribution files in `win_dist` at the root of the
432431 # repo:
433432 'dist_dir' : '../win_dist' ,
434433
@@ -438,6 +437,7 @@ def get_all_submodules(package_name):
438437
439438 'includes' : includes ,
440439
440+ # A nasty bug was solved by this:
441441 'dll_excludes' : ['UxTheme.dll' ],
442442
443443 }
0 commit comments