Trying to rebuild the curator RPM from the SRPM produces an error
on my RedHat 9.0 system...
============================
mjd@onza [~/rpms] myrpmbuild -bb SPECS/curator.spec
Executing(%prep): /bin/sh -e /home/mjd/rpms/TMP/rpm-tmp.89159
+ umask 022
+ cd /home/mjd/rpms/BUILD
+ LANG=C
+ export LANG
+ cd /home/mjd/rpms/BUILD
+ rm -rf curator-2.0.1
+ /usr/bin/gzip -dc /home/mjd/rpms/SOURCES/curator-2.0.1.tar.gz
+ tar -xvvf -
blah blah blah
+ cd curator-2.0.1
+ LANG=C
+ export LANG
+ python setup.py install --root=/home/mjd/rpms/TMP/curator-buildroot --record=INSTALLED_FILES
running install
Traceback (most recent call last):
File "setup.py", line 28, in ?
scripts = ['bin/curator']
File "/usr/lib/python2.2/distutils/core.py", line 138, in setup
dist.run_commands()
File "/usr/lib/python2.2/distutils/dist.py", line 893, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.2/distutils/dist.py", line 912, in run_command
cmd_obj.ensure_finalized()
File "/usr/lib/python2.2/distutils/cmd.py", line 112, in ensure_finalized
self.finalize_options()
File "/usr/lib/python2.2/distutils/command/install.py", line 267, in finalize_options
(prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
File "/usr/lib/python2.2/distutils/sysconfig.py", line 421, in get_config_vars
func()
File "/usr/lib/python2.2/distutils/sysconfig.py", line 326, in _init_posix
raise DistutilsPlatformError(my_msg)
distutils.errors.DistutilsPlatformError: invalid Python installation: unable to open /usr/lib/python2.2/config/Makefile (No such file or directory)
error: Bad exit status from /home/mjd/rpms/TMP/rpm-tmp.8391 (%install)
RPM build errors:
Bad exit status from /home/mjd/rpms/TMP/rpm-tmp.8391 (%install)
============================
I have python 2.2.2-26 on my machine
mjd@onza [~/rpms] rpm -q -a | grep "^python"
python-optik-1.4-2
python-2.2.2-26
mjd@onza [~/rpms]
I dug around on the Net, found that config/Makefile is included in python-devel.
Installing python-dev fixes the problem.
I have attached a patch for the .spec file which ensures there's a warning if
python-devel is not installed.
Mitch.
Explicitly mention python-devel as a build-time dependency.