[Tutor] extending a VS python with cygwin

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Tutor] extending a VS python with cygwin

Tom Roche

summary: how to fix ...

me@cygwinBox ~/bin/duplicity-0.6.09$ python setup.py install
...
> 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.
me@cygwinBox ~/bin/duplicity-0.6.09$ python -c mingw32 setup.py install
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
> NameError: name 'mingw32' is not defined
me@cygwinBox ~/bin/duplicity-0.6.09$ python setup.py -c mingw32 install
> 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 -c not recognized
me@cygwinBox ~/bin/duplicity-0.6.09$ python setup.py install -c 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: invalid command 'mingw32'

details:

What's the appropriate syntax to solve the above python build problem?
Why I ask:

I mostly run linux, and I've been using python-based `duplicity`

http://duplicity.nongnu.org/

to back that up. I've got an older winxp box (SP3, uptodate with WU)
which I keep mostly to run ArcGIS, which has happily run many versions
of cygwin (which I keep uptodate) over the years. I'd like to be able to
restore my linux home to my cygwin home for the rare occasions when I
need to use the winxp box. To do that, I'd like to install duplicity on
the cygwin box. That install process (best described by the somewhat
downlevel

http://blog.khorun.com/2008/09/using-duplicity-on-windows-under-cygwin.html

) works for the install of the prerequisite GnuPGInterface and boto
python modules (process=[download tarball, tar xfz, python setup.py
install]) but fails for the install of duplicity itself, with the
error above:

me@cygwinBox ~/bin/duplicity-0.6.09$ python setup.py install
...
> error: Python was built with Visual Studio 2003;

Note that I'd cheerfully replace that version of python (the 2.5.2
that shipped with my ArcGIS 9.3), except that I use some ArcGIS
extensions which seem to choke on other pythons :-( so I'd prefer to
build against that if at all possible.

> 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.

I try to take the advice offered, but either it's wrong or I'm missing
something:

me@cygwinBox ~/bin/duplicity-0.6.09$ python -c mingw32 setup.py install
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
> NameError: name 'mingw32' is not defined
me@cygwinBox ~/bin/duplicity-0.6.09$ python setup.py -c mingw32 install
> 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 -c not recognized
me@cygwinBox ~/bin/duplicity-0.6.09$ python setup.py install -c 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: invalid command 'mingw32'

What's the appropriate syntax here? Or how else should I fix this?

Apologies if this is a FAQ. If this is the wrong list/forum/whatever
for this query, please direct me appropriately. Note that the
duplicity list is apparently not the place, though :-(

TIA, Tom Roche <[hidden email]>
_______________________________________________
Tutor maillist  -  [hidden email]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor