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

Skip to content

Commit 2d6bb12

Browse files
committed
Add disclaimer about MinGW compat in distutils docs (#6007). Patch by Chris Lambacher.
1 parent 60532bd commit 2d6bb12

1 file changed

Lines changed: 23 additions & 16 deletions

File tree

Doc/install/index.rst

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -929,15 +929,34 @@ section :ref:`inst-config-files`.)
929929
GNU C / Cygwin / MinGW
930930
^^^^^^^^^^^^^^^^^^^^^^
931931

932-
These instructions only apply if you're using a version of Python prior to
933-
2.4.1 with a MinGW prior to 3.0.0 (with binutils-2.13.90-20030111-1).
934-
935932
This section describes the necessary steps to use Distutils with the GNU C/C++
936933
compilers in their Cygwin and MinGW distributions. [#]_ For a Python interpreter
937934
that was built with Cygwin, everything should work without any of these
938935
following steps.
939936

940-
These compilers require some special libraries. This task is more complex than
937+
Not all extensions can be built with MinGW or Cygwin, but many can. Extensions
938+
most likely to not work are those that use C++ or depend on Microsoft Visual C
939+
extensions.
940+
941+
To let Distutils compile your extension with Cygwin you have to type::
942+
943+
python setup.py build --compiler=cygwin
944+
945+
and for Cygwin in no-cygwin mode [#]_ or for MinGW type::
946+
947+
python setup.py build --compiler=mingw32
948+
949+
If you want to use any of these options/compilers as default, you should
950+
consider writing it in your personal or system-wide configuration file for
951+
Distutils (see section :ref:`inst-config-files`.)
952+
953+
Older Versions of Python and MinGW
954+
""""""""""""""""""""""""""""""""""
955+
The following instructions only apply if you're using a version of Python
956+
inferior to 2.4.1 with a MinGW inferior to 3.0.0 (with
957+
binutils-2.13.90-20030111-1).
958+
959+
These compilers require some special libraries. This task is more complex than
941960
for Borland's C++, because there is no program to convert the library. First
942961
you have to create a list of symbols which the Python DLL exports. (You can find
943962
a good program for this task at
@@ -967,18 +986,6 @@ If your extension uses other libraries (zlib,...) you might have to convert
967986
them too. The converted files have to reside in the same directories as the
968987
normal libraries do.
969988

970-
To let Distutils compile your extension with Cygwin you now have to type ::
971-
972-
python setup.py build --compiler=cygwin
973-
974-
and for Cygwin in no-cygwin mode [#]_ or for MinGW type::
975-
976-
python setup.py build --compiler=mingw32
977-
978-
If you want to use any of these options/compilers as default, you should
979-
consider to write it in your personal or system-wide configuration file for
980-
Distutils (see section :ref:`inst-config-files`.)
981-
982989

983990
.. seealso::
984991

0 commit comments

Comments
 (0)