diff --git a/0002-Add-stub-python-module-for-tevent.patch b/0002-Add-stub-python-module-for-tevent.patch new file mode 100644 index 0000000..37c8551 --- /dev/null +++ b/0002-Add-stub-python-module-for-tevent.patch @@ -0,0 +1,47 @@ +From 5d1922739e852fcc2a143996e88420b09c5dbff9 Mon Sep 17 00:00:00 2001 +From: Jelmer Vernooij +Date: Tue, 6 Dec 2011 21:03:21 +0100 +Subject: [PATCH 1/3] Add stub python module for tevent. + +--- + lib/tevent/tevent.py | 28 ++++++++++++++++++++++++++++ + 1 files changed, 28 insertions(+), 0 deletions(-) + create mode 100644 lib/tevent/tevent.py + +diff --git a/lib/tevent/tevent.py b/lib/tevent/tevent.py +new file mode 100644 +index 0000000000000000000000000000000000000000..758ed48a483f922382241a86ae933e61881b8dda +--- /dev/null ++++ b/lib/tevent/tevent.py +@@ -0,0 +1,28 @@ ++#!/usr/bin/python ++# ++# Python integration for tevent ++# ++# Copyright (C) Jelmer Vernooij 2011 ++# ++# ** NOTE! The following LGPL license applies to the tevent ++# ** library. This does NOT imply that all of Samba is released ++# ** under the LGPL ++# ++# This library is free software; you can redistribute it and/or ++# modify it under the terms of the GNU Lesser General Public ++# License as published by the Free Software Foundation; either ++# version 3 of the License, or (at your option) any later version. ++# ++# This library is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# Lesser General Public License for more details. ++# ++# You should have received a copy of the GNU Lesser General Public ++# License along with this library; if not, see . ++ ++from _tevent import ( ++ backend_list, ++ Context, ++ Signal, ++ ) +-- +1.7.7.3 + diff --git a/0003-Install-platform-independent-python-scripts-to-the-P.patch b/0003-Install-platform-independent-python-scripts-to-the-P.patch new file mode 100644 index 0000000..5591165 --- /dev/null +++ b/0003-Install-platform-independent-python-scripts-to-the-P.patch @@ -0,0 +1,23 @@ +From de4b8943bfb40e2f50c9e4e2ee5d39e986317d08 Mon Sep 17 00:00:00 2001 +From: Jelmer Vernooij +Date: Tue, 6 Dec 2011 21:08:15 +0100 +Subject: [PATCH 2/3] Install (platform-independent) python scripts to the + PYTHONDIR rather than PYTHONARCHDIR. + +--- + source4/scripting/python/wscript_build | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/source4/scripting/python/wscript_build b/source4/scripting/python/wscript_build +index 8879f759bad789e9647437722c2a64146259595c..73f7ae80aeaae4d9c33f8bf52274b808660c2e5e 100644 +--- a/source4/scripting/python/wscript_build ++++ b/source4/scripting/python/wscript_build +@@ -36,4 +36,4 @@ bld.SAMBA_SCRIPT('samba_python', + pattern='samba/**/*.py', + installdir='python') + +-bld.INSTALL_WILDCARD('${PYTHONARCHDIR}', 'samba/**/*.py', flat=False) ++bld.INSTALL_WILDCARD('${PYTHONDIR}', 'samba/**/*.py', flat=False) +-- +1.7.7.3 + diff --git a/0004-tevent-Install-python-tevent-modules.patch b/0004-tevent-Install-python-tevent-modules.patch new file mode 100644 index 0000000..e8011d5 --- /dev/null +++ b/0004-tevent-Install-python-tevent-modules.patch @@ -0,0 +1,31 @@ +From 817f7529d3e6483c83ef336600b8743af62c545e Mon Sep 17 00:00:00 2001 +From: Jelmer Vernooij +Date: Tue, 6 Dec 2011 21:18:43 +0100 +Subject: [PATCH 3/3] tevent: Install python tevent modules. + +Autobuild-User: Jelmer Vernooij +Autobuild-Date: Tue Dec 6 23:13:37 CET 2011 on sn-devel-104 +--- + lib/tevent/wscript | 6 ++++++ + 1 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/lib/tevent/wscript b/lib/tevent/wscript +index 5afaacaa55d80ca174ad8806385deddaf648b3f6..d240630b6a6fed3c75dca9a4f5ec211996683edf 100644 +--- a/lib/tevent/wscript ++++ b/lib/tevent/wscript +@@ -97,6 +97,12 @@ def build(bld): + 'pytevent.c', + deps='tevent', + realname='_tevent.so') ++ # install out various python scripts for use by make test ++ bld.SAMBA_SCRIPT('tevent_python', ++ pattern='tevent.py', ++ installdir='python') ++ ++ bld.INSTALL_WILDCARD('${PYTHONDIR}', 'tevent.py', flat=False) + + + def test(ctx): +-- +1.7.7.3 + diff --git a/libtevent.spec b/libtevent.spec index a7de97e..2aaa505 100644 --- a/libtevent.spec +++ b/libtevent.spec @@ -6,7 +6,7 @@ Name: libtevent Version: 0.9.14 -Release: 3%{?dist} +Release: 4%{?dist} Group: System Environment/Daemons Summary: The tevent library License: LGPLv3+ @@ -23,6 +23,7 @@ Provides: bundled(libreplace) # Patches Patch1001: 0001-build-added-autoconf-disable-silent-rules-option.patch +Patch1002: FED02-fix-pytevent-build.patch %description Tevent is an event system based on the talloc memory management library. @@ -51,13 +52,35 @@ Requires: libtevent = %{version}-%{release} Python bindings for libtevent %prep +# Update timestamps on the files touched by a patch, to avoid non-equal +# .pyc/.pyo files across the multilib peers within a build, where "Level" +# is the patch prefix option (e.g. -p1) +# Taken from specfile for python-simplejson +UpdateTimestamps() { + Level=$1 + PatchFile=$2 + + # Locate the affected files: + for f in $(diffstat $Level -l $PatchFile); do + # Set the files to have the same timestamp as that of the patch: + touch -r $PatchFile $f + done +} + %setup -q -n tevent-%{version} + %patch1001 -p1 +UpdateTimestamps -p1 %{_sourcedir}/0001-build-added-autoconf-disable-silent-rules-option.patch + +%patch1002 -p1 +UpdateTimestamps -p1 %{_sourcedir}/FED02-fix-pytevent-build.patch + %build %configure --disable-rpath \ --bundled-libraries=NONE \ --builtin-libraries=replace + make %{?_smp_mflags} V=1 doxygen doxy.config @@ -93,6 +116,7 @@ rm -rf $RPM_BUILD_ROOT %files -n python-tevent %defattr(-,root,root,-) +%{python_sitelib}/tevent.py* %{python_sitearch}/_tevent.so %post -p /sbin/ldconfig @@ -100,6 +124,9 @@ rm -rf $RPM_BUILD_ROOT %postun -p /sbin/ldconfig %changelog +* Tue Dec 06 2011 Stephen Gallagher - 0.9.14-4 +- Build pytevent properly + * Thu Dec 01 2011 Stephen Gallagher - 0.9.14-3 - Add patch to ignore --disable-silent-rules - Include API documentation