Skip to content

Commit ee6fdd7

Browse files
authored
Sync with distutils @ e8eb878 (#5292)
2 parents cbd1195 + 2a4a9e4 commit ee6fdd7

94 files changed

Lines changed: 1755 additions & 1271 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/deprecated/distutils/apiref.rst‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ API Reference
2323

2424

2525
The :mod:`distutils.core` module is the only module that needs to be installed
26-
to use the Distutils. It provides the :func:`setup` (which is called from the
27-
setup script). Indirectly provides the :class:`distutils.dist.Distribution` and
28-
:class:`distutils.cmd.Command` class.
26+
to use the Distutils. It provides the :func:`setup` function (which is called
27+
from the setup script) and indirectly provides the
28+
:class:`distutils.dist.Distribution` and :class:`distutils.cmd.Command` class.
2929

3030

3131
.. function:: setup(arguments)

‎docs/deprecated/distutils/builtdist.rst‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ Distutils configuration files. Various options and sections in the
195195
| Version | ``version`` |
196196
+------------------------------------------+----------------------------------------------+
197197
| Vendor | ``author`` and ``author_email``, |
198-
| | or --- & ``maintainer`` and |
199-
| | ``maintainer_email`` |
198+
| | or ``maintainer`` and ``maintainer_email`` |
200199
+------------------------------------------+----------------------------------------------+
201200
| Copyright | ``license`` |
202201
+------------------------------------------+----------------------------------------------+
@@ -294,7 +293,7 @@ installed, you can use a 32bit version of Windows to create 64bit extensions
294293
and vice-versa.
295294

296295
To build for an alternate platform, specify the :option:`!--plat-name` option
297-
to the build command. Valid values are currently 'win32', and 'win-amd64'.
296+
to the build command. Valid values are currently 'win32', and 'win-amd64'.
298297
For example, on a 32bit version of Windows, you could execute::
299298

300299
python setup.py build --plat-name=win-amd64
@@ -317,8 +316,8 @@ check or modify your existing install.)
317316

318317
.. _postinstallation-script:
319318

320-
The Postinstallation script
321-
---------------------------
319+
The Post-installation script
320+
----------------------------
322321

323322
Starting with Python 2.3, a postinstallation script can be specified with the
324323
:option:`!--install-script` option. The basename of the script must be

‎docs/deprecated/distutils/examples.rst‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ setup might look like this::
5757
foo.py
5858
bar.py
5959

60-
and the setup script might be ::
60+
and the setup script might be ::
6161

6262
from distutils.core import setup
6363
setup(name='foobar',
@@ -82,7 +82,7 @@ can just tell the Distutils to process modules from the root package, and that
8282
works the same as any other package (except that you don't have to have an
8383
:file:`__init__.py` file).
8484

85-
The setup script from the last example could also be written as ::
85+
The setup script from the last example could also be written as ::
8686

8787
from distutils.core import setup
8888
setup(name='foobar',
@@ -142,7 +142,7 @@ need to use the ``package_dir`` option again. For example, if the
142142
foo.py
143143
bar.py
144144

145-
an appropriate setup script would be ::
145+
an appropriate setup script would be ::
146146

147147
from distutils.core import setup
148148
setup(name='foobar',
@@ -160,7 +160,7 @@ root::
160160
foo.py
161161
bar.py
162162

163-
in which case your setup script would be ::
163+
in which case your setup script would be ::
164164

165165
from distutils.core import setup
166166
setup(name='foobar',
@@ -187,7 +187,7 @@ figure out which directories correspond to Python packages by looking for
187187
__init__.py
188188
blah.py
189189

190-
then the corresponding setup script would be ::
190+
then the corresponding setup script would be ::
191191

192192
from distutils.core import setup
193193
setup(name='foobar',
@@ -211,7 +211,7 @@ single extension module in a single C source file, is::
211211
foo.c
212212

213213
If the ``foo`` extension belongs in the root package, the setup script for
214-
this could be ::
214+
this could be ::
215215

216216
from distutils.core import setup
217217
from distutils.extension import Extension
@@ -322,7 +322,7 @@ You can read back this static file, by using the
322322
'Easily download, build, install, upgrade, and uninstall Python packages'
323323

324324
Notice that the class can also be instantiated with a metadata file path to
325-
loads its values::
325+
load its values::
326326

327327
>>> pkg_info_path = 'distribute-0.6.8-py2.7.egg-info'
328328
>>> DistributionMetadata(pkg_info_path).name

‎newsfragments/+.bugfix.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
``build_ext`` no longer fails when cross-compiling with a compiler other than MSVC (such as MinGW). ``Compiler`` now provides a no-op ``initialize()`` that non-MSVC compilers inherit. (pypa/distutils#399)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
``customize_compiler`` now asserts that the compiler-related config variables (``CC``, ``CXX``, ``CFLAGS``, etc.) resolve to strings, raising ``AssertionError`` if any are unexpectedly ``None`` rather than failing later with a less clear error. (pypa/distutils#363)

‎newsfragments/4177.bugfix.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The MSVC linker now passes its arguments through a response file when the command line would exceed the Windows maximum length, fixing failures when linking a large number of objects.

‎newsfragments/4873.bugfix.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The Cygwin and MinGW compilers now pass ``-O1`` instead of a bare ``-O``. The two are equivalent to GCC, but ``cc1`` rejected the bare form when building 32-bit extensions with ``-m32``. -- by :user:`dchaudhari7177`

‎newsfragments/4887.feature.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Newline-separated ``keywords`` and ``platforms``, which are invalid and corrupt the generated metadata (pypa/setuptools#4887), are now handled forgivingly: each line is treated as a separate item and a deprecation warning is emitted. Newlines were never a valid separator for these fields -- the `old specification <https://peps.python.org/pep-0345/>`_ separated items with spaces and the current one uses commas.

‎newsfragments/5022.feature.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
``Extension`` is now a dataclass, exposing type annotations for its constructor arguments so subclasses (e.g. in Setuptools) can inherit them without redeclaring each parameter. Passing unknown keyword arguments is now deprecated. (pypa/distutils#373)

‎newsfragments/5079.bugfix.rst‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
``copy_file`` now preserves the full precision of the source's modification time, so a copy is no longer considered older than its source on filesystems with sub-second timestamp resolution. (pypa/distutils#379)

0 commit comments

Comments
 (0)