building C modules in windows + Python 2.3 + cygwin

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andreou Giannis

    building C modules in windows + Python 2.3 + cygwin

    Allthough it is possible to build modules in Python2.3.3 and distutils
    with cygwin,
    by running:
    setup.py build --compiler=cygwin
    (after i created the libpython23.a)
    running:
    setup.py install
    afterwards, complains about not building with msvs v.6,
    since my Python distribution is built with it.

    Since previous Python releases for windows allowed install of modules
    that were built with different compilers then that of the current
    distribution, with was this feature removed from distutils in Python
    version 2.3?


    Is there a workaround for this problem?
    Can i simply copy the module file in the proper directory?
    I do not want to install VS ver.6.

    Thank you.


  • Jason Tishler

    #2
    Re: building C modules in windows + Python 2.3 + cygwin

    Andreou,

    On Thu, Feb 05, 2004 at 07:13:45PM +0200, Andreou Giannis wrote:[color=blue]
    > Allthough it is possible to build modules in Python2.3.3 and distutils
    > with cygwin, by running:
    > setup.py build --compiler=cygwin[/color]

    AFAICT, you should use --compiler=mingw3 2, if you want to create a
    native Win32 Python extension:

    $ python setup.py --dry-run build --compiler=mingw3 2
    running build
    running build_ext
    building 'readline' extension
    C:\Cygwin\bin\g cc.exe -mno-cygwin ...
    ^^^^^^^^^^^

    Using --compiler=cygwin , I get the following:

    $ python setup.py --dry-run build --compiler=cygwin
    running build
    running build_ext
    building 'readline' extension
    C:\Cygwin\bin\g cc.exe -mcygwin ...
    ^^^^^^^^

    which should produce a Cygwin Python extension.
    [color=blue]
    > Is there a workaround for this problem?[/color]

    I don't know.
    [color=blue]
    > Can i simply copy the module file in the proper directory?[/color]

    Yes. FWIW, this is how I install the Win32 Python readline module
    every time I upgrade my Win32 Python installation...

    Jason

    --
    PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
    Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6

    Comment

    • Marek 'Baczek' Baczyñski

      #3
      Re: building C modules in windows + Python 2.3 + cygwin

      On 2004-02-05, Andreou Giannis <gandreou@unipi .gr> wrote:[color=blue]
      > Allthough it is possible to build modules in Python2.3.3 and distutils
      > with cygwin,
      > by running:
      > setup.py build --compiler=cygwin
      > (after i created the libpython23.a)
      > running:
      > setup.py install
      > afterwards, complains about not building with msvs v.6,
      > since my Python distribution is built with it.[/color]

      python setup.py install --skip-build

      Note that --skip-build should work in other places where it currently
      doesn't/is ignored (bdist comes to mind, any workarounds for it except
      bdist_wininst, which oddly works?)
      [color=blue]
      > Is there a workaround for this problem?
      > Can i simply copy the module file in the proper directory?[/color]

      If it's a simple package, there shoulnd't be any problem with this.

      --
      { Marek Baczyñski :: UIN 57114871 :: GG 161671 :: JID imbaczek@jabber .gda.pl }
      { http://www.vlo.ids.gda.pl/ | imbaczek at poczta fm | http://www.promode.org }
      ... .. .. .. ... ... ...... evolve or face extinction ...... ... ... .. .. .. ..

      Comment

      • John J. Lee

        #4
        Re: building C modules in windows + Python 2.3 + cygwin

        Marek 'Baczek' Baczyñski <imbaczek@poczt a.no.onet.spam. pl> writes:
        [color=blue]
        > On 2004-02-05, Andreou Giannis <gandreou@unipi .gr> wrote:[color=green]
        > > Allthough it is possible to build modules in Python2.3.3 and distutils
        > > with cygwin,
        > > by running:
        > > setup.py build --compiler=cygwin
        > > (after i created the libpython23.a)
        > > running:
        > > setup.py install
        > > afterwards, complains about not building with msvs v.6,
        > > since my Python distribution is built with it.[/color]
        >
        > python setup.py install --skip-build
        >
        > Note that --skip-build should work in other places where it currently
        > doesn't/is ignored (bdist comes to mind, any workarounds for it except
        > bdist_wininst, which oddly works?)[/color]
        [...]

        Thomas Heller pointed out here some time back how to reorder the
        arguments to work around this.

        I'm too tired to remember how exactly...


        John

        Comment

        • Oleg A. Paraschenko

          #5
          Re: building C modules in windows + Python 2.3 + cygwin

          Hi!

          Andreou Giannis <gandreou@unipi .gr> wrote in message news:<402279C9. 90BC8B8C@unipi. gr>...[color=blue]
          > Allthough it is possible to build modules in Python2.3.3 and distutils
          > with cygwin,[/color]
          ....[color=blue]
          > I do not want to install VS ver.6.[/color]
          ....

          Look here:

          Writing C/C++ Python extensions without Microsoft Visual C++

          --
          Oleg

          Comment

          Working...