packages: python-subvertpy/apu_includes.patch (NEW), python-subvertpy/pytho...

wiget wiget at pld-linux.org
Thu Mar 11 15:31:42 CET 2010


Author: wiget                        Date: Thu Mar 11 14:31:42 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- initial

---- Files affected:
packages/python-subvertpy:
   apu_includes.patch (NONE -> 1.1)  (NEW), python-subvertpy.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/python-subvertpy/apu_includes.patch
diff -u /dev/null packages/python-subvertpy/apu_includes.patch:1.1
--- /dev/null	Thu Mar 11 15:31:42 2010
+++ packages/python-subvertpy/apu_includes.patch	Thu Mar 11 15:31:37 2010
@@ -0,0 +1,67 @@
+--- subvertpy-0.7.2/setup.py.wiget	2010-03-11 15:15:17.000000000 +0100
++++ subvertpy-0.7.2/setup.py	2010-03-11 15:21:02.000000000 +0100
+@@ -76,6 +76,26 @@ def apr_config(arg):
+         res = run_cmd(apr_config_cmd, arg)
+     return res
+ 
++def apu_config(arg):
++    apu_config_cmd = os.getenv("APU_CONFIG")
++    if apu_config_cmd is None:
++        cmds = ["apu-1-config", "/usr/local/apr-utils/bin/apu-1-config", 
++                "/opt/local/bin/apu-1-config", ]
++        for cmd in cmds:
++            try:
++                res = run_cmd(cmd, arg)
++                apu_config_cmd = cmd
++                break
++            except CommandException, e:
++                if not e.not_found():
++                    raise
++        else:
++            raise Exception("apu-config not found."
++                            " Please set APU_CONFIG environment variable")
++    else:
++        res = run_cmd(apu_config_cmd, arg)
++    return res
++
+ 
+ def apr_build_data():
+     """Determine the APR header file location."""
+@@ -84,6 +104,13 @@ def apr_build_data():
+         raise Exception("APR development headers not found")
+     return (includedir,)
+ 
++def apu_build_data():
++    """Determine the APR-UTILS header file location."""
++    includedir = apu_config("--includedir")
++    if not os.path.isdir(includedir):
++        raise Exception("APR-UTILS development headers not found")
++    return (includedir,)
++
+ 
+ def svn_build_data():
+     """Determine the Subversion header file location."""
+@@ -108,8 +135,9 @@ def is_keychain_provider_available():
+     Checks for the availability of the Keychain simple authentication provider in Subversion by compiling a simple test program.
+     """
+     abd = apr_build_data()
++    aubd = apu_build_data()
+     sbd = svn_build_data()
+-    gcc_command_args = ['gcc'] + ['-I' + inc for inc in sbd[0]] + ['-L' + lib for lib in sbd[1]] + ['-I' + abd[0], '-lsvn_subr-1', '-x', 'c', '-']
++    gcc_command_args = ['gcc'] + ['-I' + inc for inc in sbd[0]] + ['-L' + lib for lib in sbd[1]] + ['-I' + abd[0], '-I' + aubd[0], '-lsvn_subr-1', '-x', 'c', '-']
+     (gcc_in, gcc_out, gcc_err) = os.popen3(gcc_command_args)
+     gcc_in.write("""
+ #include <svn_auth.h>
+@@ -223,10 +251,11 @@ if os.name == "nt":
+         return includes, lib_dirs, aprlibs+libs,
+ 
+ (apr_includedir, ) = apr_build_data()
++(apu_includedir, ) = apu_build_data()
+ (svn_includedirs, svn_libdirs, extra_libs) = svn_build_data()
+ 
+ def SvnExtension(name, *args, **kwargs):
+-    kwargs["include_dirs"] = [apr_includedir] + svn_includedirs + ["subvertpy"]
++    kwargs["include_dirs"] = [apr_includedir, apu_includedir] + svn_includedirs + ["subvertpy"]
+     kwargs["library_dirs"] = svn_libdirs
+     if os.name == 'nt':
+         # on windows, just ignore and overwrite the libraries!

================================================================
Index: packages/python-subvertpy/python-subvertpy.spec
diff -u /dev/null packages/python-subvertpy/python-subvertpy.spec:1.1
--- /dev/null	Thu Mar 11 15:31:42 2010
+++ packages/python-subvertpy/python-subvertpy.spec	Thu Mar 11 15:31:37 2010
@@ -0,0 +1,66 @@
+# $Revision$, $Date$
+# TODO:
+# - include examples in package
+#
+%define		module	subvertpy
+#
+Summary:	A Pythonic binding for subversion
+Summary(pl.UTF-8):	Pythonowe wiązanie do subversion
+Name:		python-%{module}
+Version:	0.7.2
+Release:	1
+License:	LGPLv2.1+
+Group:		Libraries/Python
+Source0:	http://samba.org/~jelmer/subvertpy/%{module}-%{version}.tar.gz
+# Source0-md5:	01e2098db04ddddaf06a7e27c075745d
+Patch0:		apu_includes.patch
+URL:		http://samba.org/~jelmer/subvertpy/
+BuildRequires:	python-devel
+BuildRequires:	python-modules
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.219
+BuildRequires:	subversion-devel
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Python bindings for the Subversion version control system that are aimed to be
+complete, fast and feel native to Python programmers.
+
+%prep
+%setup -q -n %{module}-%{version}
+%patch0 -p1
+
+%build
+export APR_CONFIG=apr-1-config
+python setup.py build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+python setup.py install \
+	--root=$RPM_BUILD_ROOT \
+	--optimize=2
+
+%py_postclean
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS NEWS
+%attr(755,root,root) %{_bindir}/subvertpy-fast-export
+%dir %{py_sitedir}/subvertpy
+%{py_sitedir}/subvertpy/*.py[co]
+%attr(755,root,root) %{py_sitedir}/subvertpy/*.so
+%{py_sitedir}/subvertpy-*.egg-info
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2010/03/11 14:31:37  wiget
+- initial
+
================================================================


More information about the pld-cvs-commit mailing list