We have moved to Git. This repository is only provided for compatibility with old installations. Learn how to migrate your installation here.

diff dev-vcs/kallithea/kallithea-0.3.1.ebuild @ 141:99a8dff9f4b0

dev-vcs/kallithea: PostgreSQL support
author Daniel Neugebauer <dneuge@energiequant.de>
date Mon, 28 Mar 2016 19:06:49 +0200
parents 3bcc5cfd5a95
children 2389785d147c
line wrap: on
line diff
--- a/dev-vcs/kallithea/kallithea-0.3.1.ebuild	Mon Mar 28 18:02:08 2016 +0200
+++ b/dev-vcs/kallithea/kallithea-0.3.1.ebuild	Mon Mar 28 19:06:49 2016 +0200
@@ -20,11 +20,12 @@
 HOMEPAGE="https://kallithea-scm.org/"
 SRC_URI="https://pypi.python.org/packages/source/K/Kallithea/Kallithea-${PV}.tar.bz2"
 
-IUSE="+sqlite +git"
+IUSE="+sqlite +git postgres"
 
 RDEPEND="
 	dev-python/virtualenv
 	git? ( dev-vcs/git )
+	postgres? ( dev-db/postgresql )
 	sqlite? ( dev-lang/python:2.7[sqlite] )
 "
 
@@ -81,6 +82,13 @@
 	# Kallithea's attempt to install Mercurial fails, so we do it first
 	pip2.7 install 'mercurial>=2.9,<3.8' || die "Failed to install Mercurial, aborting!"
 	
+	# WORKAROUND:
+	# Kallithea needs psycopg2 for PostgreSQL support which is not currently listed as a dependency?!
+	# at the time of writing 2.6.1 is current, so we limit the version to <2.7
+	if use postgres ; then
+		pip2.7 install 'psycopg2>=2.6,<2.7' || die "Failed to install psycopg2 (required for PostgreSQL support), aborting!"
+	fi
+	
 	# perform automatic installation, includes dependencies
 	echo
 	echo "===> output by Kallithea's setup.py"