diff options
author | Éric Araujo <merwok@netwok.org> | 2011-06-16 21:34:55 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-06-16 21:34:55 (GMT) |
commit | b6be20ca337348b7cf2b356f9354a4121627add0 (patch) | |
tree | 23cea276dc7e0b5193ebe0951e1d6cde8779af25 /Lib/packaging/tests | |
parent | 434812d569eef54dd79936e581fc20df57671158 (diff) | |
download | cpython-b6be20ca337348b7cf2b356f9354a4121627add0.zip cpython-b6be20ca337348b7cf2b356f9354a4121627add0.tar.gz cpython-b6be20ca337348b7cf2b356f9354a4121627add0.tar.bz2 |
Packaging: remove last mentions and uses of setup.py in the code.
Now only the compatibility layer (in create, util and install) talk
about setup.py.
Diffstat (limited to 'Lib/packaging/tests')
-rw-r--r-- | Lib/packaging/tests/test_command_bdist_dumb.py | 16 | ||||
-rw-r--r-- | Lib/packaging/tests/test_dist.py | 4 |
2 files changed, 3 insertions, 17 deletions
diff --git a/Lib/packaging/tests/test_command_bdist_dumb.py b/Lib/packaging/tests/test_command_bdist_dumb.py index b235795..fd199ea 100644 --- a/Lib/packaging/tests/test_command_bdist_dumb.py +++ b/Lib/packaging/tests/test_command_bdist_dumb.py @@ -1,6 +1,5 @@ """Tests for distutils.command.bdist_dumb.""" -import sys import os from packaging.dist import Distribution @@ -9,15 +8,6 @@ from packaging.tests import unittest, support from packaging.tests.support import requires_zlib -SETUP_PY = """\ -from distutils.run import setup -import foo - -setup(name='foo', version='0.1', py_modules=['foo'], - url='xxx', author='xxx', author_email='xxx') -""" - - class BuildDumbTestCase(support.TempdirManager, support.LoggingCatcher, unittest.TestCase): @@ -25,12 +15,9 @@ class BuildDumbTestCase(support.TempdirManager, def setUp(self): super(BuildDumbTestCase, self).setUp() self.old_location = os.getcwd() - self.old_sys_argv = sys.argv, sys.argv[:] def tearDown(self): os.chdir(self.old_location) - sys.argv = self.old_sys_argv[0] - sys.argv[:] = self.old_sys_argv[1] super(BuildDumbTestCase, self).tearDown() @requires_zlib @@ -40,7 +27,6 @@ class BuildDumbTestCase(support.TempdirManager, tmp_dir = self.mkdtemp() pkg_dir = os.path.join(tmp_dir, 'foo') os.mkdir(pkg_dir) - self.write_file((pkg_dir, 'setup.py'), SETUP_PY) self.write_file((pkg_dir, 'foo.py'), '#') self.write_file((pkg_dir, 'MANIFEST.in'), 'include foo.py') self.write_file((pkg_dir, 'README'), '') @@ -50,8 +36,6 @@ class BuildDumbTestCase(support.TempdirManager, 'url': 'xxx', 'author': 'xxx', 'author_email': 'xxx'}) os.chdir(pkg_dir) - - sys.argv[:] = ['setup.py'] cmd = bdist_dumb(dist) # so the output is the same no matter diff --git a/Lib/packaging/tests/test_dist.py b/Lib/packaging/tests/test_dist.py index e1c5ff0..9ad7a08 100644 --- a/Lib/packaging/tests/test_dist.py +++ b/Lib/packaging/tests/test_dist.py @@ -4,6 +4,7 @@ import io import sys import logging import textwrap +import sysconfig import packaging.dist from packaging.dist import Distribution @@ -396,7 +397,8 @@ class MetadataTestCase(support.TempdirManager, dist = Distribution() sys.argv = [] dist.help = True - dist.script_name = 'setup.py' + dist.script_name = os.path.join(sysconfig.get_path('scripts'), + 'pysetup') __, stdout = captured_stdout(dist.parse_command_line) output = [line for line in stdout.split('\n') if line.strip() != ''] |