summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/build_py.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>1999-09-08 02:42:30 (GMT)
committerGreg Ward <gward@python.net>1999-09-08 02:42:30 (GMT)
commit71eb8644d7e27fd379a2cf78c509155bdb179332 (patch)
treeccbd4f67d746616284cb996b87810c6865a6d9b5 /Lib/distutils/command/build_py.py
parent42926ddc7e413f7f14ad68b75f7a6fffe9d96733 (diff)
downloadcpython-71eb8644d7e27fd379a2cf78c509155bdb179332.zip
cpython-71eb8644d7e27fd379a2cf78c509155bdb179332.tar.gz
cpython-71eb8644d7e27fd379a2cf78c509155bdb179332.tar.bz2
Changed to reflect the new "command options" regime -- in particular,
we no longer explicitly pull distribution options out of our Distribution object, but rather let the Distribution put them into the command object.
Diffstat (limited to 'Lib/distutils/command/build_py.py')
-rw-r--r--Lib/distutils/command/build_py.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py
index d75bf3f..28aefa9 100644
--- a/Lib/distutils/command/build_py.py
+++ b/Lib/distutils/command/build_py.py
@@ -20,10 +20,14 @@ class BuildPy (Command):
def set_default_options (self):
self.dir = None
+ self.modules = None
+ self.package = None
def set_final_options (self):
self.set_undefined_options ('build',
('libdir', 'dir'))
+ if self.package is None:
+ self.package = ''
def run (self):
@@ -43,10 +47,6 @@ class BuildPy (Command):
self.set_final_options ()
- (modules, package) = \
- self.distribution.get_options ('py_modules', 'package')
- package = package or ''
-
infiles = []
outfiles = []
missing = []
@@ -56,20 +56,20 @@ class BuildPy (Command):
# input files.
# it's ok not to have *any* py files, right?
- if not modules:
+ if not self.modules:
return
# XXX we should allow for wildcards, so eg. the Distutils setup.py
# file would just have to say
# py_modules = ['distutils.*', 'distutils.command.*']
# without having to list each one explicitly.
- for m in modules:
+ for m in self.modules:
fn = apply (os.path.join, tuple (string.split (m, '.'))) + '.py'
if not os.path.exists (fn):
missing.append (fn)
else:
infiles.append (fn)
- outfiles.append (os.path.join (self.dir, package, fn))
+ outfiles.append (os.path.join (self.dir, self.package, fn))
# Blow up if any input files were not found.
if missing: