diff options
| author | Zubin Mithra <zubin.mithra@gmail.com> | 2010-07-29 21:49:07 +0530 |
|---|---|---|
| committer | Zubin Mithra <zubin.mithra@gmail.com> | 2010-07-29 21:49:07 +0530 |
| commit | 1131d55f1c1dae56903343433bb958a809f47c45 (patch) | |
| tree | d68bece8d890f95fb4dcc12d708376ca3b6dfe0c | |
| parent | a61d1d3469e871109ba07a2d0aba18160091520f (diff) | |
| download | disutils2-1131d55f1c1dae56903343433bb958a809f47c45.tar.gz | |
options made to be a build attribute instead of as a distribution attribute
| -rw-r--r-- | src/distutils2/command/build.py | 2 | ||||
| -rw-r--r-- | src/distutils2/command/build_py.py | 13 | ||||
| -rw-r--r-- | src/distutils2/dist.py | 9 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/distutils2/command/build.py b/src/distutils2/command/build.py index e1ad18a..bdd2818 100644 --- a/src/distutils2/command/build.py +++ b/src/distutils2/command/build.py @@ -144,4 +144,4 @@ class build(Command): ('build_clib', has_c_libraries), ('build_ext', has_ext_modules), ('build_scripts', has_scripts), - ] + ]
\ No newline at end of file diff --git a/src/distutils2/command/build_py.py b/src/distutils2/command/build_py.py index c4f953d..40f2741 100644 --- a/src/distutils2/command/build_py.py +++ b/src/distutils2/command/build_py.py @@ -80,6 +80,12 @@ class build_py(Command, Mixin2to3): "also compile with optimization: -O1 for \"python -O\", " "-O2 for \"python -OO\", and -O0 to disable [default: -O0]"), ('force', 'f', "forcibly build everything (ignore file timestamps)"), + ('use-2to3', None, + "use 2to3 to make source python 3.x compatible"), + ('convert-2to3-doctests', None, + "use 2to3 to convert doctests in seperate text files"), + ('use-2to3-fixers', None, + "list additional fixers opted for during 2to3 conversion"), ] boolean_options = ['compile', 'force'] @@ -96,7 +102,10 @@ class build_py(Command, Mixin2to3): self.force = None self._updated_files = [] self._doctests_2to3 = [] - + self.use_2to3 = False + self.convert_2to3_doctests = [] + self.use_2to3_fixers = [] + def finalize_options(self): self.set_undefined_options('build', ('build_lib', 'build_lib'), @@ -150,7 +159,7 @@ class build_py(Command, Mixin2to3): self.build_packages() self.build_package_data() - if self.distribution.use_2to3 and self._updated_files: + if self.use_2to3 and self._updated_files: self.run_2to3(self._updated_files, self._doctests_2to3, self.distribution.use_2to3_fixers) diff --git a/src/distutils2/dist.py b/src/distutils2/dist.py index e0e2ea5..dc10fe9 100644 --- a/src/distutils2/dist.py +++ b/src/distutils2/dist.py @@ -113,12 +113,6 @@ Common commands: (see '--help-commands' for more) "print the list of packages/modules required"), ('obsoletes', None, "print the list of packages/modules made obsolete"), - ('use-2to3', None, - "use 2to3 to make source python 3.x compatible"), - ('convert-2to3-doctests', None, - "use 2to3 to convert doctests in seperate text files"), - ('use-2to3-fixers', None, - "list additional fixers opted for during 2to3 conversion") ] display_option_names = map(lambda x: translate_longopt(x[0]), display_options) @@ -212,9 +206,6 @@ Common commands: (see '--help-commands' for more) self.scripts = None self.data_files = None self.password = '' - self.use_2to3 = False - self.convert_2to3_doctests = [] - self.use_2to3_fixers = [] # And now initialize bookkeeping stuff that can't be supplied by # the caller at all. 'command_obj' maps command names to |
