summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author?ric Araujo <merwok@netwok.org>2011-11-11 12:16:16 +0100
committer?ric Araujo <merwok@netwok.org>2011-11-11 12:16:16 +0100
commitc00356888d4cce280d33dd86c7349bc9279a430d (patch)
tree720471336eb74ebfa36f49043063f3455c72bd43
parent869bf47971914d36b6ccd785432c83ce088ddc9d (diff)
parentedbfb776cf13107e6d6b0a4d3df2ca1e8bcaa170 (diff)
downloaddisutils2-c00356888d4cce280d33dd86c7349bc9279a430d.tar.gz
Merge fixes for #13170 and #12386 and other misc. changes from default
-rw-r--r--CHANGES.txt166
-rw-r--r--CONTRIBUTORS.txt41
-rw-r--r--DEVNOTES.txt37
-rw-r--r--README.txt53
-rwxr-xr-xcheck.sh4
-rw-r--r--distutils2/_backport/shutil.py7
-rw-r--r--distutils2/command/install_data.py2
-rw-r--r--distutils2/command/install_distinfo.py2
-rw-r--r--distutils2/tests/test_command_install_data.py70
-rw-r--r--distutils2/tests/test_command_install_distinfo.py5
-rw-r--r--distutils2/tests/test_pypi_simple.py6
-rwxr-xr-xtests.sh8
12 files changed, 334 insertions, 67 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index efebca3..5d42e27 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,16 +1,154 @@
-=======
-CHANGES
-=======
+====================
+Distutils2 Changelog
+====================
-1.0a4 - ?
----------
+This file should list all changes made to the user-visible behavior and the
+public API, all important internal changes to help developers merge changes with
+their clones, and all changes that have a bug report. Contributors' first names
+(and last name initial when needed) are given for each item; see
+CONTRIBUTORS.txt for full names. Bug numbers refer to http://bugs.python.org/.
+
+
+1.0a4 - 2011-12-??
+------------------
+
+- Remove type check for commands in favor of minimal duck type check [tarek]
+- Add setup_hook, run between setup.cfg parsing and any other action [tarek]
+- Allow configuring command classes in setup.cfg [tarek]
+- Add description-file to setup.cfg [tarek]
+- Make Manifest.read_template accept file objects [tarek]
+- Replace MANIFEST.in with extra_files field in setup.cfg for sdist [tarek]
+- Abandon converter idea for d1-d2 migration [tarek]
+- Make 'include' default action for extra_files lines [tarek]
+- Rename py_modules to modules in setup.cfg [tarek]
+- Add detection of files in mkcfg [tarek]
+- Remove core module [tarek]
+- Remove log module, use standard logging with 'distutils2' logger name [tarek]
+- Allow configuring sub-commands in setup.cfg [tarek]
+- Add manifest_builders field [tarek]
+- Move useful functions from compiler.ccompiler to compiler [tarek]
+- Compiler classes should now define a description attribute [tarek]
+- Compiler classes are now loaded with their fully qualified names [tarek]
+- Allow registering extra compiler classes in setup.cfg [tarek]
+- The EMX compiler is gone [tarek]
+- Standard command classes are now registered with set_commands;
+ command_packages is gone [tarek]
+- Move extension module to compiler.extension [tarek]
+- The compiler_type attribute of compiler classes is now name [tarek]
+- Document the setup.cfg file format in a specification that can be used by
+ non-Python developers [tarek, éric, julien j]
+- #10409: Fixed the License selector in mkcfg [tarek]
+- #9558: Fix build_ext with VS 8.0 [éric]
+- #6007: Add disclaimer about MinGW compatibility in docs [éric]
+- #11038: Add strict parameter to metadata.check, use it in check command [gaël]
+- Support multiple files in description-file [gaël]
+- Simplify and rename package_dir to packages_root: only one root directory for
+ all packages and modules is allowed [tarek]
+- Add util.generate_setup_py to create a setup.py script compatible with
+ distutils that takes information from a setup.cfg [julien m]
+- README or README.txt and test/test*.py are no longer included in sdists
+ [godefroid]
+- Move PEP 345 markers interpreter from metadata to markers [tarek]
+- #11057: Fix two NameErrors [éric]
+- Add install.remove, the uninstall feature [gaël]
+- Reuse info from existing setup.py when creating a setup.cfg with mkcfg [alain]
+- Add support for extension modules in setup.cfg [andré]
+- Arguments that specify the target directory for install-related functions in
+ install don't have default values anymore [yannick]
+- Add paths argument to install.install* functions to allow working outside of
+ sys.path [tarek]
+- Metadata.check and check command now want an author field, even if maintainer
+ is supplied [godefroid]
+- Renamed DistributionMetadata to Metadata [chistophe]
+- Make --help-commands work again [éric]
+- Fix index.dist.DistInfo.unpack to really use the path given as argument
+ [kelsey]
+- Introduce the resources system, a major overhaul of data_files installation
+ that supports putting files in various directories compliant with OS policies
+ and pain-free use of these files by Python code [boris, pierre-yves]
+- New util.iglob function supporting more patterns than stdlib glob
+ [pierre-yves]
+- Add 'pysetup create' to prompt the user and create a setup.cfg file with the
+ answers [tarek]
+- Convert and import the code into the CPython 3.3 repository [tarek, arc,
+ vinay, elson, walker, michael, kelsey, jason, alexis, éric, victor]; in the
+ distutils2 backport, change some names to match the CPython repo: exception
+ names start with "Packaging", there is a util.is_packaging function, etc.
+- Add bdist_wininst helpers compiled with Visual Studio 10 [jason]
+- 'pysetup install' now accepts a patch to a directory or to an archive in
+ addition to a PyPI project name [kelsey]
+- Rename mkcfg to create [éric]
+- Add function to convert an egg-info file or directory to dist-info [kelsey]
+- Add functions to detect if a project uses distutils, setuptools or packaging
+ [kelsey, hugo]
+- Config fields that support environment markers (PEP 345) can now check
+ 'platform.python_implementation' [alexis]
+- Use True and False instead of 0 and 1 (compatible change that makes the intent
+ of the code clearer) [éric]
+- Rename 'pysetup list' the action used to look for installed projects [alexis]
+- Add 'pysetup search' to look for projects on an index/catalog [alexis]
+- Rename packaging.index back to packaging.pypi [kelsey]
+- Clean up logging setup, improve tests.support.LoggingCatcher [éric]
+- Replace warnings by logging, remove display_warning argument of
+ Metadata.__init__, kill warn/announce/debug_print methods [éric]
+- Improve EnvironGuard and rename it EnvironRestorer [éric]
+- Move PEP 376 implementation from pkgutil to packaging.database [éric]
+- Add version attribute to database.*Distribution classes [éric]
+- #10419, #6011: Make sure build_scripts can handle non-ASCII path for the
+ Python interpreter used in shebangs [victor]
+- #12112, #12320, #9561: Use UTF-8 to read or write setup.cfg, setup.py and
+ METADATA files instead of the default, locale-dependent encoding [victor]
+- #12114: Fix potential deadlock or zombification in util._find_exe_version
+ [victor]
+- Use / as path separator in setup.cfg created by 'pysetup create' even on
+ Windows [tarek]
+- Use / as path separator in RECORD file even on Windows [tarek]
+- #6459: Fix the import symbol in extension modules [tarek]
+- #10126: Fix for python built in shared mode on Unix [tarek]
+- #10359: ';' after function definition is invalid in ISO C [éric]
+- Remove the resources submodule, move its functions into resources [tarek]
+- Update the docs and move them to the CPython repository [kelsey, elson,
+ guillermoo, éric]
+- Add 'pysetup generate-setup' to expose util.generate_setup_py [tarek]
+- #11092: Make sdist always include setup.cfg [éric]
+- #12246: Don’t try to install something when running from an uninstalled Python
+ built in its checkout [tschepang, éric]
+- Add packaging.util.split_multiline [julien m, erik]
+- #11595: Fix assorted bugs in packaging.util.cfg_to_args [erik, éric]
+- #12240: Allow multiple setup hooks [erik, éric]
+- #11637: Fix support for importing setup hooks from the project directory
+ [vinay, éric]
+- #9516: Revise deployment target processing for OS X [ned]
+- #12169, #10510: Factor out code used by various commands to make HTTP POST
+ requests, and make sure it uses CRLF [john, éric]
+- #12504: Close file handles in a timely manner in database; this fixes a bug
+ with the remove (uninstall) feature on Windows [thomas]
+- #11409, #12222: Let all pysetup actions return a meaningful 0 or 1 exit code
+ [kelsey, éric]
+- Add filesafe argument to Metadata.get_fullname and Distribution.get_fullname
+ [jeremy]
+- Change distutils2's setup.py script to get info from the setup.cfg [jeremy]
+- Add support for building OpenSSL on Windows (for _backports.hashlib) [jeremy]
+- Print all fields when calling 'pysetup metadata' without options, remove --all
+ option for metadata and list actions [éric]
+- Remove display options (--name, etc.) from the Distribution class; this has
+ the side effect that 'url' is no longer accepted as key in the attrs argument
+ of the class' constructor, it needs to be 'home-page' to be recognized as
+ valid metadata field [éric]
+- #10946: Make bdist_dumb, bdist_wininst and bdist_msi respect a --skip-build
+ option given to bdist [éric]
+- The right-hand part in [extension: foo] (in a setup.cfg) is now used as the
+ name of the extension module [éric]
+- #8933: METADATA files will now correctly report Metadata-Version: 1.1 instead
+ of 1.0 if a Classifier or Download-URL field is present [filip, éric]
+- Create a branch for a Python 3 version of distutils2 [éric]
+- #10359: Make C code in one test comply with ISO C [hallvard]
+- #11254: Fix byte-compilation to comply with PEP 3147 on Python 3.2+ [éric]
+- #13114: Add tests for Unicode handling in check and register [éric]
+- #13170: Revert one of Jeremy's changes to config to fix a bug, kludge around
+ shlex not supporting unicode in 2.x, fix wrong shutil import [david, éric]
+- #13205: Fix and improve generated setup scripts [david, éric]
-- The setup runner supports more options:
-- XXX fill changes done in commands + compilers [tarek]
-- Issue #10409: Fixed the Licence selector in mkcfg [tarek]
-- Issue #9558: Fix build_ext with VS 8.0 [éric]
-- Issue #6007: Add disclaimer about MinGW compatibility in docs [éric]
-- Renamed DistributionMetadata to Metadata [ccomb]
1.0a3 - 2010-10-08
------------------
@@ -19,8 +157,8 @@ CHANGES
- Fixed the installation when using easy_install and Pip by switching
setup.py to distutils1 [holger/tarek]
- Added missing c/h files in the MANIFEST so they are always present
- no matter which Python version was used to build it. [holger/tarek]
-- Added the new setup runner that uses only setup.cfg
+ no matter which Python version was used to build it [holger/tarek]
+- Added pysetup, the new setup runner that uses only setup.cfg
- Renamed mkpkg to mkcfg [tarek]
- Renamed install_tools to install [alexis]
@@ -44,7 +182,7 @@ CHANGES
- Remove PyPIRCCommand, move its helper code into util [tarek]
- Remove Mac OS 9 support [éric]
- Start adding docstrings to interface methods [jeremy]
-- Move documentation from the stdlib [ali, éric]
+- Copy documentation from the stdlib [ali, éric]
- Lots of bug fixes, cleanups, tests [everyone]
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt
index b37b403..9e6ef84 100644
--- a/CONTRIBUTORS.txt
+++ b/CONTRIBUTORS.txt
@@ -1,44 +1,69 @@
-============
-Contributors
-============
+=======================
+Distutils2 Contributors
+=======================
-Distutils2 is a project that was started and that is maintained by
-Tarek Ziadé, and many people are contributing to the project.
+The Distutils2 project was started by Tarek Ziadé and is currently
+maintained by Éric Araujo. Many people have contributed to the project.
-If you did, please add your name below in alphabetical order!
+If you're making a patch, please add your name below in alphabetical order,
+and welcome into the Fellowship of the Packaging!
Thanks to:
- Rajiv Abraham
- Ali Afshar
-- Éric Araujo
+- David Barnett
- Pior Bastida
- Anthony Baxter
-- Titus Brown
+- Erik Bray
+- C. Titus Brown
- Nicolas Cadou
+- Godefroid Chapelle
+- Christophe Combelles
+- Jason R. Coombs
+- Pierre-Yves David
+- Ned Deily
- Konrad Delong
- Josip Djolonga
+- John Edmonds
+- André Espaze
+- Boris Feld
- Andrew Francis
+- Hallvard B Furuseth
- Yannick Gingras
+- Filip Gruszczyński
+- guillermoo
+- Walker Hale IV
- Alexandre Hamelin
- Kelsey Hightower
+- Thomas Holmes
- Christian Hudon
+- Julien Jehannet
- Jeremy Kloth
- Amos Latteier
- Mathieu Leduc-Hamel
+- Tshepang Lekhonkhobe
+- Alain Leufroy
- Martin von Löwis
+- Hugo Lopes Tavares
- Simon Mathieu
- Carl Meyer
- Alexis Métaireau
+- Julien Miotte
- Zubin Mithra
- Derek McTavish Mounce
- Michael Mulich
- Louis Munro
+- Gaël Pasgrimaud
- George Peristerakis
- Mathieu Perreault
- Sean Reifschneider
- Antoine Reversat
+- Arc Riley
+- Elson Rodriguez
- Luis Rojas
- Erik Rose
- Brian Rosner
+- Vinay Sajip
+- Victor Stinner
- Alexandre Vassalotti
diff --git a/DEVNOTES.txt b/DEVNOTES.txt
index 126418c..54d3476 100644
--- a/DEVNOTES.txt
+++ b/DEVNOTES.txt
@@ -1,16 +1,33 @@
-Notes for developers
====================
+Notes for Developers
+====================
+
+- Distutils2 has been merged into the CPython repository under the module name
+ "packaging", for release with Python 3.3. The Distutils2 repository is used
+ to maintain the backport released on PyPI for older Python versions. It is
+ recommended to work in the CPython repository if possible, but you but you
+ can make patches for the Distutils2 repository if you prefer.
+
+ Repo: http://hg.python.org/cpython (default branch)
+ More info: http://wiki.python.org/moin/Distutils/Contributing
-- Distutils2 runs on Python from 3.1 to 3.2 so make sure you don't use code
- that doesn't work under one of these Python versions. The version compatible
- with 2.4-2.7 in the "default" branch.
+- Distutils2 runs on Python from 2.4 to 2.7, so make sure you don't use code
+ that doesn't work under one of these Python versions. The version in the
+ "python3" branch is compatible with all version from 3.1 to 3.3.
- When merging default into python3, don't keep maximum compatibility with
- Python 2 but use idiomatic 3.x code. For difficult conversions like encoding
- handling with I/O, you can have a look or use a diff tool with the same file
- in distutils or packaging from Python 3.3.
+ Python 2 but use idiomatic 3.x code, as long as it's compatible with all 3.x
+ versions. For difficult conversions like encoding handling with I/O, you can
+ have a look or use a diff tool with the same file in distutils or packaging
+ from Python 3.3. If you can't run tests, let someone else do the merge.
+
+- For 2.4, you need to run "python2.4 setup.py build" before you can try out
+ pysetup or run tests (unless you use the runtests.py script which will call
+ "setup.py build" automatically).
- Always run tests.sh before you commit a change. This implies that you have
- Python 3.1 and 3.2 installed as well as a checkout of Python 3.3 with its
- executable available as "python3.3" in your $PATH. Be sure to also have
- docutils installed on all Python versions to avoid skipping tests.
+ all Python versions installed from 2.4 to 2.7, as well as 3.1-.3.3 if you
+ merge into the python3 branch. Be sure to also have docutils installed on all
+ Python versions to avoid skipping tests.
+
+- Don't forget to update CONTRIBUTORS.txt and CHANGES.txt.
diff --git a/README.txt b/README.txt
index 90a78bc..851cb4d 100644
--- a/README.txt
+++ b/README.txt
@@ -1,24 +1,43 @@
-==========
-Distutils2
-==========
+=======================
+ Welcome to Distutils2
+=======================
-Welcome to Distutils2!
+Distutils2 is the packaging library that supersedes Distutils. It has three
+main audiences:
-Distutils2 is the new version of Distutils. It's not backward compatible with
-Distutils but provides more features, and implement most new packaging
-standards.
+- Python authors who want to distribute their code
+- End users who want to install modules or applications
+- Developers of packaging-related tools who need a support library to
+ build on
-See the documentation at http://packages.python.org/Distutils2 for more info.
+Authors will have to write a :file:`setup.cfg` file and run a few
+commands to package and distribute their code. End users will be able to
+search for, install and remove Python projects with the included
+``pysetup`` program. Last, developers will be able to reuse classes and
+functions in their tools.
-If you want to contribute, please have a look to
-http://distutils2.notmyidea.org/contributing.html
+The Distutils2 codebase is a fork of Distutils. It is not backward compatible
+with Distutils and does not depend on it. It provides more features and
+implements new packaging standards. In Python 3.3, Distutils2 is included in
+the standard library under the module name "packaging". Documentation is
+provided at http://docs.python.org/dev/packaging --for ease of maintenance, it
+is not duplicated in this repository. You can use the Packaging documentation
+to use Distutils2; only the package name is different (packaging vs.
+distutils2), all modules, classes and functions have the same name.
-**Beware that Distutils2 is in its early stage and should not be used in
-production. Its API is subject to changes**
+If you want to contribute, please have a look at DEVNOTES.txt or
+http://wiki.python.org/Distutils2/Contributing .
-Useful further links:
+Beware that Distutils2 is still in alpha stage and its API is subject to
+change. It should be not used for critical deployments. That said, it
+is possible to start using it while keeping compatiblity with tools based
+on the old Distutils or Setuptools, and the developers are eager to get
+feedback from authors, end users and developers.
-Mailing list: http://mail.python.org/mailman/listinfo/distutils-sig/
-Documentation: http://packages.python.org/Distutils2
-Repository: http://hg.python.org/distutils2
-Bug tracker: http://bugs.python.org
+Useful links:
+
+- Mailing list: http://mail.python.org/mailman/listinfo/distutils-sig/
+- Mailing list with friendly tutors to guide new contributors:
+ http://mail.python.org/mailman/listinfo/core-mentorship
+- Repository: http://hg.python.org/distutils2
+- Bug tracker: http://bugs.python.org/ (component "Distutils2")
diff --git a/check.sh b/check.sh
index bc77bf9..6316d49 100755
--- a/check.sh
+++ b/check.sh
@@ -1,2 +1,4 @@
-pep8 distutils2
+# TODO exclude backports
pyflakes distutils2
+pep8 -r distutils2
+# maybe: exit $?
diff --git a/distutils2/_backport/shutil.py b/distutils2/_backport/shutil.py
index 0b5d2e5..faaa803 100644
--- a/distutils2/_backport/shutil.py
+++ b/distutils2/_backport/shutil.py
@@ -197,12 +197,7 @@ def copytree(src, dst, symlinks=False, ignore=None, copy_function=copy2,
else:
ignored_names = set()
- try:
- os.makedirs(dst)
- except OSError as e:
- if e.errno != errno.EEXIST:
- raise
-
+ os.makedirs(dst)
errors = []
for name in names:
if name in ignored_names:
diff --git a/distutils2/command/install_data.py b/distutils2/command/install_data.py
index d3c67a7..d2a8015 100644
--- a/distutils2/command/install_data.py
+++ b/distutils2/command/install_data.py
@@ -3,10 +3,10 @@
# Contributed by Bastian Kleineidam
import os
-from shutil import Error
from distutils2 import logger
from distutils2.util import convert_path
from distutils2.command.cmd import Command
+from distutils2._backport.shutil import Error
from distutils2._backport.sysconfig import get_paths, format_value
diff --git a/distutils2/command/install_distinfo.py b/distutils2/command/install_distinfo.py
index 1220551..167844c 100644
--- a/distutils2/command/install_distinfo.py
+++ b/distutils2/command/install_distinfo.py
@@ -104,7 +104,7 @@ class install_distinfo(Command):
'RESOURCES')
logger.info('creating %s', resources_path)
if not self.dry_run:
- with open(resources_path, 'wb') as f:
+ with open(resources_path, 'w') as f:
writer = csv.writer(f, delimiter=',',
lineterminator='\n',
quotechar='"')
diff --git a/distutils2/tests/test_command_install_data.py b/distutils2/tests/test_command_install_data.py
index d4bb483..ba93cce 100644
--- a/distutils2/tests/test_command_install_data.py
+++ b/distutils2/tests/test_command_install_data.py
@@ -1,28 +1,37 @@
"""Tests for distutils2.command.install_data."""
import os
+import sys
+import distutils2.database
from distutils2._backport import sysconfig
from distutils2._backport.sysconfig import _get_default_scheme
from distutils2.tests import unittest, support
from distutils2.command.install_data import install_data
+from distutils2.command.install_dist import install_dist
+from distutils2.command.install_distinfo import install_distinfo
class InstallDataTestCase(support.TempdirManager,
support.LoggingCatcher,
unittest.TestCase):
- def test_simple_run(self):
+ def setUp(self):
+ super(InstallDataTestCase, self).setUp()
scheme = _get_default_scheme()
old_items = sysconfig._SCHEMES.items(scheme)
+
def restore():
sysconfig._SCHEMES.remove_section(scheme)
sysconfig._SCHEMES.add_section(scheme)
for option, value in old_items:
sysconfig._SCHEMES.set(scheme, option, value)
+
self.addCleanup(restore)
+ def test_simple_run(self):
pkg_dir, dist = self.create_dist()
cmd = install_data(dist)
cmd.install_dir = inst = os.path.join(pkg_dir, 'inst')
+ scheme = _get_default_scheme()
sysconfig._SCHEMES.set(scheme, 'inst',
os.path.join(pkg_dir, 'inst'))
@@ -67,8 +76,7 @@ class InstallDataTestCase(support.TempdirManager,
three = os.path.join(cmd.install_dir, 'three')
self.write_file(three, 'xx')
- sysconfig._SCHEMES.set(scheme, 'inst3',
- cmd.install_dir)
+ sysconfig._SCHEMES.set(scheme, 'inst3', cmd.install_dir)
cmd.data_files = {one: '{inst}/one', two: '{inst2}/two',
three: '{inst3}/three'}
@@ -80,6 +88,62 @@ class InstallDataTestCase(support.TempdirManager,
self.assertTrue(os.path.exists(os.path.join(inst2, rtwo)))
self.assertTrue(os.path.exists(os.path.join(inst, rone)))
+ def test_resources(self):
+ install_dir = self.mkdtemp()
+ scripts_dir = self.mkdtemp()
+ project_dir, dist = self.create_dist(
+ name='Spamlib', version='0.1',
+ data_files={'spamd': '{scripts}/spamd'})
+
+ os.chdir(project_dir)
+ self.write_file('spamd', '# Python script')
+ sysconfig._SCHEMES.set(_get_default_scheme(), 'scripts', scripts_dir)
+ sys.path.insert(0, install_dir)
+ distutils2.database.disable_cache()
+ self.addCleanup(sys.path.remove, install_dir)
+ self.addCleanup(distutils2.database.enable_cache)
+
+ cmd = install_dist(dist)
+ cmd.outputs = ['spamd']
+ cmd.install_lib = install_dir
+ dist.command_obj['install_dist'] = cmd
+
+ cmd = install_data(dist)
+ cmd.install_dir = install_dir
+ cmd.ensure_finalized()
+ dist.command_obj['install_data'] = cmd
+ cmd.run()
+
+ cmd = install_distinfo(dist)
+ cmd.ensure_finalized()
+ dist.command_obj['install_distinfo'] = cmd
+ cmd.run()
+
+ # first a few sanity checks
+ self.assertEqual(os.listdir(scripts_dir), ['spamd'])
+ self.assertEqual(os.listdir(install_dir), ['Spamlib-0.1.dist-info'])
+
+ # now the real test
+ fn = os.path.join(install_dir, 'Spamlib-0.1.dist-info', 'RESOURCES')
+ fp = open(fn)
+ try:
+ content = fp.read().strip()
+ finally:
+ fp.close()
+
+ expected = 'spamd,%s' % os.path.join(scripts_dir, 'spamd')
+ self.assertEqual(content, expected)
+
+ # just to be sure, we also test that get_file works here, even though
+ # packaging.database has its own test file
+ fp = distutils2.database.get_file('Spamlib', 'spamd')
+ try:
+ content = fp.read()
+ finally:
+ fp.close()
+
+ self.assertEqual('# Python script', content)
+
def test_suite():
return unittest.makeSuite(InstallDataTestCase)
diff --git a/distutils2/tests/test_command_install_distinfo.py b/distutils2/tests/test_command_install_distinfo.py
index 9e77e47..9898c2f 100644
--- a/distutils2/tests/test_command_install_distinfo.py
+++ b/distutils2/tests/test_command_install_distinfo.py
@@ -1,4 +1,7 @@
-"""Tests for ``distutils2.command.install_distinfo``. """
+"""Tests for ``distutils2.command.install_distinfo``.
+
+Writing of the RESOURCES file is tested in test_command_install_data.
+"""
import os
import csv
diff --git a/distutils2/tests/test_pypi_simple.py b/distutils2/tests/test_pypi_simple.py
index 93d6fac..c587701 100644
--- a/distutils2/tests/test_pypi_simple.py
+++ b/distutils2/tests/test_pypi_simple.py
@@ -87,7 +87,11 @@ class SimpleCrawlerTestCase(TempdirManager,
try:
crawler._open_url(url)
except Exception as v:
- self.assertIn('nonnumeric port', str(v))
+ if sys.version_info[:2] < (3, 3):
+ wanted = 'nonnumeric port'
+ else:
+ wanted = 'Download error'
+ self.assertIn(wanted, str(v))
# issue #160
url = server.full_address
diff --git a/tests.sh b/tests.sh
index 6c04426..4110420 100755
--- a/tests.sh
+++ b/tests.sh
@@ -4,7 +4,7 @@ python3.1 -Wd runtests.py -q
if [ $? -ne 0 ];then
echo Failed, re-running
python3.1 -Wd runtests.py
- exit 1
+ exit $?
else
echo Success
fi
@@ -14,7 +14,7 @@ python3.2 -Wd runtests.py -q
if [ $? -ne 0 ];then
echo Failed, re-running
python3.2 -Wd runtests.py
- exit 1
+ exit $?
else
echo Success
fi
@@ -24,14 +24,14 @@ python3.3 -Wd runtests.py -q
if [ $? -ne 0 ];then
echo Failed, re-running
python3.3 -Wd runtests.py
- exit 1
+ exit $?
else
echo Success
fi
if [ $? -ne 0 ];then
echo Failed
- exit 1
+ exit $?
else
echo "Good job, commit now! (or add tests)"
fi