Lines Matching +full:packages +full:- +full:dir
20 ('build-lib=', 'd', "directory to \"build\" (copy) to"),
22 ('no-compile', None, "don't compile .py files [default]"),
24 "also compile with optimization: -O1 for \"python -O\", "
25 "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"),
30 negative_opt = {'no-compile' : 'compile'}
48 # options -- list of packages and list of modules.
49 self.packages = self.distribution.packages
69 # the right thing to do, but perhaps it should be an option -- in
75 # wrong thing to do: if a file is read-only in the working
78 # without problems. (This might be a Unix-specific issue.) Thus
84 # Two options control which modules will be installed: 'packages'
85 # and 'py_modules'. The former lets us work with whole packages, not
87 # specifying modules one-at-a-time.
91 if self.packages:
100 if not self.packages:
102 for package in self.packages:
127 # Each pattern has to be converted to a platform-specific path
161 tail.insert(0, path[-1])
162 del path[-1]
184 # Empty dir name means current directory, which we can probably
186 # my "empty string means current dir" convention, so we have to
207 # __init__.py doesn't exist -- so don't return the filename.
233 """Finds individually-specified Python modules, ie. those listed by
236 package-space to the module; 'module_base' is the bare (no
237 packages, no dots) module name, and 'filename' is the path to the
243 # package_dir - the directory where we'll find source files for
245 # checked - true if we have checked that the package directory
247 packages = {}
252 # We treat modules-in-packages almost the same as toplevel modules,
255 # - don't check for __init__.py in directory for empty package
258 package = '.'.join(path[0:-1])
259 module_base = path[-1]
262 (package_dir, checked) = packages[package]
269 packages[package] = (package_dir, 1)
274 # (so greedy closed-source bastards can distribute Python
286 they are specified one-module-at-a-time ('self.py_modules') or
287 by whole packages ('self.packages'). Return a list of tuples
293 if self.packages:
294 for package in self.packages:
301 return [module[-1] for module in self.find_all_modules()]
335 "'package' must be a string (dot-separated), list, or tuple")
337 # Now put the module source file into the "build" area -- this is
341 dir = os.path.dirname(outfile)
342 self.mkpath(dir)
348 # Now "build" the module -- ie. copy the source file to
355 for package in self.packages:
361 # the *unqualified* module name (ie. no dots, no package -- we
376 self.warn('byte-compiling is disabled, skipping.')
381 if prefix[-1] != os.sep:
401 if self.packages: