[Python-checkins] distutils2: on a second thought, let's keep the old arguments that are not renamed.

tarek.ziade python-checkins at python.org
Fri May 14 22:36:12 CEST 2010


tarek.ziade pushed 9fd27cd75533 to distutils2:

http://hg.python.org/distutils2/rev/9fd27cd75533
changeset:   149:9fd27cd75533
user:        Tarek Ziade <tarek at ziade.org>
date:        Fri May 14 16:54:41 2010 +0200
summary:     on a second thought, let's keep the old arguments that are not renamed. distutils2 will just display a warning
files:       src/distutils2/converter/fixers/fix_setup_options.py, src/distutils2/tests/conversions/03_after.py

diff --git a/src/distutils2/converter/fixers/fix_setup_options.py b/src/distutils2/converter/fixers/fix_setup_options.py
--- a/src/distutils2/converter/fixers/fix_setup_options.py
+++ b/src/distutils2/converter/fixers/fix_setup_options.py
@@ -21,11 +21,6 @@
               'description': 'summary',
               'install_requires': 'requires_dist'}
 
-# XXX see what we want to do for these..
-_INCOMPATIBLE_OPTIONS = ['entry_points',
-                         'include_package_data',
-                         'zip_safe',
-                         'namespace_packages']
 
 class FixSetupOptions(fixer_base.BaseFix):
 
@@ -43,14 +38,9 @@
 
         if name.value in _OLD_NAMES:
             name.value = _OLD_NAMES[name.value]
-        elif name.value in _INCOMPATIBLE_OPTIONS:
-            # removing the args, and the comma
-            # behind
-            next_token = name.parent.get_next_sibling()
-            if next_token.type == 12:
-                remove_list.append(next_token)
-            remove_list.append(name.parent)
-        return True
+            return True
+
+        return False
 
     def transform(self, node, results):
         arglist = node.children[1].children[1]
diff --git a/src/distutils2/tests/conversions/03_after.py b/src/distutils2/tests/conversions/03_after.py
--- a/src/distutils2/tests/conversions/03_after.py
+++ b/src/distutils2/tests/conversions/03_after.py
@@ -79,7 +79,11 @@
     data_files = [('.', ['README.txt'])],
     packages = ['zc', 'zc.buildout'],
     package_dir = {'': 'src'},
+    namespace_packages = ['zc'],
     requires_dist = 'setuptools',
+    include_package_data = True,
+    entry_points = entry_points,
+    zip_safe=False,
     classifiers = [
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Zope Public License',

--
Repository URL: http://hg.python.org/distutils2


More information about the Python-checkins mailing list