paronam - 2007-04-21

I downloaded 1.2.2 and went to compile a package for my Centos 4.4 with Python 2.3.4. I have the latest MySQL-devel 5.0.37.0 installed. Per the README I do a

setup.py bdist_rpm

and it chugs away until I get this:

Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/MySQL-python-buildroot
Wrote: /root/MySQL-python-1.2.2/build/bdist.linux-i686/rpm/SRPMS/MySQL-python-1.2.2-1.src.rpm
Wrote: /root/MySQL-python-1.2.2/build/bdist.linux-i686/rpm/RPMS/i386/MySQL-python-1.2.2-1.i386.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.86903
+ umask 022
+ cd /root/MySQL-python-1.2.2/build/bdist.linux-i686/rpm/BUILD
+ cd MySQL-python-1.2.2
+ rm -rf /var/tmp/MySQL-python-buildroot
+ exit 0
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.86903
+ umask 022
+ cd /root/MySQL-python-1.2.2/build/bdist.linux-i686/rpm/BUILD
+ rm -rf MySQL-python-1.2.2
+ exit 0
moving build/bdist.linux-i686/rpm/SRPMS/MySQL-python-1.2.2-1.src.rpm -> dist
moving build/bdist.linux-i686/rpm/RPMS/i386/MySQL-python-1.2.2-1.i386.rpm -> dist
Traceback (most recent call last):
File "./setup.py", line 19, in ?
setup(**metadata)
File "/usr/lib/python2.3/distutils/core.py", line 149, in setup
dist.run_commands()
File "/usr/lib/python2.3/distutils/dist.py", line 907, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.3/distutils/dist.py", line 927, in run_command
cmd_obj.run()
File "build/bdist.linux-i686/egg/setuptools/command/bdist_rpm.py", line 28, in run
File "/usr/lib/python2.3/distutils/command/bdist_rpm.py", line 342, in run
self.move_file(rpm, self.dist_dir)
File "build/bdist.linux-i686/egg/setuptools/command/bdist_rpm.py", line 20, in move_file
NameError: global name 'get_python_version' is not defined