commit:     06d80c6d562769063138ba6438905d7021ea4393
Author:     Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de>
AuthorDate: Thu Sep  3 09:22:58 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Thu Sep  3 09:22:58 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=06d80c6d

dev-python/jupyter_core: Fix tests (issue #479)

Package-Manager: portage-2.2.20.1

 dev-python/jupyter_core/ChangeLog                  |  7 +++
 .../files/jupyter_core-4.0.4-add-test-files.patch  | 50 ++++++++++++++++++++++
 .../jupyter_core/jupyter_core-4.0.4-r1.ebuild      | 45 +++++++++++++++++++
 dev-python/jupyter_core/jupyter_core-4.0.4.ebuild  |  1 -
 4 files changed, 102 insertions(+), 1 deletion(-)

diff --git a/dev-python/jupyter_core/ChangeLog 
b/dev-python/jupyter_core/ChangeLog
index 22e24e8..37f0420 100644
--- a/dev-python/jupyter_core/ChangeLog
+++ b/dev-python/jupyter_core/ChangeLog
@@ -2,6 +2,13 @@
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
 # $Id$
 
+*jupyter_core-4.0.4-r1 (03 Sep 2015)
+
+  03 Sep 2015; Marius Brehler <mar...@linux.sungazer.de>
+  +files/jupyter_core-4.0.4-add-test-files.patch, 
+jupyter_core-4.0.4-r1.ebuild,
+  -jupyter_core-4.0.4.ebuild:
+  dev-python/jupyter_core: Fix tests (issue #479)
+
 *jupyter_core-4.0.4 (01 Sep 2015)
 
   01 Sep 2015; Marius Brehler <mar...@linux.sungazer.de>

diff --git 
a/dev-python/jupyter_core/files/jupyter_core-4.0.4-add-test-files.patch 
b/dev-python/jupyter_core/files/jupyter_core-4.0.4-add-test-files.patch
new file mode 100644
index 0000000..d7b448c
--- /dev/null
+++ b/dev-python/jupyter_core/files/jupyter_core-4.0.4-add-test-files.patch
@@ -0,0 +1,50 @@
+Patch to fix testing. Fixes
+https://github.com/gentoo-science/sci/issues/479
+
+Upstream issue:
+https://github.com/jupyter/jupyter_core/issues/50
+
+From 38b01f31f4793f4ccd427f0dee095bcb2a99b3c9 Mon Sep 17 00:00:00 2001
+From: Min RK <benjami...@gmail.com>
+Date: Tue, 1 Sep 2015 09:28:17 +0200
+Subject: [PATCH] add test files to package data
+
+---
+ setup.py | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/setup.py b/setup.py
+index 0653dbd..f155663 100644
+--- a/setup.py
++++ b/setup.py
+@@ -31,6 +31,19 @@ version_ns = {}
+ with open(pjoin(here, 'jupyter_core', 'version.py')) as f:
+     exec(f.read(), {}, version_ns)
+ 
++def find_package_data():
++    """Find package data (testing support files)"""
++    package_data = {}
++    package_data['jupyter_core.tests'] = test_files = []
++    test_dir = pjoin('jupyter_core', 'tests')
++    prefix_len = len(test_dir) + len(os.sep)
++    for parent, dirs, files in os.walk(test_dir):
++        if files:
++            test_files.append(pjoin(parent[prefix_len:], '*.*'))
++    
++    return package_data
++
++package_data = find_package_data()
+ 
+ setup_args = dict(
+     name                = 'jupyter_core',
+@@ -38,6 +51,7 @@ setup_args = dict(
+     packages            = ['jupyter_core',
+                            'jupyter_core.utils',
+                            'jupyter_core.tests'],
++    package_data        = package_data,
+     scripts             = glob(pjoin('scripts', '*')),
+     description         = "Jupyter core package. A base package on which 
Jupyter projects rely.",
+     long_description    = """There is no reason to install this package on 
its own.""",
+-- 
+2.4.6
+

diff --git a/dev-python/jupyter_core/jupyter_core-4.0.4-r1.ebuild 
b/dev-python/jupyter_core/jupyter_core-4.0.4-r1.ebuild
new file mode 100644
index 0000000..6ed3dbe
--- /dev/null
+++ b/dev-python/jupyter_core/jupyter_core-4.0.4-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 python{3_3,3_4} )
+
+inherit distutils-r1
+
+DESCRIPTION="Core common functionality of Jupyter projects"
+HOMEPAGE="http://jupyter.org";
+
+if [ ${PV} == "9999" ] ; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/jupyter/${PN}.git 
git://github.com/jupyter/${PN}.git"
+else
+       SRC_URI="
+       mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
+       
https://raw.githubusercontent.com/gentoo-science/sci/master/patches/${P}-tests-dotipython.patch";
+       KEYWORDS="~amd64"
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="test"
+
+RDEPEND="
+       dev-python/traitlets[${PYTHON_USEDEP}]
+       "
+DEPEND="${RDEPEND}
+       test? ( dev-python/pytest[${PYTHON_USEDEP}]
+                       dev-python/pytest-cov[${PYTHON_USEDEP}]
+                       dev-python/mock[${PYTHON_USEDEP}] )
+       "
+
+PATCHES=(
+       "${FILESDIR}"/${P}-add-test-files.patch
+       "${DISTDIR}"/${P}-tests-dotipython.patch
+)
+
+python_test() {
+       distutils_install_for_testing
+       cd "${TEST_DIR}"/lib || die
+       py.test jupyter_core || die
+}

diff --git a/dev-python/jupyter_core/jupyter_core-4.0.4.ebuild 
b/dev-python/jupyter_core/jupyter_core-4.0.4.ebuild
deleted file mode 120000
index 6577c42..0000000
--- a/dev-python/jupyter_core/jupyter_core-4.0.4.ebuild
+++ /dev/null
@@ -1 +0,0 @@
-jupyter_core-9999.ebuild
\ No newline at end of file

Reply via email to