@@ -43,6 +43,7 @@ class Extension(_Extension):
4343 :arg str name:
4444 the full name of the extension, including any packages -- ie.
4545 *not* a filename or pathname, but Python dotted name
46+
4647 :arg list[str] sources:
4748 list of source filenames, relative to the distribution root
4849 (where the setup script lives), in Unix form (slash-separated)
@@ -53,49 +54,62 @@ class Extension(_Extension):
5354 :keyword list[str] include_dirs:
5455 list of directories to search for C/C++ header files (in Unix
5556 form for portability)
57+
5658 :keyword list[tuple[str, str|None]] define_macros:
5759 list of macros to define; each macro is defined using a 2-tuple:
5860 the first item corresponding to the name of the macro and the second
5961 item either a string with its value or None to
6062 define it without a particular value (equivalent of "#define
6163 FOO" in source or -DFOO on Unix C compiler command line)
64+
6265 :keyword list[str] undef_macros:
6366 list of macros to undefine explicitly
67+
6468 :keyword list[str] library_dirs:
6569 list of directories to search for C/C++ libraries at link time
70+
6671 :keyword list[str] libraries:
6772 list of library names (not filenames or paths) to link against
73+
6874 :keyword list[str] runtime_library_dirs:
6975 list of directories to search for C/C++ libraries at run time
7076 (for shared extensions, this is when the extension is loaded)
77+
7178 :keyword list[str] extra_objects:
7279 list of extra files to link with (eg. object files not implied
7380 by 'sources', static library that must be explicitly specified,
7481 binary resource files, etc.)
82+
7583 :keyword list[str] extra_compile_args:
7684 any extra platform- and compiler-specific information to use
7785 when compiling the source files in 'sources'. For platforms and
7886 compilers where "command line" makes sense, this is typically a
7987 list of command-line arguments, but for other platforms it could
8088 be anything.
89+
8190 :keyword list[str] extra_link_args:
8291 any extra platform- and compiler-specific information to use
8392 when linking object files together to create the extension (or
8493 to create a new static Python interpreter). Similar
8594 interpretation as for 'extra_compile_args'.
95+
8696 :keyword list[str] export_symbols:
8797 list of symbols to be exported from a shared extension. Not
8898 used on all platforms, and not generally necessary for Python
8999 extensions, which typically export exactly one symbol: "init" +
90100 extension_name.
101+
91102 :keyword list[str] swig_opts:
92103 any extra options to pass to SWIG if a source file has the .i
93104 extension.
105+
94106 :keyword list[str] depends:
95107 list of files that the extension depends on
108+
96109 :keyword str language:
97110 extension language (i.e. "c", "c++", "objc"). Will be detected
98111 from the source extensions if not provided.
112+
99113 :keyword bool optional:
100114 specifies that a build failure in the extension should not abort the
101115 build process, but simply not install the failing extension.
0 commit comments