2010/5/14 John Griessen <j...@industromatic.com>

> Thomas Paviot wrote:
> > 2010/5/11 John Griessen
> >     Messages like:
> >     building 'OCC._GEOMAlgo' extension
> >     building 'OCC._GEOMImpl' extension
> >
> >     looks like it's building all now.
> >
> >     JG
> >
> >
> > Perfect.
> Well, not completely...  I want to use python2.6 to use the leo editor with
> ipython
> and have python2.6 problems.
>
>
>  #error "This python version requires swig to be run with the '-classic'
> option"
> /backups-650mb/pythonocc-read-only/src/wrapper/SWIG/linux_darwin/Standard_wrap.cpp:2785:3:
> error: #error "This python version
> requires swig to be run with the '-nomodern' option"
> /backups-650mb/pythonocc-read-only/src/wrapper/SWIG/linux_darwin/Standard_wrap.cpp:2788:3:
> error: #error "This python version
> requires swig to be run with the '-nomodernargs' option"
> /backups-650mb/pythonocc-read-only/src/wrapper/SWIG/linux_darwin/Standard_wrap.cpp:2791:3:
> error: #error "This python version
> requires swig to be run with the '-nofastunpack' option"
> /backups-650mb/pythonocc-read-only/src/wrapper/SWIG/linux_darwin/Standard_wrap.cpp:780:
> error: ‘PyObject’ was not declared in this
> scope
>
> Where would I set these options SWIG needs?
>
> setup.py has this hint:    swig_opts = environment.SWIG_OPTS,
>
> which is referred to the same way as OCC_INC
>
> Do I start cmake-gui and change something?
>
> Thanks,
>
> John Griessen
>
>
>
Hi John,

SWIG parameters are defined in the ./src/wrapper/environment.py sciprt.
Linux related options are set up from lines 171 to 173:

    SWIG_OPTS = ['-O','-c++','-DHAVE_LIMITS_H','-DHAVE_CONFIG_H','-DCSFDB',\

'-w302,401,314,509,512','-DOCC_CONVERT_SIGNALS','-DLIN','-DLININTEL','-D_GNU_SOURCE=1',\
                 '-outdir','%s'%SWIG_OUT_DIR]

If you want to add a SWIG option, just add 'no-modern','-classic' and
'-nomodernargs' options to the SWIG_OPTS list:
    SWIG_OPTS =
['-O','-c++','-no-modern','-classic','nomodernargs','-DHAVE_LIMITS_H','-DHAVE_CONFIG_H','-DCSFDB',\

'-w302,401,314,509,512','-DOCC_CONVERT_SIGNALS','-DLIN','-DLININTEL','-D_GNU_SOURCE=1',\
                 '-outdir','%s'%SWIG_OUT_DIR]

However, you will have to *force* rebuild of the whole pythonocc package by
passing the -f args to the setup.py script:

python setup.py build -f
python setup.py install

Regards,

Thomas
_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users

Reply via email to