[packages/python-pygit2/docbuild] fix doc building on arch != x86_64

draenog draenog at pld-linux.org
Sun Oct 13 19:39:14 CEST 2013


commit 2d087e32ce3ca95311d385dee211685d65ba6674
Author: Kacper Kornet <draenog at pld-linux.org>
Date:   Sun Oct 13 18:37:51 2013 +0100

    fix doc building on arch != x86_64

 python-pygit2-docbuild.patch | 17 +++++++++++++++++
 python-pygit2.spec           |  4 +++-
 2 files changed, 20 insertions(+), 1 deletion(-)
---
diff --git a/python-pygit2.spec b/python-pygit2.spec
index 8aaaa20..016f0b1 100644
--- a/python-pygit2.spec
+++ b/python-pygit2.spec
@@ -13,6 +13,7 @@ License:	GPL v2 with linking exception
 Group:		Libraries/Python
 Source0:	http://pypi.python.org/packages/source/p//pygit2/%{module}-%{version}.tar.gz
 # Source0-md5:	6c61833605bb52a483141780ad233584
+Patch0:		%{name}-docbuild.patch
 URL:		https://pypi.python.org/pypi/pygit2
 BuildRequires:	libgit2-devel >= 0.19.0
 BuildRequires:	python-devel
@@ -49,6 +50,7 @@ Dokumentacja API %{module}.
 
 %prep
 %setup -q -n %{module}-%{version}
+%patch0 -p0
 
 %build
 %{__python} setup.py build --build-base build-2
@@ -69,7 +71,7 @@ Dokumentacja API %{module}.
 
 %if %{with docs}
 cd docs
-%{__make} -j1 html
+PACKAGE_BUILD=../build-2 %{__make} -j1 html
 rm -rf _build/html/_sources
 %endif
 
diff --git a/python-pygit2-docbuild.patch b/python-pygit2-docbuild.patch
new file mode 100644
index 0000000..6b9b8f4
--- /dev/null
+++ b/python-pygit2-docbuild.patch
@@ -0,0 +1,17 @@
+--- docs/conf.py.orig	2013-10-13 17:53:38.807267727 +0100
++++ docs/conf.py	2013-10-13 18:06:24.038047114 +0100
+@@ -12,11 +12,13 @@
+ # serve to show the default.
+ 
+ import sys, os
++from distutils.util import get_platform
+ 
+ # If extensions (or modules to document with autodoc) are in another directory,
+ # add these directories to sys.path here. If the directory is relative to the
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
+-sys.path.insert(0, os.path.abspath('../build/lib.linux-x86_64-2.7'))
++builddir = os.getenv('PACKAGE_BUILD', '../build')
++sys.path.insert(0, os.path.abspath('%s/lib.%s-%s' % (builddir, get_platform(), sys.version[0:3])))
+ 
+ # -- General configuration -----------------------------------------------------
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-pygit2.git/commitdiff/2d087e32ce3ca95311d385dee211685d65ba6674



More information about the pld-cvs-commit mailing list