distutils2: ea717d8e71d0 (original) (raw)

Mercurial > distutils2

changeset 1274:ea717d8e71d0 python3

Merge fixes for #13901, #11805, #13712 and other improvements

Éric Araujo merwok@netwok.org
date Sun, 05 Feb 2012 12:23:06 +0100
parents bcea7cbddd47(current diff)730c2e4aaf9c(diff)
children a22859e3ebb9
files distutils2/config.py distutils2/create.py distutils2/pypi/dist.py distutils2/pypi/simple.py distutils2/tests/support.py distutils2/tests/test_command_build_py.py distutils2/tests/test_command_sdist.py distutils2/tests/test_config.py distutils2/tests/test_create.py
diffstat 11 files changed, 127 insertions(+), 54 deletions(-)[+] [-] CHANGES.txt 6 distutils2/_trove.py 12 distutils2/config.py 24 distutils2/create.py 35 distutils2/pypi/dist.py 2 distutils2/pypi/simple.py 2 distutils2/tests/support.py 13 distutils2/tests/test_command_build_py.py 24 distutils2/tests/test_command_sdist.py 1 distutils2/tests/test_config.py 37 distutils2/tests/test_create.py 25

line wrap: on

line diff

--- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,7 +9,7 @@ their clones, and all changes that have CONTRIBUTORS.txt for full names. Bug numbers refer to http://bugs.python.org/.[](#l1.4) -1.0a4 - 2011-12-?? +1.0a4 - 2012-02-?? ------------------

+- #13901: Prevent test failure on OS X for Python built in shared mode [ned] +- #11805: Add multiple value syntax for package_data in setup.cfg [éric] +- #13712: Don't map package_data to extra_files when converting a setup.py

--- a/distutils2/_trove.py +++ b/distutils2/_trove.py @@ -47,6 +47,12 @@ all_classifiers = [ 'Framework :: IDLE', 'Framework :: Paste', 'Framework :: Plone', +'Framework :: Plone :: 3.2', +'Framework :: Plone :: 3.3', +'Framework :: Plone :: 4.0', +'Framework :: Plone :: 4.1', +'Framework :: Plone :: 4.2', +'Framework :: Plone :: 4.3', 'Framework :: Pylons', 'Framework :: Setuptools Plugin', 'Framework :: Trac', @@ -261,6 +267,12 @@ all_classifiers = [ 'Programming Language :: Python :: 3.0', 'Programming Language :: Python :: 3.1', 'Programming Language :: Python :: 3.2', +'Programming Language :: Python :: Implementation', +'Programming Language :: Python :: Implementation :: CPython', +'Programming Language :: Python :: Implementation :: IronPython', +'Programming Language :: Python :: Implementation :: Jython', +'Programming Language :: Python :: Implementation :: PyPy', +'Programming Language :: Python :: Implementation :: Stackless', 'Programming Language :: REBOL', 'Programming Language :: Rexx', 'Programming Language :: Ruby',

--- a/distutils2/config.py +++ b/distutils2/config.py @@ -226,13 +226,25 @@ class Config: self.dist.scripts = [self.dist.scripts] self.dist.package_data = {}

+ for line in files.get('package_data', []):

+

self.dist.data_files = [] for data in files.get('data_files', []):

--- a/distutils2/create.py +++ b/distutils2/create.py @@ -287,6 +287,7 @@ class MainProgram: # optional string entries if 'keywords' in self.data and self.data['keywords']:

@@ -306,17 +307,29 @@ class MainProgram: fp.write('%s = ' % name) fp.write(''.join(' %s\n' % val for val in self.data[name]).lstrip()) + fp.write('\n[files]\n')

+

+

+

os.chmod(_FILENAME, 0o644) logger.info('Wrote "%s".' % _FILENAME) @@ -384,14 +397,8 @@ class MainProgram: for src in srcs] data['resources'].extend(files)

# Use README file if its content is the desciption if "description" in data:

--- a/distutils2/pypi/dist.py +++ b/distutils2/pypi/dist.py @@ -426,7 +426,7 @@ class ReleasesList(IndexReference): """Sort the results with the given properties. The prefer_final argument can be used to specify if final

Results can be inverted by using reverse.

--- a/distutils2/pypi/simple.py +++ b/distutils2/pypi/simple.py @@ -269,7 +269,7 @@ class Crawler(BaseClient): def _register_release(self, release=None, release_info={}): """Register a new release.

Return the list of existing releases for the given project.

--- a/distutils2/tests/support.py +++ b/distutils2/tests/support.py @@ -353,7 +353,9 @@ def fixup_build_ext(cmd): When Python was built with --enable-shared on Unix, -L. is not enough to find libpython.so, because regrtest runs in a tempdir, not in the

When Python was built with in debug mode on Windows, build_ext commands need their debug attribute set, and it is not done automatically for @@ -380,9 +382,12 @@ def fixup_build_ext(cmd): if runshared is None: cmd.library_dirs = ['.'] else:

# Allow tests to run with an uninstalled Python 3.3 if sys.version_info[:2] == (3, 3) and sysconfig.is_python_build():

--- a/distutils2/tests/test_command_build_py.py +++ b/distutils2/tests/test_command_build_py.py @@ -24,11 +24,17 @@ class BuildPyTestCase(support.TempdirMan f.write("# Pretend this is a package.") finally: f.close()

destination = self.mkdtemp() @@ -42,7 +48,7 @@ class BuildPyTestCase(support.TempdirMan convert_2to3_doctests=None, use_2to3=False) dist.packages = ["pkg"]

cmd = build_py(dist) @@ -55,17 +61,23 @@ class BuildPyTestCase(support.TempdirMan # This makes sure the list of outputs includes byte-compiled # files for Python modules but not for package data files # (there shouldn't be byte-code files for those!).

def test_empty_package_dir(self): # See SF 1668596/1720897.

--- a/distutils2/tests/test_command_sdist.py +++ b/distutils2/tests/test_command_sdist.py @@ -74,7 +74,6 @@ class SDistTestCase(support.TempdirManag 'author_email': 'xxx'} dist = Distribution(metadata) dist.packages = ['somecode']

--- a/distutils2/tests/test_config.py +++ b/distutils2/tests/test_config.py @@ -66,11 +66,15 @@ scripts = bin/taunt package_data =

+ extra_files = %(extra-files)s

Replaces MANIFEST.in

+# FIXME no, it's extra_files +# (but sdist_extra is a better name, should use it) sdist_extra = include THANKS HACKING recursive-include examples *.txt .py @@ -96,6 +100,17 @@ setup_hooks = %(setup-hooks)s sub_commands = foo """ +SETUP_CFG_PKGDATA_BUGGY_1 = """ +[files] +package_data = foo. +""" + +SETUP_CFG_PKGDATA_BUGGY_2 = """ +[files] +package_data =

+""" +

Can not be merged with SETUP_CFG else install_dist

command will fail when trying to compile C sources

TODO use a DummyCommand to mock build_ext

@@ -276,13 +291,14 @@ class ConfigTestCase(support.TempdirMana self.assertEqual(dist.packages, ['one', 'two', 'three']) self.assertEqual(dist.py_modules, ['haven'])

self.assertEqual(dist.package_dir, 'src') @@ -293,8 +309,8 @@ class ConfigTestCase(support.TempdirMana # this file would be main.Foo when run as "python test_config.py". # The name FooBarBazTest should be unique enough to prevent # collisions.

# did the README got loaded ? self.assertEqual(dist.metadata['description'], 'yeah') @@ -304,6 +320,13 @@ class ConfigTestCase(support.TempdirMana d = new_compiler(compiler='d') self.assertEqual(d.description, 'D Compiler')

+

+ def test_multiple_description_file(self): self.write_setup({'description-file': 'README CHANGES'}) self.write_file('README', 'yeah')

--- a/distutils2/tests/test_create.py +++ b/distutils2/tests/test_create.py @@ -116,7 +116,6 @@ class CreateTestCase(support.TempdirMana package_data={ 'babar': ['Pom', 'Flora', 'Alexander'], 'me': ['dady', 'mumy', 'sys', 'bro'],

@@ -150,16 +149,15 @@ class CreateTestCase(support.TempdirMana mymodule scripts = my_script bin/run

resources = README.rst = {doc} @@ -217,8 +215,9 @@ ho, baby [files] packages = pyxfoil

resources = README.rst = {doc}