Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b008d3d

Browse files
committed
Synchronize packaging docs with distutils’ (includes fix for #9302)
1 parent 8d9dcd1 commit b008d3d

3 files changed

Lines changed: 42 additions & 33 deletions

File tree

Doc/distutils/apiref.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ the full reference.
160160
.. class:: Extension
161161

162162
The Extension class describes a single C or C++extension module in a setup
163-
script. It accepts the following keyword arguments in its constructor
163+
script. It accepts the following keyword arguments in its constructor:
164164

165165
+------------------------+--------------------------------+---------------------------+
166166
| argument name | value | type |

Doc/library/packaging.compiler.rst

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -572,15 +572,15 @@ extension modules.
572572
the following keyword arguments in its constructor:
573573

574574
+------------------------+--------------------------------+---------------------------+
575-
| argument name | value | type [#]_ |
575+
| argument name | value | type |
576576
+========================+================================+===========================+
577577
| *name* | the full name of the | string |
578578
| | extension, including any | |
579579
| | packages --- i.e. *not* a | |
580580
| | filename or pathname, but | |
581581
| | Python dotted name | |
582582
+------------------------+--------------------------------+---------------------------+
583-
| *sources* | list of source filenames, | string |
583+
| *sources* | list of source filenames, | list of strings |
584584
| | relative to the distribution | |
585585
| | root (where the setup script | |
586586
| | lives), in Unix form (slash- | |
@@ -593,12 +593,12 @@ extension modules.
593593
| | as source for a Python | |
594594
| | extension. | |
595595
+------------------------+--------------------------------+---------------------------+
596-
| *include_dirs* | list of directories to search | string |
596+
| *include_dirs* | list of directories to search | list of strings |
597597
| | for C/C++ header files (in | |
598598
| | Unix form for portability) | |
599599
+------------------------+--------------------------------+---------------------------+
600-
| *define_macros* | list of macros to define; each | (string, string) tuple or |
601-
| | macro is defined using a | (name, ``None``) |
600+
| *define_macros* | list of macros to define; each | list of tuples |
601+
| | macro is defined using a | |
602602
| | 2-tuple ``(name, value)``, | |
603603
| | where *value* is | |
604604
| | either the string to define it | |
@@ -609,31 +609,31 @@ extension modules.
609609
| | on Unix C compiler command | |
610610
| | line) | |
611611
+------------------------+--------------------------------+---------------------------+
612-
| *undef_macros* | list of macros to undefine | string |
612+
| *undef_macros* | list of macros to undefine | list of strings |
613613
| | explicitly | |
614614
+------------------------+--------------------------------+---------------------------+
615-
| *library_dirs* | list of directories to search | string |
615+
| *library_dirs* | list of directories to search | list of strings |
616616
| | for C/C++ libraries at link | |
617617
| | time | |
618618
+------------------------+--------------------------------+---------------------------+
619-
| *libraries* | list of library names (not | string |
619+
| *libraries* | list of library names (not | list of strings |
620620
| | filenames or paths) to link | |
621621
| | against | |
622622
+------------------------+--------------------------------+---------------------------+
623-
| *runtime_library_dirs* | list of directories to search | string |
623+
| *runtime_library_dirs* | list of directories to search | list of strings |
624624
| | for C/C++ libraries at run | |
625625
| | time (for shared extensions, | |
626626
| | this is when the extension is | |
627627
| | loaded) | |
628628
+------------------------+--------------------------------+---------------------------+
629-
| *extra_objects* | list of extra files to link | string |
629+
| *extra_objects* | list of extra files to link | list of strings |
630630
| | with (e.g. object files not | |
631631
| | implied by 'sources', static | |
632632
| | library that must be | |
633633
| | explicitly specified, binary | |
634634
| | resource files, etc.) | |
635635
+------------------------+--------------------------------+---------------------------+
636-
| *extra_compile_args* | any extra platform- and | string |
636+
| *extra_compile_args* | any extra platform- and | list of strings |
637637
| | compiler-specific information | |
638638
| | to use when compiling the | |
639639
| | source files in 'sources'. For | |
@@ -644,7 +644,7 @@ extension modules.
644644
| | for other platforms it could | |
645645
| | be anything. | |
646646
+------------------------+--------------------------------+---------------------------+
647-
| *extra_link_args* | any extra platform- and | string |
647+
| *extra_link_args* | any extra platform- and | list of strings |
648648
| | compiler-specific information | |
649649
| | to use when linking object | |
650650
| | files together to create the | |
@@ -653,15 +653,15 @@ extension modules.
653653
| | Similar interpretation as for | |
654654
| | 'extra_compile_args'. | |
655655
+------------------------+--------------------------------+---------------------------+
656-
| *export_symbols* | list of symbols to be exported | string |
656+
| *export_symbols* | list of symbols to be exported | list of strings |
657657
| | from a shared extension. Not | |
658658
| | used on all platforms, and not | |
659659
| | generally necessary for Python | |
660660
| | extensions, which typically | |
661661
| | export exactly one symbol: | |
662662
| | ``init`` + extension_name. | |
663663
+------------------------+--------------------------------+---------------------------+
664-
| *depends* | list of files that the | string |
664+
| *depends* | list of files that the | list of strings |
665665
| | extension depends on | |
666666
+------------------------+--------------------------------+---------------------------+
667667
| *language* | extension language (i.e. | string |
@@ -670,5 +670,8 @@ extension modules.
670670
| | from the source extensions if | |
671671
| | not provided. | |
672672
+------------------------+--------------------------------+---------------------------+
673-
674-
.. [#] For values documented as lists, the given type is the type of each element.
673+
| *optional* | specifies that a build failure | boolean |
674+
| | in the extension should not | |
675+
| | abort the build process, but | |
676+
| | simply skip the extension. | |
677+
+------------------------+--------------------------------+---------------------------+

Doc/library/packaging.dist.rst

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ module distribution being built/packaged/distributed/installed.
2525
+--------------------+--------------------------------+-------------------------------------------------------------+
2626
| argument name | value | type |
2727
+====================+================================+=============================================================+
28-
| *name* | The name of the project | string |
28+
| *name* | The name of the project | a string |
2929
+--------------------+--------------------------------+-------------------------------------------------------------+
30-
| *version* | The version number of the | See :mod:`packaging.version` |
31-
| | release | |
30+
| *version* | The version number of the | a string |
31+
| | release; see | |
32+
| | :mod:`packaging.version` | |
3233
+--------------------+--------------------------------+-------------------------------------------------------------+
3334
| *summary* | A single line describing the | a string |
3435
| | project | |
@@ -45,14 +46,14 @@ module distribution being built/packaged/distributed/installed.
4546
| | maintainer, if different from | |
4647
| | the author | |
4748
+--------------------+--------------------------------+-------------------------------------------------------------+
48-
| *maintainer_email* | The email address of the | |
49+
| *maintainer_email* | The email address of the | a string |
4950
| | current maintainer, if | |
5051
| | different from the author | |
5152
+--------------------+--------------------------------+-------------------------------------------------------------+
52-
| *home_page* | A URL for the proejct | a URL |
53+
| *home_page* | A URL for the proejct | a string |
5354
| | (homepage) | |
5455
+--------------------+--------------------------------+-------------------------------------------------------------+
55-
| *download_url* | A URL to download the project | a URL |
56+
| *download_url* | A URL to download the project | a string |
5657
+--------------------+--------------------------------+-------------------------------------------------------------+
5758
| *packages* | A list of Python packages that | a list of strings |
5859
| | packaging will manipulate | |
@@ -63,14 +64,13 @@ module distribution being built/packaged/distributed/installed.
6364
| *scripts* | A list of standalone scripts | a list of strings |
6465
| | to be built and installed | |
6566
+--------------------+--------------------------------+-------------------------------------------------------------+
66-
| *ext_modules* | A list of Python extensions to | A list of instances of |
67+
| *ext_modules* | A list of Python extensions to | a list of instances of |
6768
| | be built | :class:`packaging.compiler.extension.Extension` |
6869
+--------------------+--------------------------------+-------------------------------------------------------------+
69-
| *classifiers* | A list of categories for the | The list of available |
70-
| | distribution | categorizations is available on `PyPI |
71-
| | | <http://pypi.python.org/pypi?:action=list_classifiers>`_. |
70+
| *classifiers* | A list of categories for the | a list of strings; valid classifiers are listed on `PyPi |
71+
| | distribution | <http://pypi.python.org/pypi?:action=list_classifiers>`_. |
7272
+--------------------+--------------------------------+-------------------------------------------------------------+
73-
| *distclass* | the :class:`Distribution` | A subclass of |
73+
| *distclass* | the :class:`Distribution` | a subclass of |
7474
| | class to use | :class:`packaging.dist.Distribution` |
7575
+--------------------+--------------------------------+-------------------------------------------------------------+
7676
| *script_name* | The name of the setup.py | a string |
@@ -83,13 +83,19 @@ module distribution being built/packaged/distributed/installed.
8383
| *options* | default options for the setup | a string |
8484
| | script | |
8585
+--------------------+--------------------------------+-------------------------------------------------------------+
86-
| *license* | The license for the | a string; should be used when there is no suitable License |
87-
| | distribution | classifier, or to specify a classifier |
86+
| *license* | The license for the | a string |
87+
| | distribution; should be used | |
88+
| | when there is no suitable | |
89+
| | License classifier, or to | |
90+
| | refine a classifier | |
8891
+--------------------+--------------------------------+-------------------------------------------------------------+
89-
| *keywords* | Descriptive keywords | a list of strings; used by catalogs |
92+
| *keywords* | Descriptive keywords; used by | a list of strings or a comma-separated string |
93+
| | catalogs such as PyPI | |
9094
+--------------------+--------------------------------+-------------------------------------------------------------+
91-
| *platforms* | Platforms compatible with this | a list of strings; should be used when there is no |
92-
| | distribution | suitable Platform classifier |
95+
| *platforms* | Platforms compatible with this | a list of strings or a comma-separated string |
96+
| | distribution; should be used | |
97+
| | when there is no suitable | |
98+
| | Platform classifier | |
9399
+--------------------+--------------------------------+-------------------------------------------------------------+
94100
| *cmdclass* | A mapping of command names to | a dictionary |
95101
| | :class:`Command` subclasses | |

0 commit comments

Comments
 (0)