diff options
author | 2012-06-11 21:23:42 +0200 | |
---|---|---|
committer | 2012-06-11 21:23:42 +0200 | |
commit | ac62378495e33e41e1ae532b799efa96b2f5a64f (patch) | |
tree | 929fed646d925806fcc2f07af247400f51b96eb1 | |
parent | [dev-python/ws4py] import from main tree, add missing deps, fix for vcs-snaps... (diff) | |
download | python-ac62378495e33e41e1ae532b799efa96b2f5a64f.tar.gz python-ac62378495e33e41e1ae532b799efa96b2f5a64f.tar.bz2 python-ac62378495e33e41e1ae532b799efa96b2f5a64f.zip |
[dev-python/traits] version bump, fix tests and docs build, remove tests during src_install, drop virtualx dependency
-rw-r--r-- | dev-python/traits/Manifest | 1 | ||||
-rw-r--r-- | dev-python/traits/metadata.xml | 19 | ||||
-rw-r--r-- | dev-python/traits/traits-4.2.0.ebuild | 66 |
3 files changed, 86 insertions, 0 deletions
diff --git a/dev-python/traits/Manifest b/dev-python/traits/Manifest new file mode 100644 index 0000000..4ebe552 --- /dev/null +++ b/dev-python/traits/Manifest @@ -0,0 +1 @@ +DIST traits-4.2.0.tar.gz 4838020 SHA256 ca90fe98f0cf33db8fec0d696cfe624e690907a6f70b9ec42081e51dddd420f5 SHA512 5b93010363e737fe180c9fbb8fa8322a6f7be1ab5fe8ebcda12a0b4d2c5d4c64262d4372abf8cfb2622a6e8ff6f030cd62f806c86bb02420c87631b7c0733c07 WHIRLPOOL f0a485b0317913b67b570793c79db6b085287d400f034623d385a803bec23a557de322d186bf424c8ceab2cb7604fab87d5cef5cdb7a0e2a6e6735e19b941f36 diff --git a/dev-python/traits/metadata.xml b/dev-python/traits/metadata.xml new file mode 100644 index 0000000..490c40a --- /dev/null +++ b/dev-python/traits/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>python</herd> + <longdescription lang="en"> + The traits package from the Enthought Tool Suite provides a + metaclass with special attributes that are called traits. A trait + is a type definition that can be used for normal Python object + attributes, giving the attributes some additional characteristics: + * Initialization: A trait attribute can have a default value + * Validation: A trait attribute is manifestly typed. + * Delegation: The value of a trait attribute can be contained in another + object + * Notification: Setting the value of a trait attribute can fired + callbacks + * Visualization: With the TraitsUI package, GUIs can be generated + automatically from traited objects. + </longdescription> +</pkgmetadata> diff --git a/dev-python/traits/traits-4.2.0.ebuild b/dev-python/traits/traits-4.2.0.ebuild new file mode 100644 index 0000000..cb3f194 --- /dev/null +++ b/dev-python/traits/traits-4.2.0.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/traits/traits-4.1.0.ebuild,v 1.3 2012/06/01 13:02:22 ago Exp $ + +EAPI=4 + +PYTHON_DEPEND="2" +SUPPORT_PYTHON_ABIS="1" +RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*" +DISTUTILS_SRC_TEST="nosetests" + +inherit distutils + +DESCRIPTION="Enthought Tool Suite: Explicitly typed attributes for Python" +HOMEPAGE="http://code.enthought.com/projects/traits/ http://pypi.python.org/pypi/traits" +SRC_URI="http://www.enthought.com/repo/ets/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="doc examples test" + +RDEPEND="dev-python/numpy" +DEPEND="dev-python/setuptools + doc? ( dev-python/sphinx ) + test? ( dev-python/numpy )" + +DOCS="docs/*.txt" +PYTHON_CFLAGS=("2.* + -fno-strict-aliasing") + +src_prepare() { + sed -i -e "s/'-O3'//g" setup.py || die + find -name "*LICENSE*.txt" -delete +} + +src_compile() { + distutils_src_compile + if use doc ; then + pushd docs &> /dev/null + PYTHONPATH="$(ls -d ../build-$(PYTHON -f --ABI)/lib.*)" sphinx-build -b html -d build/doctrees source build/html + popd &> /dev/null + fi +} + +src_test() { + testing() { + nosetests -P -s $(ls -d build-${PYTHON_ABI}/lib*) -v + } + python_execute_function testing +} + +src_install() { + distutils_src_install + + delete_tests() { + rm -rf "${ED}$(python_get_sitedir)/${PN}/tests" + } + python_execute_function -q delete_tests + + use doc && dohtml -r docs/build/html/* + + if use examples; then + insinto /usr/share/doc/${PF} + doins -r examples + fi +} |