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 @ 142:2389785d147c

dev-vcs/kallithea: adding MySQL support, removing sqlite default selection, requiring at least one database USE flag
author Daniel Neugebauer <dneuge@energiequant.de>
date Mon, 28 Mar 2016 20:27:26 +0200
parents 99a8dff9f4b0
children b4939be30911
line wrap: on
line diff
--- a/dev-vcs/kallithea/kallithea-0.3.1.ebuild	Mon Mar 28 19:06:49 2016 +0200
+++ b/dev-vcs/kallithea/kallithea-0.3.1.ebuild	Mon Mar 28 20:27:26 2016 +0200
@@ -20,14 +20,17 @@
 HOMEPAGE="https://kallithea-scm.org/"
 SRC_URI="https://pypi.python.org/packages/source/K/Kallithea/Kallithea-${PV}.tar.bz2"
 
-IUSE="+sqlite +git postgres"
+IUSE="+git mysql postgres sqlite"
+REQUIRED_USE="|| ( mysql postgres sqlite )"
 
 RDEPEND="
 	dev-python/virtualenv
 	git? ( dev-vcs/git )
+	mysql? ( dev-db/mysql )
 	postgres? ( dev-db/postgresql )
 	sqlite? ( dev-lang/python:2.7[sqlite] )
 "
+	#mysql? ( virtual/libmysqlclient )
 
 DEPEND="${RDEPEND}
 	app-arch/unzip
@@ -89,6 +92,13 @@
 		pip2.7 install 'psycopg2>=2.6,<2.7' || die "Failed to install psycopg2 (required for PostgreSQL support), aborting!"
 	fi
 	
+	# WORKAROUND:
+	# Kallithea needs MySQLdb for MySQL support which is not currently listed as a dependency?!
+	# at the time of writing 1.2.5 is current, so we limit the version to <1.3
+	if use mysql ; then
+		pip2.7 install 'MySQL-python>=1.2,<1.3' || die "Failed to install MySQL-python (required for MySQL support), aborting!"
+	fi
+	
 	# perform automatic installation, includes dependencies
 	echo
 	echo "===> output by Kallithea's setup.py"