[issue4672] Distutils SWIG support blocks use of SWIG -outdir option

2020-11-30 Thread Irit Katriel


Change by Irit Katriel :


--
stage:  -> resolved
status: pending -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4672] Distutils SWIG support blocks use of SWIG -outdir option

2020-11-16 Thread Irit Katriel


Irit Katriel  added the comment:

I think this was fixed in 11599. Any objections to closing this?

--
nosy: +iritkatriel
resolution:  -> duplicate
status: open -> pending
superseder:  -> Useless error message when distutils fails compiling

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4672] Distutils SWIG support blocks use of SWIG -outdir option

2011-07-08 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Lists are used because that’s what the UNIX exec call accepts, or the 
constructor of subprocess.Popen.

About using %r in error messages, see also #11599.

--
nosy: +eric.araujo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4672
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4672] Distutils SWIG support blocks use of SWIG -outdir option

2011-06-26 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
versions: +Python 3.2 -Python 2.6, Python 3.0, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4672
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4672] Distutils SWIG support blocks use of SWIG -outdir option

2009-01-26 Thread Andy Buckley

Andy Buckley a...@insectnation.org added the comment:

Dumb question, but why is distutils wrapping the command args in quotes
anyway? I'm not even sure why lists are being used (rather than a
string) for the options, except that lists are a bit more Pythony and
can be used to semantically divide the options from each other. If you
end up having to use separate list elements for the option flag and the
value it takes, doesn't that indicate that the list isn't being used
properly?

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4672
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4672] Distutils SWIG support blocks use of SWIG -outdir option

2009-01-24 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

Good suggestion, I'll add the quotes in the spawn call

Which does a simple log.info(string.join(cmd, ' ')) at the moment

--
assignee:  - tarek
nosy: +tarek
versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python 2.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4672
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4672] Distutils SWIG support blocks use of SWIG -outdir option

2009-01-23 Thread William Fulton

William Fulton w...@fultondesigns.co.uk added the comment:

This error can be replicated on the command line with suitable quoting
of the -outdir option: 
swig -c++ -outdir . 

You need to pass the options correctly by separating them out, so use:

swig_opts=['-c++', '-...@hepmcincpath@', '-outdir', '.']

I suggest distutils is fixed to show the quotes it is effectively adding
when displaying the command, so for the example Andy gave it should display:

swigging ./hepmc.i to ./hepmc_wrap.cpp
swig -python -c++ -I/home/andy/heplocal/include -outdir . -o
./hepmc_wrap.cpp ./hepmc.i

The quotes would need adding for display when a user has a space in any
of the options passed to SWIG (including the include_dirs etc).

--
nosy: +postofficered

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4672
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4672] Distutils SWIG support blocks use of SWIG -outdir option

2008-12-15 Thread Andy Buckley

New submission from Andy Buckley a...@insectnation.org:

When using distutils to build an extension module using SWIG, it makes
most sense to use the built-in SWIG support. However, the distutils seem
to vet the options passed via the Extension.swig_opts attr/arg:

[...]
ext_modules=[Extension('_hepmc', ['@top_srcdir@/hepmc.i'],
   swig_opts=['-c++', '-...@hepmcincpath@', '-outdir .'],
   include_dirs=['@HEPMCINCPATH@'],
   library_dirs=['@HEPMCLIBPATH@'],
   libraries=['HepMC'])],
[...]

results in this error:

building '_hepmc' extension
swigging ./hepmc.i to ./hepmc_wrap.cpp
swig -python -c++ -I/home/andy/heplocal/include -outdir . -o
./hepmc_wrap.cpp ./hepmc.i
swig error : Unrecognized option -outdir .
Use 'swig -help' for available options.
error: command 'swig' failed with exit status 1

but calling the same swig command works fine. It's the same copy of
swig, but it seems to be distutils rather than swig that is throwing the
error. This is particularly relevant since I need to use -outdir to meet
the autotools distcheck requirement of successfully building from a
build-dir separate from the source dir: code generation tools like SWIG
blur such a distinction and so need to support output location flags
like -outdir.

I see this was also noticed some time ago:
http://osdir.com/ml/python.distutils.devel/2006-06/msg9.html
but no useful reply was ever forthcoming ;(  Maybe this time will be
luckier!

--
components: Distutils
messages: 77883
nosy: andybuckley
severity: normal
status: open
title: Distutils SWIG support blocks use of SWIG -outdir option
type: behavior
versions: Python 2.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4672
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com