mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Packaging cleanup: remove conditionals for < 2.6 support.
PEP 370 features and sys.dont_write_bytecode are always available in 3.3; the distutils2 backport still has the conditionals. I also renamed an internal misnamed method and fixed a few things (“packaging2” name, stray print, unused import, fd leak).
This commit is contained in:
parent
37ccd6f794
commit
7724a6c10c
16 changed files with 47 additions and 96 deletions
|
@ -72,7 +72,6 @@ class InstallTestCase(support.TempdirManager,
|
|||
check_path(cmd.install_scripts, os.path.join(destination, "bin"))
|
||||
check_path(cmd.install_data, destination)
|
||||
|
||||
@unittest.skipIf(sys.version < '2.6', 'requires Python 2.6 or higher')
|
||||
def test_user_site(self):
|
||||
# test install with --user
|
||||
# preparing the environment for the test
|
||||
|
@ -173,12 +172,11 @@ class InstallTestCase(support.TempdirManager,
|
|||
cmd.home = 'home'
|
||||
self.assertRaises(PackagingOptionError, cmd.finalize_options)
|
||||
|
||||
if sys.version >= '2.6':
|
||||
# can't combine user with with prefix/exec_prefix/home or
|
||||
# install_(plat)base
|
||||
cmd.prefix = None
|
||||
cmd.user = 'user'
|
||||
self.assertRaises(PackagingOptionError, cmd.finalize_options)
|
||||
# can't combine user with with prefix/exec_prefix/home or
|
||||
# install_(plat)base
|
||||
cmd.prefix = None
|
||||
cmd.user = 'user'
|
||||
self.assertRaises(PackagingOptionError, cmd.finalize_options)
|
||||
|
||||
def test_old_record(self):
|
||||
# test pre-PEP 376 --record option (outside dist-info dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue