[packages/python-libextractor] - updated/switched to ctypes bindings, version 0.6

qboosh qboosh at pld-linux.org
Thu Dec 26 22:07:40 CET 2013


commit 3569976a0dabdea5c3274b4fea54c642a4de0020
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Dec 26 22:07:23 2013 +0100

    - updated/switched to ctypes bindings, version 0.6

 ac_python_devel.patch             | 63 ---------------------------------------
 libextractor-python-destdir.patch | 15 ----------
 python-libextractor.spec          | 61 ++++++++++++++++---------------------
 3 files changed, 25 insertions(+), 114 deletions(-)
---
diff --git a/python-libextractor.spec b/python-libextractor.spec
index 1324db6..13b1c44 100644
--- a/python-libextractor.spec
+++ b/python-libextractor.spec
@@ -1,61 +1,50 @@
-# TODO
-# - fix some autofoo:
-#checking for EXTRACTOR_loadDefaultLibraries in -lextractor... ./configure[4411]: ac_fn_c_try_link: not found
-#no
-#configure: error: libextractor-python requires libextractor
-#error: Bad exit status from /home/users/glen/tmp/rpm-tmp.7334 (%build)
-
-Summary:	Python support for libextractor
-Summary(pl.UTF-8):	Moduł języka Python dla biblioteki libextractor
+Summary:	Python bindings for GNU libextractor
+Summary(pl.UTF-8):	Wiązania Pythona do biblioteki GNU libextractor
 Name:		python-libextractor
-Version:	0.5.4
-Release:	4
-License:	GPL
+Version:	0.6
+Release:	1
+License:	GPL v2+
 Group:		Libraries/Python
-Source0:	http://gnunet.org/libextractor/download/libextractor-python-%{version}.tar.gz
-# Source0-md5:	fbe72b00b8780b528892274b96c9d40f
-Patch0:		libextractor-python-destdir.patch
-Patch1:		ac_python_devel.patch
+Source0:	http://ftp.gnu.org/gnu/libextractor/libextractor-python-%{version}.tar.gz
+# Source0-md5:	adea21c10163d262e02154b21b4f74a2
 URL:		http://gnunet.org/libextractor/
-BuildRequires:	autoconf >= 2.57
-BuildRequires:	automake
-BuildRequires:	libextractor-devel >= %{version}
+BuildRequires:	libextractor-devel >= 0.6
 BuildRequires:	python-devel >= 1:2.3
-Requires:	libextractor >= %{version}
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.219
+Requires:	libextractor >= 0.6
 %pyrequires_eq	python-libs
 Obsoletes:	python-extractor
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-Python support for libextractor.
+Python bindings for GNU libextractor.
 
 %description -l pl.UTF-8
-Moduł języka Python dla biblioteki libextractor.
+Wiązania Pythona do biblioteki GNU libextractor.
 
 %prep
-%setup -q -n libextractor-python-%{version}
-%patch0 -p1
-%patch1 -p1
+%setup -q -n Extractor-%{version}
 
 %build
-%{__aclocal} -I m4
-%{__autoconf}
-%{__automake}
-%configure \
-	--with-extractor=/usr
-
-%{__make}
+%{__python} setup.py build
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
-	DESTDIR=$RPM_BUILD_ROOT
+%{__python} setup.py install \
+	--skip-build \
+	--root=$RPM_BUILD_ROOT \
+	--optimize=2
+
+%py_postclean
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog README
-%attr(755,root,root) %{py_sitedir}/extractor.so
+%doc README
+%attr(755,root,root) %{_bindir}/extract.py
+%{py_sitescriptdir}/extractor.py[co]
+%{py_sitescriptdir}/Extractor-0.6-py*.egg-info
diff --git a/ac_python_devel.patch b/ac_python_devel.patch
deleted file mode 100644
index 6bd69f7..0000000
--- a/ac_python_devel.patch
+++ /dev/null
@@ -1,63 +0,0 @@
---- libextractor-python-0.5.4/m4/ac_python_devel.m4~	2005-08-04 01:13:40.000000000 +0300
-+++ libextractor-python-0.5.4/m4/ac_python_devel.m4	2010-07-17 23:54:23.115990476 +0300
-@@ -9,46 +9,31 @@
- 
- 	# Check for Python include path
- 	AC_MSG_CHECKING([for Python include path])
--	python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
--	for i in "$python_path/include/python$PYTHON_VERSION/" "$python_path/include/python/" "$python_path/" ; do
--		python_path=`find $i -type f -name Python.h -print | sed "1q"`
--		if test -n "$python_path" ; then
--			break
--		fi
--	done
--	python_path=`echo $python_path | sed "s,/Python.h$,,"`
--	AC_MSG_RESULT([$python_path])
--	if test -z "$python_path" ; then
-+	python_includes=`python-config --includes`
-+	AC_MSG_RESULT([$python_includes])
-+	if test -z "$python_includes" ; then
- 		AC_MSG_WARN([cannot find Python include path])
- 	else
--	AC_SUBST([PYTHON_CPPFLAGS],[-I$python_path])
-+	AC_SUBST([PYTHON_CPPFLAGS],[-I$python_includes])
- 
- 	# Check for Python library path
- 	AC_MSG_CHECKING([for Python library path])
--	python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
--	for i in "$python_path/lib/python$PYTHON_VERSION/config/" "$python_path/lib/python$PYTHON_VERSION/" "$python_path/lib/python/config/" "$python_path/lib/python/" "$python_path/" ; do
--		python_path=`find $i -type f -name libpython$PYTHON_VERSION.* -print | sed "1q"`
--		if test -n "$python_path" ; then
--			break
--		fi
--	done
--	python_path=`echo $python_path | sed "s,/libpython.*$,,"`
--	AC_MSG_RESULT([$python_path])
--	if test -z "$python_path" ; then
-+	python_ldflags=`python-config --ldflags`
-+	AC_MSG_RESULT([$python_ldflags])
-+	if test -z "$python_ldflags" ; then
- 		AC_MSG_ERROR([cannot find Python library path])
- 	fi
--	AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -lpython$PYTHON_VERSION"])
--	#
--	python_site=`echo $python_path | sed "s/config/site-packages/"`
-+	AC_SUBST([PYTHON_LDFLAGS],[$python_ldflags])
-+
-+	# unused here
-+	python_site=""
- 	AC_SUBST([PYTHON_SITE_PKG],[$python_site])
- 	#
- 	# libraries which must be linked in when embedding
- 	#
--	AC_MSG_CHECKING(python extra libraries)
--	PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \
--                conf = distutils.sysconfig.get_config_var; \
--                print conf('LOCALMODLIBS')+' '+conf('LIBS')"
--	AC_MSG_RESULT($PYTHON_EXTRA_LIBS)`
-+	# same as ldflags, but unused here
-+	PYTHON_EXTRA_LIBS="$python_ldflags"
-+	AC_MSG_RESULT($PYTHON_EXTRA_LIBS)
- 	AC_SUBST(PYTHON_EXTRA_LIBS)
- 	fi
- ])
diff --git a/libextractor-python-destdir.patch b/libextractor-python-destdir.patch
deleted file mode 100644
index fe56ef9..0000000
--- a/libextractor-python-destdir.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- libextractor-python-0.5.4/Makefile.am.orig	2005-08-27 08:19:21.000000000 +0200
-+++ libextractor-python-0.5.4/Makefile.am	2005-08-29 22:16:36.091081680 +0200
-@@ -1,9 +1,9 @@
- all:
- 	python libextractor_python_setup.py $(EXT_LIB_PATH) build
- install-exec-local:
--	python libextractor_python_setup.py $(EXT_LIB_PATH) install --prefix=$(PYTHON_PREFIX)
-+	python libextractor_python_setup.py $(EXT_LIB_PATH) install --prefix=$(DESTDIR)$(PYTHON_PREFIX)
- EXTRA_DIST = \
-   extract.py \
-   libextractor_python_setup.py \
-   libextractor_python.c \
--  README.debian
-\ Brak znaku nowej linii na ko�cu pliku
-+  README.debian
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-libextractor.git/commitdiff/3569976a0dabdea5c3274b4fea54c642a4de0020



More information about the pld-cvs-commit mailing list