dev-python/nose_warnings_filters: New package

* Needed as test dependency of dev-python/ipykernel

Package-Manager: portage-2.3.0
This commit is contained in:
David Seifert
2016-09-05 20:00:27 +02:00
parent 9807fcdf69
commit cc5aa83912
3 changed files with 61 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST nose_warnings_filters-0.1.0.tar.gz 3551 SHA256 198f1fb8d69583e555d565a544fb6817366d8493a783bbba6121a7c0adb8a7bb SHA512 6715d3a84fdaa712dfb10e4f48f874900e979dc58cbc8fdb4728a1589c9f0bec42b831e4896fb935b2ed4b2bde49e08210922ac3cda8fc0f18683b992f1b3dad WHIRLPOOL 1b1b65811e788eb27f67b2c7bbe8ee02a74dd53df8daa1af0d191cfdff8e9504d0885ede89657952d24b37a54bc193218ffa823071677e097040b0e7b32ac6cb

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
</pkgmetadata>

View File

@@ -0,0 +1,52 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
inherit python-r1
DESCRIPTION="A python module to inject warning filters during nosetest"
HOMEPAGE="https://github.com/Carreau/nose_warnings_filters"
SRC_URI="https://github.com/Carreau/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
DEPEND="${PYTHON_DEPS}
dev-python/nose[${PYTHON_USEDEP}]"
RDEPEND="${DEPEND}"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
src_test() {
# nose_warnings_filters doesn't have a proper
# testing suite, hence we run the only testing
# script available
export PYTHONPATH="${S}:${S}/${PN}/tests"
touch "${S}/${PN}/tests/__init__.py" || die
run_test() {
"${PYTHON}" "${PN}"/tests/test_config.py \
|| die "Failed running test script"
}
python_foreach_impl run_test
unset PYTHONPATH
}
src_install() {
python_moduleinto "${PN}"
install_files() {
python_domodule "${PN}/__init__.py"
# Unfortunately, nose_warnings_filters is designed
# as a wheel package, for which a METADATA file is
# strictly required, otherwise a Runtime error is thrown
local egg_dir="${D%/}$(python_get_sitedir)/${PN}-${PV}.dist-info"
mkdir -p "${egg_dir}" || die
cp entry_points.txt "${egg_dir}" || die
touch "${egg_dir}"/METADATA || die
}
python_foreach_impl install_files
}