Skip to content

Commit af9e245

Browse files
authored
Merge pull request #4649 from pypa/feature/distutils-7283751
Merge pypa/distutils
2 parents ffdf0bd + f15861e commit af9e245

28 files changed

+181
-2116
lines changed

Diff for: newsfragments/4649.removal.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Merge with pypa/distutils@7283751. Removed the register and upload commands and the config module that backs them (pypa/distutils#294). Removed the borland compiler. Replaced vendored dependencies with natural dependencies. Cygwin C compiler now gets compilers from sysconfig (pypa/distutils#296).

Diff for: setuptools/_distutils/_collections.py

-58
This file was deleted.

Diff for: setuptools/_distutils/_functools.py

-73
This file was deleted.

Diff for: setuptools/_distutils/_itertools.py

-52
This file was deleted.

Diff for: setuptools/_distutils/_modified.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import functools
44
import os.path
55

6-
from ._functools import splat
6+
from jaraco.functools import splat
7+
78
from .compat.py39 import zip_strict
89
from .errors import DistutilsFileError
910

Diff for: setuptools/_distutils/_msvccompiler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def _get_vc_env(plat_spec):
159159
stderr=subprocess.STDOUT,
160160
).decode('utf-16le', errors='replace')
161161
except subprocess.CalledProcessError as exc:
162-
log.error(exc.output) # noqa: RUF100, TRY400
162+
log.error(exc.output)
163163
raise DistutilsPlatformError(f"Error executing {exc.cmd}")
164164

165165
env = {

Diff for: setuptools/_distutils/archive_util.py

+4-22
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
that sort of thing)."""
55

66
import os
7-
import sys
8-
from warnings import warn
97

108
try:
119
import zipfile
@@ -67,8 +65,7 @@ def make_tarball(
6765
"""Create a (possibly compressed) tar file from all the files under
6866
'base_dir'.
6967
70-
'compress' must be "gzip" (the default), "bzip2", "xz", "compress", or
71-
None. ("compress" will be deprecated in Python 3.2)
68+
'compress' must be "gzip" (the default), "bzip2", "xz", or None.
7269
7370
'owner' and 'group' can be used to define an owner and a group for the
7471
archive that is being built. If not provided, the current owner and group
@@ -84,20 +81,17 @@ def make_tarball(
8481
'bzip2': 'bz2',
8582
'xz': 'xz',
8683
None: '',
87-
'compress': '',
8884
}
89-
compress_ext = {'gzip': '.gz', 'bzip2': '.bz2', 'xz': '.xz', 'compress': '.Z'}
85+
compress_ext = {'gzip': '.gz', 'bzip2': '.bz2', 'xz': '.xz'}
9086

9187
# flags for compression program, each element of list will be an argument
9288
if compress is not None and compress not in compress_ext.keys():
9389
raise ValueError(
94-
"bad value for 'compress': must be None, 'gzip', 'bzip2', "
95-
"'xz' or 'compress'"
90+
"bad value for 'compress': must be None, 'gzip', 'bzip2', 'xz'"
9691
)
9792

9893
archive_name = base_name + '.tar'
99-
if compress != 'compress':
100-
archive_name += compress_ext.get(compress, '')
94+
archive_name += compress_ext.get(compress, '')
10195

10296
mkpath(os.path.dirname(archive_name), dry_run=dry_run)
10397

@@ -125,18 +119,6 @@ def _set_uid_gid(tarinfo):
125119
finally:
126120
tar.close()
127121

128-
# compression using `compress`
129-
if compress == 'compress':
130-
warn("'compress' is deprecated.", DeprecationWarning)
131-
# the option varies depending on the platform
132-
compressed_name = archive_name + compress_ext[compress]
133-
if sys.platform == 'win32':
134-
cmd = [compress, archive_name, compressed_name]
135-
else:
136-
cmd = [compress, '-f', archive_name]
137-
spawn(cmd, dry_run=dry_run)
138-
return compressed_name
139-
140122
return archive_name
141123

142124

0 commit comments

Comments
 (0)