Menu

swig matter with python-2.5 ?

Help
aster'oid
2008-02-10
2012-09-19
  • aster'oid

    aster'oid - 2008-02-10

    Hi, I'm trying to compil MySQL-python to use with trac.
    What I've got installed :
    - python-2.5.1
    - mysql-5.0.51
    - pyrex-0.9.6.4
    - swig-1.3.33
    - setuptools-0.6c7
    All packages have been installed from source on my Slackware-12.0 exept python and mysql, provides whith Slackware.

    When I launch python setup.py build on MySQL-python-1.2.2/ directory, this is what append :


    running build_ext
    building '_mysql' extension
    Traceback (most recent call last):
    File "setup.py", line 19, in <module>
    setup(**metadata)
    File "/usr/lib/python2.5/distutils/core.py", line 151, in setup
    dist.run_commands()
    File "/usr/lib/python2.5/distutils/dist.py", line 974, in run_commands
    self.run_command(cmd)
    File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command
    cmd_obj.run()
    File "/usr/lib/python2.5/distutils/command/build.py", line 112, in run
    self.run_command(cmd_name)
    File "/usr/lib/python2.5/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
    File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command
    cmd_obj.run()
    File "/usr/lib/python2.5/site-packages/setuptools/command/build_ext.py", line 46, in run
    _build_ext.run(self)
    File "/usr/lib/python2.5/distutils/command/build_ext.py", line 290, in run
    self.build_extensions()
    File "/usr/lib/python2.5/site-packages/Pyrex/Distutils/build_ext.py", line 82, in build_extensions
    self.build_extension(ext)
    File "/usr/lib/python2.5/site-packages/setuptools/command/build_ext.py", line 175, in build_extension
    _build_ext.build_extension(self,ext)
    File "/usr/lib/python2.5/distutils/command/build_ext.py", line 453, in build_extension
    sources = self.swig_sources(sources, ext)
    File "/usr/lib/python2.5/site-packages/setuptools/command/build_ext.py", line 77, in swig_sources
    sources = _build_ext.swig_sources(self, sources) or sources
    TypeError: swig_sources() takes exactly 3 arguments (2 given)


    What can I do for installing MySQL-python ?

    thanks, I spend 2 days on it and I cannot do nothing.

     
    • aster'oid

      aster'oid - 2008-02-14

      exactly. I remove it and compilation works fine. Maybe you need to fix that in next release. I can send you more information (log, trace, ...) if you want. Thx for those messages ... I hope I will reinstall Pyrex later without problem.

       
      • Andy Dustman

        Andy Dustman - 2008-02-14

        Um, yeah. If you can find something in MySQL-python that solves your Pyrex/SWIG problem, feel free to submit it as a bug... It's more likely to be a problem with distutils... SWIG's API changed at some point so it's likely that a newer (or older) version will keep it from happening.

         
    • Andy Dustman

      Andy Dustman - 2008-02-12

      It seems your problem is with pyrex. SWIG is not used for MySQL-python.

       
    • aster'oid

      aster'oid - 2008-02-13

      great. And what can I do ?

       
      • Andy Dustman

        Andy Dustman - 2008-02-13

        Don't use pyrex to build MySQL-Python?... There's already a big C module in there anyway...

         
        • aster'oid

          aster'oid - 2008-02-13

          do you mean I need to uninstall pyrex to install MySQL-python ? I think I can't ... is pyrex only used to build OR is also used as librairie ?

           
          • Andy Dustman

            Andy Dustman - 2008-02-13

            Your traceback shows Pyrex as being part of the problem. Pyrex is not needed by MySQLdb. You don't have to remove it but it is interfering with the build process.

             

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.