pywin32 support for CreateTypeLib2

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Philip Rittenhouse

    pywin32 support for CreateTypeLib2

    I was just wondering if there are any plans to support the
    CreateTypeLib2 API either instead of, or in addition to, the
    CreateTypeLib API.

    I am currently using pythoncom to generate type libraries, but
    I ran into an issue supporting optional parameters. After a
    lot of digging I discovered that the old CreateTypeLib API doesn't
    support them. I have currently built a custom version of pywin32
    that uses the new CreateTypeLib2 API, and everything works great.
    I'm hoping that the CreateTypeLib2 support can be added to the
    official release.


    Thanks,
    Phil

  • Roger Upole

    #2
    Re: pywin32 support for CreateTypeLib2

    Since you already have working code, the best bet would be
    to submit a patch to the Pywin32 project on Sourceforge.
    It would probably go over better as an addition rather than a
    replacement so it doesn't break any working code.
    Roger

    "Philip Rittenhouse" <phil2@dspfacto ry.com> wrote in message
    news:MPG.1b2fba f892ad01d898968 0@nntp.wcom.ca. ..[color=blue]
    > I was just wondering if there are any plans to support the
    > CreateTypeLib2 API either instead of, or in addition to, the
    > CreateTypeLib API.
    >
    > I am currently using pythoncom to generate type libraries, but
    > I ran into an issue supporting optional parameters. After a
    > lot of digging I discovered that the old CreateTypeLib API doesn't
    > support them. I have currently built a custom version of pywin32
    > that uses the new CreateTypeLib2 API, and everything works great.
    > I'm hoping that the CreateTypeLib2 support can be added to the
    > official release.
    >
    >
    > Thanks,
    > Phil
    >[/color]


    Comment

    • Thomas Heller

      #3
      Re: pywin32 support for CreateTypeLib2

      Philip Rittenhouse <phil2@dspfacto ry.com> writes:
      [color=blue]
      > I was just wondering if there are any plans to support the
      > CreateTypeLib2 API either instead of, or in addition to, the
      > CreateTypeLib API.
      >
      > I am currently using pythoncom to generate type libraries, but
      > I ran into an issue supporting optional parameters. After a
      > lot of digging I discovered that the old CreateTypeLib API doesn't
      > support them. I have currently built a custom version of pywin32
      > that uses the new CreateTypeLib2 API, and everything works great.
      > I'm hoping that the CreateTypeLib2 support can be added to the
      > official release.[/color]

      As Roger already said, upload a patch to the pywin32 project.

      OTOH, it should (hopefully!) been easier to do it with ctypes - I assume
      creating typelibs isn't that performance critical. Currently ctypes.com
      can use but not create typelibs: readtlb.py creates ctypes Python
      wrappers from type libraries - my plan it to also create typelibs from
      the Python wrappers.

      Thomas


      Comment

      • Phil Rittenhouse

        #4
        Re: pywin32 support for CreateTypeLib2

        "Roger Upole" <rupole@hotmail .com> wrote in message news:<40c90045_ 1@127.0.0.1>...[color=blue]
        > For some reason, the name of lib file that comes with the
        > active debugging kit has changed. I had to modify the
        > project options for library files and replace msdbg.lib with ad1.lib.
        >
        > Roger[/color]

        Thanks Roger.

        I have uploaded the patch (finally), but I ran into a few other build
        issues that I'd like to share in case someone else runs into them,
        or there are better solutions than what I used.

        o In setup_win32all. py, the "pre_install_sc ript" option does not appear to be
        supported by any version of distutils I could find. Is it a customization?
        I just commented it out to get things to build.

        o The following files appear to be missing from the source distribution for
        build 201:

        com/win32comext/taskscheduler/src/PyIProvideTaskP age.cpp
        com/win32comext/taskscheduler/src/PyIProvideTaskP age.h
        pywin32_preinst all.py
        PyWin32.chm

        I copied these from CVS, except for PyWin32.chm, which I copied from
        site-packages after installing build 201.

        o In addition to the MS Platform SDK you need the source files from Microsoft's
        Scriptng.exe zip file. Copy them all to: \com\win32comex t\AXDebug\src

        Phil

        Comment

        • Thomas Heller

          #5
          Re: pywin32 support for CreateTypeLib2

          phil@dspfactory .com (Phil Rittenhouse) writes:
          [color=blue]
          > "Roger Upole" <rupole@hotmail .com> wrote in message news:<40c90045_ 1@127.0.0.1>...[color=green]
          >> For some reason, the name of lib file that comes with the
          >> active debugging kit has changed. I had to modify the
          >> project options for library files and replace msdbg.lib with ad1.lib.
          >>
          >> Roger[/color]
          >
          > Thanks Roger.
          >
          > I have uploaded the patch (finally), but I ran into a few other build
          > issues that I'd like to share in case someone else runs into them,
          > or there are better solutions than what I used.
          >
          > o In setup_win32all. py, the "pre_install_sc ript" option does not appear to be
          > supported by any version of distutils I could find. Is it a customization?
          > I just commented it out to get things to build.[/color]

          It is officially supported in the Python CVS version.
          Maybe it should go into the 2.3 branch, but this would break the 'no new
          features' policy.

          But you can copy the head CVS distutils tree into the Python 2.3
          installation, and then build the installer with 2.3.

          Thomas

          Comment

          Working...