--- /dev/null
+Use bsddb3 instead of deprecated python[berkdb]. Patch by Arfrever.
+
+--- a/planet/idindex.py
++++ b/planet/idindex.py
+@@ -13,8 +13,8 @@
+ cache = config.cache_directory()
+ index=os.path.join(cache,'index')
+ if not os.path.exists(index): return None
+- import dbhash
+- return dbhash.open(filename(index, 'id'),'w')
++ import bsddb3
++ return bsddb3.hashopen(filename(index, 'id'),'w')
+ except Exception, e:
+ if e.__class__.__name__ == 'DBError': e = e.args[-1]
+ from planet import logger as log
+@@ -35,8 +35,8 @@
+ cache = config.cache_directory()
+ index=os.path.join(cache,'index')
+ if not os.path.exists(index): os.makedirs(index)
+- import dbhash
+- index = dbhash.open(filename(index, 'id'),'c')
++ import bsddb3
++ index = bsddb3.hashopen(filename(index, 'id'),'c')
+
+ try:
+ import libxml2
+--- a/tests/test_idindex.py
++++ b/tests/test_idindex.py
+@@ -67,8 +67,8 @@
+ self.assertEqual(12,len(doc.getElementsByTagName('planet:name')))
+
+ try:
+- module = 'dbhash'
++ import bsddb3
+ except ImportError:
+- planet.logger.warn("dbhash is not available => can't test id index")
++ planet.logger.warn("bsddb3 is not available => can't test id index")
+ for method in dir(idIndexTest):
+ if method.startswith('test_'): delattr(idIndexTest,method)
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI="3"
-PYTHON_DEPEND="2:2.5"
-SUPPORT_PYTHON_ABIS="1"
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
-inherit webapp python
+inherit webapp python-single-r1
WEBAPP_MANUAL_SLOT="yes"
IUSE="django genshi redland test"
SLOT="0"
-DEPEND="
- test? ( =dev-lang/python-2*[berkdb] )
- "
-RDEPEND="django? ( dev-python/django )
- genshi? ( dev-python/genshi )
- redland? ( dev-python/rdflib[redland] )
- dev-python/chardet
- dev-python/httplib2
- dev-python/utidylib
-"
-RESTRICT_PYTHON_ABIS="3.*"
+RDEPEND="
+ dev-python/bsddb3[${PYTHON_USEDEP}]
+ dev-python/chardet[${PYTHON_USEDEP}]
+ dev-python/httplib2[${PYTHON_USEDEP}]
+ dev-python/utidylib[${PYTHON_USEDEP}]
+ django? ( dev-python/django[${PYTHON_USEDEP}] )
+ genshi? ( dev-python/genshi[${PYTHON_USEDEP}] )
+ redland? ( dev-python/rdflib[redland,${PYTHON_USEDEP}] )
+ ${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
S="${WORKDIR}"/${PN}
+pkg_setup() {
+ python-single-r1_pkg_setup
+ webapp_pkg_setup
+}
+
src_prepare() {
- python_convert_shebangs -r 2 .
+ eapply "${FILESDIR}"/venus-bsddb3.patch
+ eapply_user
+ python_fix_shebang .
}
src_test() {
- testing() {
- PYTHONPATH="build-${PYTHON_ABI}/lib" "$(PYTHON)" runtests.py
- }
- python_execute_function testing
+ "${PYTHON}" runtests.py || die
}
src_install() {
webapp_src_preinst
dodoc AUTHORS README TODO
- dohtml -r docs/*
+ dodoc -r docs
- installation() {
- insinto "$(python_get_sitedir)/${PN}"
- doins -r *py {filters,planet}
- }
- python_execute_function installation
+ python_moduleinto venus
+ python_domodule *.py filters planet
insinto "${MY_APPDIR}"
doins -r themes
}
pkg_postinst() {
- python_mod_optimize venus
webapp_pkg_postinst
elog "Installation instructions can be found at /usr/share/doc/${PF}/html/
or http://intertwingly.net/code/venus/docs/index.html"
}
-
-pkg_postrm() {
- python_mod_cleanup venus
-}