rpms/openwsman/EL-5 python-config,NONE,1.1 openwsman.spec,1.2,1.3
Praveen K Paladugu
praveenp at fedoraproject.org
Tue Sep 29 17:29:00 UTC 2009
Author: praveenp
Update of /cvs/pkgs/rpms/openwsman/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8503
Modified Files:
openwsman.spec
Added Files:
python-config
Log Message:
Made a few changes to support python-config test on RHEL5.
--- NEW FILE python-config ---
#!/usr/bin/python2.5
import sys
import os
import getopt
from distutils import sysconfig
valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags',
'ldflags', 'help']
def exit_with_usage(code=1):
print >>sys.stderr, "Usage: %s [%s]" % (sys.argv[0],
'|'.join('--'+opt for opt in valid_opts))
sys.exit(code)
try:
opts, args = getopt.getopt(sys.argv[1:], '', valid_opts)
except getopt.error:
exit_with_usage()
if not opts:
exit_with_usage()
opt = opts[0][0]
pyver = sysconfig.get_config_var('VERSION')
getvar = sysconfig.get_config_var
if opt == '--help':
exit_with_usage(0)
elif opt == '--prefix':
print sysconfig.PREFIX
elif opt == '--exec-prefix':
print sysconfig.EXEC_PREFIX
elif opt in ('--includes', '--cflags'):
flags = ['-I' + sysconfig.get_python_inc(),
'-I' + sysconfig.get_python_inc(plat_specific=True)]
if opt == '--cflags':
flags.extend(getvar('CFLAGS').split())
print ' '.join(flags)
elif opt in ('--libs', '--ldflags'):
libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
libs.append('-lpython'+pyver)
# add the prefix/lib/pythonX.Y/config dir, but only if there is no
# shared library in prefix/lib/.
if opt == '--ldflags' and not getvar('Py_ENABLE_SHARED'):
libs.insert(0, '-L' + getvar('LIBPL'))
print ' '.join(libs)
Index: openwsman.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openwsman/EL-5/openwsman.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- openwsman.spec 24 Sep 2009 22:57:22 -0000 1.2
+++ openwsman.spec 29 Sep 2009 17:28:59 -0000 1.3
@@ -4,10 +4,11 @@
Name: openwsman
Version: 2.2.0
-Release: 1%{?dist}
+Release: 2%{?dist}
License: BSD
Url: http://www.openwsman.org/
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
+Source2: python-config
Patch0: %{name}-initscript.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXXX)
Group: System Environment/Daemons
@@ -53,8 +54,10 @@ Openwsman ruby bindings
%prep
-%setup -q
+%setup -q
%patch0 -p1
+cp -p %{SOURCE2} %{_builddir}/%{name}-%{version}
+sed -i -e 's|#!/usr/bin/python2.5|#!%{__python}|' %{_builddir}/%{name}-%{version}/python-config
%build
chmod a-x src/lib/*.[ch]
@@ -63,8 +66,7 @@ chmod a-x include/*.[ch]
# disable eventing, as Fedora libcurl isn't linked against openssl
# disable tests in 2.1.0, http://www.openwsman.org/bug/263
-%configure --with-examples=yes --with-tests=no --enable-python=yes --enable-ruby=yes --enable-eventing=no --disable-more-warnings
-echo %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
+%configure --with-examples=yes --with-tests=no --enable-python=yes --enable-ruby=yes --enable-eventing=no --disable-more-warnings PATH=$PATH:.
make %{?_smp_flags}
%install
@@ -97,7 +99,7 @@ rm -rf %{buildroot}
%dir /etc/openwsman
%config(noreplace) /etc/openwsman/openwsman.conf
%config(noreplace) /etc/openwsman/ssleay.cnf
-/usr/lib/ruby/site_ruby/1.8/openwsman/
+%{_libdir}/ruby/site_ruby/1.8/openwsman/
%config(noreplace) %{_sysconfdir}/pam.d/openwsman
%doc COPYING README
@@ -139,6 +141,11 @@ fi
%changelog
+* Tue Sep 29 2009 Praveen K Paladugu <praveen_paladugu at dell.com> - 2.2.0-2
+- check for python-configure in configure.ac fails because python-config
+- is not part of python-2.4 which is currently available in RHEL
+- So added a script python-config to the sources, and allowed configure to
+- search in BUILD/opewsman-2.2.0 for python-configure script.
* Wed Sep 23 2009 Praveen K Paladugu <praveen_paladugu at dell.com> - 2.2.0-1
- Added the new 2.2.0 sources.
- Changed the release and version numbers.
More information about the scm-commits
mailing list