Skip to content

Commit aa30da4

Browse files
committed
2 parents 2adbd4f + f3b2254 commit aa30da4

File tree

111 files changed

+5699
-663
lines changed

Some content is hidden

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

111 files changed

+5699
-663
lines changed

docs/deprecated/distutils/apiref.rst

+23-23
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ This module provides the following functions.
361361
are not given.
362362

363363

364-
.. function:: new_compiler(plat=None, compiler=None, verbose=0, dry_run=0, force=0)
364+
.. function:: new_compiler(plat=None, compiler=None, verbose=False, dry_run=False, force=False)
365365

366366
Factory function to generate an instance of some CCompiler subclass for the
367367
supplied platform/compiler combination. *plat* defaults to ``os.name`` (eg.
@@ -383,7 +383,7 @@ This module provides the following functions.
383383
to :command:`build`, :command:`build_ext`, :command:`build_clib`).
384384

385385

386-
.. class:: CCompiler([verbose=0, dry_run=0, force=0])
386+
.. class:: CCompiler([verbose=False, dry_run=False, force=False])
387387

388388
The abstract base class :class:`CCompiler` defines the interface that must be
389389
implemented by real compiler classes. The class also has some utility methods
@@ -517,7 +517,7 @@ This module provides the following functions.
517517
list) to do the job.
518518

519519

520-
.. method:: CCompiler.find_library_file(dirs, lib[, debug=0])
520+
.. method:: CCompiler.find_library_file(dirs, lib[, debug=False])
521521

522522
Search the specified list of directories for a static or shared library file
523523
*lib* and return the full path to that file. If *debug* is true, look for a
@@ -580,7 +580,7 @@ This module provides the following functions.
580580
The following methods invoke stages in the build process.
581581

582582

583-
.. method:: CCompiler.compile(sources[, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None, depends=None])
583+
.. method:: CCompiler.compile(sources[, output_dir=None, macros=None, include_dirs=None, debug=False, extra_preargs=None, extra_postargs=None, depends=None])
584584

585585
Compile one or more source files. Generates object files (e.g. transforms a
586586
:file:`.c` file to a :file:`.o` file.)
@@ -624,7 +624,7 @@ This module provides the following functions.
624624
Raises :exc:`CompileError` on failure.
625625

626626

627-
.. method:: CCompiler.create_static_lib(objects, output_libname[, output_dir=None, debug=0, target_lang=None])
627+
.. method:: CCompiler.create_static_lib(objects, output_libname[, output_dir=None, debug=False, target_lang=None])
628628

629629
Link a bunch of stuff together to create a static library file. The "bunch of
630630
stuff" consists of the list of object files supplied as *objects*, the extra
@@ -648,7 +648,7 @@ This module provides the following functions.
648648
Raises :exc:`LibError` on failure.
649649

650650

651-
.. method:: CCompiler.link(target_desc, objects, output_filename[, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None])
651+
.. method:: CCompiler.link(target_desc, objects, output_filename[, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=False, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None])
652652

653653
Link a bunch of stuff together to create an executable or shared library file.
654654

@@ -690,21 +690,21 @@ This module provides the following functions.
690690
Raises :exc:`LinkError` on failure.
691691

692692

693-
.. method:: CCompiler.link_executable(objects, output_progname[, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None, target_lang=None])
693+
.. method:: CCompiler.link_executable(objects, output_progname[, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, debug=False, extra_preargs=None, extra_postargs=None, target_lang=None])
694694

695695
Link an executable. *output_progname* is the name of the file executable, while
696696
*objects* are a list of object filenames to link in. Other arguments are as for
697697
the :meth:`link` method.
698698

699699

700-
.. method:: CCompiler.link_shared_lib(objects, output_libname[, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None])
700+
.. method:: CCompiler.link_shared_lib(objects, output_libname[, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=False, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None])
701701

702702
Link a shared library. *output_libname* is the name of the output library,
703703
while *objects* is a list of object filenames to link in. Other arguments are
704704
as for the :meth:`link` method.
705705

706706

707-
.. method:: CCompiler.link_shared_object(objects, output_filename[, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None])
707+
.. method:: CCompiler.link_shared_object(objects, output_filename[, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, export_symbols=None, debug=False, extra_preargs=None, extra_postargs=None, build_temp=None, target_lang=None])
708708

709709
Link a shared object. *output_filename* is the name of the shared object that
710710
will be created, while *objects* is a list of object filenames to link in.
@@ -726,28 +726,28 @@ This module provides the following functions.
726726
use by the various concrete subclasses.
727727

728728

729-
.. method:: CCompiler.executable_filename(basename[, strip_dir=0, output_dir=''])
729+
.. method:: CCompiler.executable_filename(basename[, strip_dir=False, output_dir=''])
730730

731731
Returns the filename of the executable for the given *basename*. Typically for
732732
non-Windows platforms this is the same as the basename, while Windows will get
733733
a :file:`.exe` added.
734734

735735

736-
.. method:: CCompiler.library_filename(libname[, lib_type='static', strip_dir=0, output_dir=''])
736+
.. method:: CCompiler.library_filename(libname[, lib_type='static', strip_dir=False, output_dir=''])
737737

738738
Returns the filename for the given library name on the current platform. On Unix
739739
a library with *lib_type* of ``'static'`` will typically be of the form
740740
:file:`liblibname.a`, while a *lib_type* of ``'dynamic'`` will be of the form
741741
:file:`liblibname.so`.
742742

743743

744-
.. method:: CCompiler.object_filenames(source_filenames[, strip_dir=0, output_dir=''])
744+
.. method:: CCompiler.object_filenames(source_filenames[, strip_dir=False, output_dir=''])
745745

746746
Returns the name of the object files for the given source files.
747747
*source_filenames* should be a list of filenames.
748748

749749

750-
.. method:: CCompiler.shared_object_filename(basename[, strip_dir=0, output_dir=''])
750+
.. method:: CCompiler.shared_object_filename(basename[, strip_dir=False, output_dir=''])
751751

752752
Returns the name of a shared object file for the given file name *basename*.
753753

@@ -884,7 +884,7 @@ This module provides a few functions for creating archive files, such as
884884
tarballs or zipfiles.
885885

886886

887-
.. function:: make_archive(base_name, format[, root_dir=None, base_dir=None, verbose=0, dry_run=0])
887+
.. function:: make_archive(base_name, format[, root_dir=None, base_dir=None, verbose=False, dry_run=False])
888888

889889
Create an archive file (eg. ``zip`` or ``tar``). *base_name* is the name of
890890
the file to create, minus any format-specific extension; *format* is the
@@ -900,7 +900,7 @@ tarballs or zipfiles.
900900
Added support for the ``xztar`` format.
901901

902902

903-
.. function:: make_tarball(base_name, base_dir[, compress='gzip', verbose=0, dry_run=0])
903+
.. function:: make_tarball(base_name, base_dir[, compress='gzip', verbose=False, dry_run=False])
904904

905905
'Create an (optional compressed) archive as a tar file from all files in and
906906
under *base_dir*. *compress* must be ``'gzip'`` (the default),
@@ -915,7 +915,7 @@ tarballs or zipfiles.
915915
Added support for the ``xz`` compression.
916916

917917

918-
.. function:: make_zipfile(base_name, base_dir[, verbose=0, dry_run=0])
918+
.. function:: make_zipfile(base_name, base_dir[, verbose=False, dry_run=False])
919919

920920
Create a zip file from all files in and under *base_dir*. The output zip file
921921
will be named *base_name* + :file:`.zip`. Uses either the :mod:`zipfile` Python
@@ -978,7 +978,7 @@ This module provides functions for operating on directories and trees of
978978
directories.
979979

980980

981-
.. function:: mkpath(name[, mode=0o777, verbose=0, dry_run=0])
981+
.. function:: mkpath(name[, mode=0o777, verbose=False, dry_run=False])
982982

983983
Create a directory and any missing ancestor directories. If the directory
984984
already exists (or if *name* is the empty string, which means the current
@@ -989,7 +989,7 @@ directories.
989989
directories actually created.
990990

991991

992-
.. function:: create_tree(base_dir, files[, mode=0o777, verbose=0, dry_run=0])
992+
.. function:: create_tree(base_dir, files[, mode=0o777, verbose=False, dry_run=False])
993993

994994
Create all the empty directories under *base_dir* needed to put *files* there.
995995
*base_dir* is just the name of a directory which doesn't necessarily exist
@@ -999,7 +999,7 @@ directories.
999999
:func:`mkpath`.
10001000

10011001

1002-
.. function:: copy_tree(src, dst[, preserve_mode=1, preserve_times=1, preserve_symlinks=0, update=0, verbose=0, dry_run=0])
1002+
.. function:: copy_tree(src, dst[, preserve_mode=True, preserve_times=True, preserve_symlinks=False, update=False, verbose=False, dry_run=False])
10031003

10041004
Copy an entire directory tree *src* to a new location *dst*. Both *src* and
10051005
*dst* must be directory names. If *src* is not a directory, raise
@@ -1026,7 +1026,7 @@ directories.
10261026
.. versionchanged:: 3.3.1
10271027
NFS files are ignored.
10281028

1029-
.. function:: remove_tree(directory[, verbose=0, dry_run=0])
1029+
.. function:: remove_tree(directory[, verbose=False, dry_run=False])
10301030

10311031
Recursively remove *directory* and all files and directories underneath it. Any
10321032
errors are ignored (apart from being reported to ``sys.stdout`` if *verbose* is
@@ -1043,7 +1043,7 @@ directories.
10431043
This module contains some utility functions for operating on individual files.
10441044

10451045

1046-
.. function:: copy_file(src, dst[, preserve_mode=1, preserve_times=1, update=0, link=None, verbose=0, dry_run=0])
1046+
.. function:: copy_file(src, dst[, preserve_mode=True, preserve_times=True, update=False, link=None, verbose=False, dry_run=False])
10471047

10481048
Copy file *src* to *dst*. If *dst* is a directory, then *src* is copied there
10491049
with the same name; otherwise, it must be a filename. (If the file exists, it
@@ -1216,7 +1216,7 @@ other utility module.
12161216
.. % Should probably be moved into the standard library.
12171217
12181218
1219-
.. function:: execute(func, args[, msg=None, verbose=0, dry_run=0])
1219+
.. function:: execute(func, args[, msg=None, verbose=False, dry_run=False])
12201220

12211221
Perform some action that affects the outside world (for instance, writing to the
12221222
filesystem). Such actions are special because they are disabled by the
@@ -1234,7 +1234,7 @@ other utility module.
12341234
:exc:`ValueError` if *val* is anything else.
12351235

12361236

1237-
.. function:: byte_compile(py_files[, optimize=0, force=0, prefix=None, base_dir=None, verbose=1, dry_run=0, direct=None])
1237+
.. function:: byte_compile(py_files[, optimize=0, force=False, prefix=None, base_dir=None, verbose=True, dry_run=False, direct=None])
12381238

12391239
Byte-compile a collection of Python source files to :file:`.pyc` files in a
12401240
:file:`__pycache__` subdirectory (see :pep:`3147` and :pep:`488`).

docs/deprecated/distutils/configfile.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ configuration file for this distribution:
9696
.. code-block:: ini
9797
9898
[build_ext]
99-
inplace=1
99+
inplace=true
100100
101101
This will affect all builds of this module distribution, whether or not you
102102
explicitly specify :command:`build_ext`. If you include :file:`setup.cfg` in

docs/deprecated/distutils/setupscript.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ search path, though, you can find that directory using the Distutils
274274
:mod:`distutils.sysconfig` module::
275275

276276
from distutils.sysconfig import get_python_inc
277-
incdir = os.path.join(get_python_inc(plat_specific=1), 'Numerical')
277+
incdir = os.path.join(get_python_inc(plat_specific=True), 'Numerical')
278278
setup(...,
279279
Extension(..., include_dirs=[incdir]),
280280
)

setuptools/_distutils/_modified.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import os.path
55

66
from ._functools import splat
7+
from .compat.py39 import zip_strict
78
from .errors import DistutilsFileError
8-
from .py39compat import zip_strict
99

1010

1111
def _newer(source, target):
@@ -24,7 +24,7 @@ def newer(source, target):
2424
Raises DistutilsFileError if 'source' does not exist.
2525
"""
2626
if not os.path.exists(source):
27-
raise DistutilsFileError("file '%s' does not exist" % os.path.abspath(source))
27+
raise DistutilsFileError(f"file '{os.path.abspath(source)}' does not exist")
2828

2929
return _newer(source, target)
3030

setuptools/_distutils/_msvccompiler.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ class MSVCCompiler(CCompiler):
218218
static_lib_format = shared_lib_format = '%s%s'
219219
exe_extension = '.exe'
220220

221-
def __init__(self, verbose=0, dry_run=0, force=0):
221+
def __init__(self, verbose=False, dry_run=False, force=False):
222222
super().__init__(verbose, dry_run, force)
223223
# target platform (.plat_name is consistent with 'bdist')
224224
self.plat_name = None
@@ -334,7 +334,7 @@ def compile( # noqa: C901
334334
output_dir=None,
335335
macros=None,
336336
include_dirs=None,
337-
debug=0,
337+
debug=False,
338338
extra_preargs=None,
339339
extra_postargs=None,
340340
depends=None,
@@ -423,7 +423,7 @@ def compile( # noqa: C901
423423
return objects
424424

425425
def create_static_lib(
426-
self, objects, output_libname, output_dir=None, debug=0, target_lang=None
426+
self, objects, output_libname, output_dir=None, debug=False, target_lang=None
427427
):
428428
if not self.initialized:
429429
self.initialize()
@@ -452,7 +452,7 @@ def link(
452452
library_dirs=None,
453453
runtime_library_dirs=None,
454454
export_symbols=None,
455-
debug=0,
455+
debug=False,
456456
extra_preargs=None,
457457
extra_postargs=None,
458458
build_temp=None,
@@ -551,7 +551,7 @@ def runtime_library_dir_option(self, dir):
551551
def library_option(self, lib):
552552
return self.library_filename(lib)
553553

554-
def find_library_file(self, dirs, lib, debug=0):
554+
def find_library_file(self, dirs, lib, debug=False):
555555
# Prefer a debugging library if found (and requested), but deal
556556
# with it if we don't have one.
557557
if debug:

setuptools/_distutils/_vendor/__init__.py

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pip
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This software is made available under the terms of *either* of the licenses
2+
found in LICENSE.APACHE or LICENSE.BSD. Contributions to this software is made
3+
under the terms of *both* these licenses.

0 commit comments

Comments
 (0)