Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-devhelp
Navigation:
Lists: gentoo-devhelp: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-devhelp@g.o
From: Thomas Pani <thomas.pani@...>
Subject: Re: sci-libs/sympy USE flags
Date: Wed, 23 Jan 2008 20:11:26 +0100
Mike Frysinger wrote:
> unlike tinyurl, rafb.net expires.  please do not use links to rafb.net in 
> e-mails.
> -mike

Sorry, I normally paste to OSL (set to `forever'), dunno what went wrong
here... ebuild's attached.
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

NEED_PYTHON=2.4

inherit eutils distutils python multilib

DESCRIPTION="Python library for symbolic mathematics."
HOMEPAGE="http://code.google.com/p/sympy/"
SRC_URI="http://sympy.googlecode.com/files/${P}.tar.gz"

SLOT="0"

LICENSE="BSD"
KEYWORDS="~amd64 ~x86"
IUSE="examples math gtk latex plot test"

RDEPEND="math? (
		dev-libs/libxml2
		dev-libs/libxslt
		gtk? ( x11-libs/gtkmathview )
	)
	latex? (
		virtual/latex-base
		app-text/dvipng
		>=dev-python/pexpect-2.0
	)
	plot? (
		dev-python/pyopengl
		dev-python/imaging
		dev-python/ctypes
	)"
DEPEND="test? ( >=dev-python/py-0.9.0 )
	${RDEPEND}"

pkg_setup() {
	if use math ; then
		if ! built_with_use "dev-libs/libxml2" python ; then
			eerror "dev-libs/libxml2 has to be compiled with 'python' USE-flag."
			die "Needed USE-flag for dev-libs/libxml2 not found."
		fi

		if ! built_with_use "dev-libs/libxslt" python ; then
			eerror "dev-libs/libxslt has to be compiled with 'python' USE-flag."
			die "Needed USE-flag for dev-libs/libxslt not found."
		fi

		if use gtk && ! built_with_use "x11-libs/gtkmathview" gtk ; then
			eerror "x11-libs/gtkmathview has to be compiled with 'gtk' USE-flag."
			die "Needed USE-flag for x11-libs/gtkmathview not found."
		fi
	fi
}

src_test() {
	PYTHONPATH=build/lib/ "${python}" setup.py test || die "Unit tests failed!"
}

src_install() {
	distutils_src_install

	if use examples ; then
		insinto /usr/share/doc/${PF}
		doins -r examples
	fi

	python_version

	# 'pyglet' is not yet available in portage tree
	insinto ${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/sympy/thirdparty
	doins -r sympy/thirdparty/pyglet
}

pkg_postinst() {
	if ! has_version ">=dev-python/ipython-0.7.2" ; then
		elog
		elog "IPython 0.7.2 (or better) wasn't found on your system. It is"
		elog "highly recommended to install this package to optimize your"
		elog "work with SymPy. To do so, you can run:"
		elog
		elog " emerge '>=dev-python/ipython-0.7.2'"
		elog
	fi
}

pkg_postrm() {
	if use examples ; then
		python_mod_cleanup /usr/share/doc/${PF}
	fi
}
References:
sci-libs/sympy USE flags
-- Thomas Pani
Re: sci-libs/sympy USE flags
-- Mike Frysinger
Navigation:
Lists: gentoo-devhelp: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: sci-libs/sympy USE flags
Next by thread:
Re: sci-libs/sympy USE flags
Previous by date:
Re: gdbm ebuild with 64bit off_t
Next by date:
RE: gdbm ebuild with 64bit off_t


Updated Jun 17, 2009

Summary: Archive of the gentoo-devhelp mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.