This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: install command rejects --compiler option
Type: Stage:
Components: Distutils Versions: Python 2.5
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: kermode, loewis
Priority: normal Keywords:

Created on 2008-02-10 02:05 by kermode, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg62241 - (view) Author: Lenard Lindstrom (kermode) Date: 2008-02-10 02:05
The install command returns the following error when the --compiler
option is provided on the command line:

>python setup.py install --compiler=mingw32
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option --compiler not recognized

This is problematic on Windows when MinGW is being used in place of
Visual C. A package can be built with --compiler=mingw32, but if no
compiler is specified for install the following error occurs:

>python setup.py install
running install
running build
running build_py
running build_ext
error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible
binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin
installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.


The work-around is to specify compiler=mingw32 in a setup.cfg file under
a [build] or [build_ext] heading. But this would be inconvenient for
someone who has both Visual C and MinGW and wants to choose.
msg62243 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-02-10 06:48
Could you try whether

setup.py build --compiler=mingw32 install

works?
msg62245 - (view) Author: Lenard Lindstrom (kermode) Date: 2008-02-10 07:37
Yes, "setup.py build --compiler=mingw32 install" works. It is good
enough for me.
History
Date User Action Args
2022-04-11 14:56:30adminsetgithub: 46332
2008-02-10 08:12:00loewissetstatus: open -> closed
resolution: wont fix
2008-02-10 07:37:02kermodesetmessages: + msg62245
2008-02-10 06:48:27loewissetnosy: + loewis
messages: + msg62243
2008-02-10 02:05:44kermodecreate