]> git.pld-linux.org Git - packages/python-subvertpy.git/commitdiff
- initial auto/th/python-subvertpy-0_7_2-1
authorArtur Frysiak <artur@frysiak.net>
Thu, 11 Mar 2010 14:31:37 +0000 (14:31 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    apu_includes.patch -> 1.1
    python-subvertpy.spec -> 1.1

apu_includes.patch [new file with mode: 0644]
python-subvertpy.spec [new file with mode: 0644]

diff --git a/apu_includes.patch b/apu_includes.patch
new file mode 100644 (file)
index 0000000..0a69acb
--- /dev/null
@@ -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!
diff --git a/python-subvertpy.spec b/python-subvertpy.spec
new file mode 100644 (file)
index 0000000..b116020
--- /dev/null
@@ -0,0 +1,55 @@
+# 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
This page took 0.036966 seconds and 4 git commands to generate.