Python 2.4 and Visual C++ Express

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steve Menard

    #1

    Python 2.4 and Visual C++ Express

    I will soon have to write start providing Python extensions, in binary
    form, for python 2.4, and I have a few questions.

    I have Visual C++ 6 installed, which works great for python 2.3.

    I do not have access to Visual C++ 2003, which seems to be the compiler
    to be used with Python 2.4. Unless I am mistaken, the free command-line
    compiler is not a solution, as it cannot produce binaries that
    dynamically link the C runtime.

    I have downloaded the Visual C++ 2004 "express" from the Microsoft.site.

    Now my question is, will I be able to compile Python 2.4 extension if I
    use the Visual C++ 2004? And since I will be distributing the extension
    for both Python 2.3 and 2.4, will distutil choose the right compiler ?

    Before some people mention MingW and Cygnus, I know and use them.
    However, for redistributing I feel it safer to use the Microsoft compilers.

    Thanks for any help,

    Steve
  • Mike C. Fletcher

    #2
    Re: Python 2.4 and Visual C++ Express

    Steve Menard wrote:
    ....
    [color=blue]
    > I do not have access to Visual C++ 2003, which seems to be the
    > compiler to be used with Python 2.4. Unless I am mistaken, the free
    > command-line compiler is not a solution, as it cannot produce binaries
    > that dynamically link the C runtime.[/color]

    ....

    See here:


    for details on how to use the free Toolkit compiler for building 2.4
    extensions.

    Have fun,
    Mike

    _______________ _______________ _______________ ___
    Mike C. Fletcher
    Designer, VR Plumber, Coder



    Comment

    • Jive

      #3
      Re: Python 2.4 and Visual C++ Express

      Are you saying that Python 2.4 will not compile under MS VC++ 6.0? That's
      horrifying. Say it isn't so!!! I have just ported Python to an embedded
      system using VC++ 6.0. It will always be compiled using 6.0, for two
      reasons: 1) I cannot afford the manhours for changing compilers, and 2) Bill
      Gates has enough money already, alright? I would hate to think that I am
      now stuck at Python 2.3 for eternity.

      "Steve Menard" <foo@bar.com> wrote in message
      news:XQfod.1547 5$3u6.726077@wa gner.videotron. net...[color=blue]
      > I will soon have to write start providing Python extensions, in binary
      > form, for python 2.4, and I have a few questions.
      >
      > I have Visual C++ 6 installed, which works great for python 2.3.
      >
      > I do not have access to Visual C++ 2003, which seems to be the compiler
      > to be used with Python 2.4. Unless I am mistaken, the free command-line
      > compiler is not a solution, as it cannot produce binaries that
      > dynamically link the C runtime.
      >
      > I have downloaded the Visual C++ 2004 "express" from the Microsoft.site.
      >
      > Now my question is, will I be able to compile Python 2.4 extension if I
      > use the Visual C++ 2004? And since I will be distributing the extension
      > for both Python 2.3 and 2.4, will distutil choose the right compiler ?
      >
      > Before some people mention MingW and Cygnus, I know and use them.
      > However, for redistributing I feel it safer to use the Microsoft[/color]
      compilers.[color=blue]
      >
      > Thanks for any help,
      >
      > Steve[/color]


      Comment

      • Steve Menard

        #4
        Re: Python 2.4 and Visual C++ Express

        Jive wrote:[color=blue]
        > Are you saying that Python 2.4 will not compile under MS VC++ 6.0? That's
        > horrifying. Say it isn't so!!! I have just ported Python to an embedded
        > system using VC++ 6.0. It will always be compiled using 6.0, for two
        > reasons: 1) I cannot afford the manhours for changing compilers, and 2) Bill
        > Gates has enough money already, alright? I would hate to think that I am
        > now stuck at Python 2.3 for eternity.
        >[/color]

        That is not what I am saying. The "what's new in Python" claims python
        2.4 will
        compile with both versions 6 and 7.1 of Microsoft's compiler.

        However, the standard download, that most users will have, will be
        compiled using the 7.1. And so any binary packages to be installed on a
        2.4 dist will also have to be compiled with 7.1.


        Steve


        Comment

        • Jive

          #5
          Re: Python 2.4 and Visual C++ Express


          "Steve Menard" <menard.nospam. steve@gmail.nos pamisaid.com> wrote in message
          news:30ji62F31p pn0U1@uni-berlin.de...[color=blue]
          > Jive wrote:[color=green]
          > > Are you saying that Python 2.4 will not compile under MS VC++ 6.0?[/color][/color]
          That's[color=blue][color=green]
          > > horrifying. Say it isn't so!!! I have just ported Python to an[/color][/color]
          embedded[color=blue][color=green]
          > > system using VC++ 6.0. It will always be compiled using 6.0, for two
          > > reasons: 1) I cannot afford the manhours for changing compilers, and 2)[/color][/color]
          Bill[color=blue][color=green]
          > > Gates has enough money already, alright? I would hate to think that I[/color][/color]
          am[color=blue][color=green]
          > > now stuck at Python 2.3 for eternity.
          > >[/color]
          >
          > That is not what I am saying. The "what's new in Python" claims python
          > 2.4 will
          > compile with both versions 6 and 7.1 of Microsoft's compiler.
          >
          > However, the standard download, that most users will have, will be
          > compiled using the 7.1. And so any binary packages to be installed on a
          > 2.4 dist will also have to be compiled with 7.1.
          >
          >
          > Steve
          >[/color]

          Do you mean if I install 2.4, I will have to find VC++ 7.1 versions of all
          the extensions
          I may be using? If so, that's still borderline horrible, but I guess
          Microsoft is the culprit. Annow
          for something completely the same.

          Will 7.1 extensions work with a Python.exe compiled under 6.0?

          In any case, I think it would be a Good Thing if the Pythonistas provided a
          download of 2.4
          compiled under VC++ 6.0, in addition to the 7.1 one.

          I don't suppose it will do any good to rant about Microsoft. I believe it's
          been done.



          Comment

          • Mike C. Fletcher

            #6
            Re: Python 2.4 and Visual C++ Express

            Jive wrote:
            [color=blue]
            >"Steve Menard" <menard.nospam. steve@gmail.nos pamisaid.com> wrote in message
            >news:30ji62F31 ppn0U1@uni-berlin.de...
            >
            >[/color]
            ....
            [color=blue]
            >Do you mean if I install 2.4, I will have to find VC++ 7.1 versions of all
            >the extensions
            >I may be using? If so, that's still borderline horrible, but I guess
            >Microsoft is the culprit. Annow
            >for something completely the same.
            >
            >[/color]
            It has almost always been the case that you must download new extensions
            for a new major version of Python. The difference now is that library
            developers can use the Free (as-in-beer) MSToolkit compiler to build
            7.1-compatible extensions, instead of needing to purchase MSVC++ 6.0.

            It's not a particularly elegant process (lots of downloads and a few
            setup steps), but IMO it's a *good* thing to finally have no-cost option
            for providing extensions on Windows.

            That said, I'm not sure this will help you with your embedded platform.
            Don't know if the Toolkit compiler will work with whatever Win32
            platform runs there, but for general desktops moving to MSVC 7.1 seems
            to be a win. However, the Toolkit doesn't come with the ability AFAIK
            to build MSVC++ project files, so there will be some pain as developers
            become accustomed to exporting makefiles or the equivalent from the
            project files to support the Toolkit. Still, marching in the right
            direction...

            Just MHO,
            Mike

            _______________ _______________ _______________ ___
            Mike C. Fletcher
            Designer, VR Plumber, Coder



            Comment

            • Steve Menard

              #7
              Re: Python 2.4 and Visual C++ Express

              Jive wrote:[color=blue]
              > "Steve Menard" <menard.nospam. steve@gmail.nos pamisaid.com> wrote in message
              > news:30ji62F31p pn0U1@uni-berlin.de...
              >[color=green]
              >>Jive wrote:
              >>[color=darkred]
              >>>Are you saying that Python 2.4 will not compile under MS VC++ 6.0?[/color][/color]
              >
              > That's
              >[color=green][color=darkred]
              >>>horrifying . Say it isn't so!!! I have just ported Python to an[/color][/color]
              >
              > embedded
              >[color=green][color=darkred]
              >>>system using VC++ 6.0. It will always be compiled using 6.0, for two
              >>>reasons: 1) I cannot afford the manhours for changing compilers, and 2)[/color][/color]
              >
              > Bill
              >[color=green][color=darkred]
              >>>Gates has enough money already, alright? I would hate to think that I[/color][/color]
              >
              > am
              >[color=green][color=darkred]
              >>>now stuck at Python 2.3 for eternity.
              >>>[/color]
              >>
              >>That is not what I am saying. The "what's new in Python" claims python
              >>2.4 will
              >>compile with both versions 6 and 7.1 of Microsoft's compiler.
              >>
              >>However, the standard download, that most users will have, will be
              >>compiled using the 7.1. And so any binary packages to be installed on a
              >>2.4 dist will also have to be compiled with 7.1.
              >>
              >>
              >>Steve
              >>[/color]
              >
              >
              > Do you mean if I install 2.4, I will have to find VC++ 7.1 versions of all
              > the extensions
              > I may be using? If so, that's still borderline horrible, but I guess
              > Microsoft is the culprit. Annow
              > for something completely the same.
              >
              > Will 7.1 extensions work with a Python.exe compiled under 6.0?
              >
              > In any case, I think it would be a Good Thing if the Pythonistas provided a
              > download of 2.4
              > compiled under VC++ 6.0, in addition to the 7.1 one.
              >
              > I don't suppose it will do any good to rant about Microsoft. I believe it's
              > been done.
              >
              >
              >[/color]

              We can rant all we want, but let's be realistic : Version 6.0 is
              ancient! It is the version I was using at work almost 8 years ago!

              Would you hold that python on Linux should compile with an 8 year old
              version of GCC? At one point, a break must happen ...

              At least there seems a way to use MS's free 7.1 toolkit to compile,
              something that was'nt possible with version 6.

              Lastly, about existing extensions. Extension are python version
              specific. An extension compiled for python 2.3 will NOT work with python
              2.4, no matter what. My guess is that soon after the release of Python
              2.4, maintainers of existing packages will distribute them in 2.3 and
              2.4 forms. My hope is that distuil will be intelligent enough to chose
              the right compiler when both will be present. I am one of those
              maintainers, and I do not want to have to jump through hoops to get my
              modules to compile ...


              Steve

              Comment

              • Paul Moore

                #8
                Re: Python 2.4 and Visual C++ Express

                "Mike C. Fletcher" <mcfletch@roger s.com> writes:
                [color=blue]
                > It has almost always been the case that you must download new extensions
                > for a new major version of Python. The difference now is that library
                > developers can use the Free (as-in-beer) MSToolkit compiler to build
                > 7.1-compatible extensions, instead of needing to purchase MSVC++ 6.0.[/color]

                One thing that does nag at me (and I've had no joy getting answers
                from the mod_python list so far) is whether a 2.4-compatible version
                of mod_python will be possible.

                Python 2.4 will be built with the MSVC 7.1 compiler/CRT, but (AFAIK)
                Apache is still distributed in binaries built with the MSVC6
                compiler/CRT. So it's not clear to me which CRT mod_python should be
                built against...

                Hoping-it's-all-going-to-just-work-ly y'rs
                Paul.
                --
                Accomplishing the impossible means only that the boss will add it to
                your regular duties. -- Doug Larson

                Comment

                • Tim Peters

                  #9
                  Re: Python 2.4 and Visual C++ Express

                  [Jive]
                  ....[color=blue]
                  > In any case, I think it would be a Good Thing if the Pythonistas
                  > provided a download of 2.4 compiled under VC++ 6.0, in addition to
                  > the 7.1 one.[/color]

                  That requires someone who cares enough to volunteer the work, or to
                  fund the work (presuming someone exists who could be convinced to do
                  the work for pay). For various reasons I, and later Raymond
                  Hettinger, cared enough to keep the MSVC 6 project files working with
                  Python 2.4, but nobody voluntered to produce a Windows installer for
                  2.4 based on MSVC 6. There's no policy against that, but Pythons
                  don't grow on trees.

                  Comment

                  • Jorge Godoy

                    #10
                    Re: Python 2.4 and Visual C++ Express

                    Tim Peters <tim.peters@gma il.com> writes:
                    [color=blue]
                    > 2.4 based on MSVC 6. There's no policy against that, but Pythons[/color]
                    ^^^^^^^[color=blue]
                    > don't grow on trees.[/color]
                    ^^^^^^^^^^^^^^^ ^^^^

                    Sorry, but I couldn't resist the joke :-) :




                    Be seeing you,
                    --
                    Godoy. <godoy@ieee.org >

                    Comment

                    Working...