1 |
commit: 1fb45205d6631eacbab9163a0b0fd5c86cdc1509 |
2 |
Author: Marius Brehler <marbre <AT> linux <DOT> sungazer <DOT> de> |
3 |
AuthorDate: Fri Nov 27 15:36:07 2015 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 27 15:36:07 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fb45205 |
7 |
|
8 |
dev-python/testpath: Import from science overlay |
9 |
|
10 |
Package-Manager: portage-2.2.20.1 |
11 |
|
12 |
dev-python/testpath/Manifest | 1 + |
13 |
.../testpath/files/testpath-0.2-setup.py.patch | 28 +++++++++++ |
14 |
dev-python/testpath/metadata.xml | 14 ++++++ |
15 |
dev-python/testpath/testpath-0.2.ebuild | 55 ++++++++++++++++++++++ |
16 |
4 files changed, 98 insertions(+) |
17 |
|
18 |
diff --git a/dev-python/testpath/Manifest b/dev-python/testpath/Manifest |
19 |
new file mode 100644 |
20 |
index 0000000..665ec38 |
21 |
--- /dev/null |
22 |
+++ b/dev-python/testpath/Manifest |
23 |
@@ -0,0 +1 @@ |
24 |
+DIST testpath-0.2.tar.gz 13732 SHA256 a5388cc7c8370b1f11298c1d513b3d2b9e2f390607a7c39963e6e3ba9f1b7012 SHA512 cc211bdc8f31ff4c286324e37bbce7fd84e19447d9735f396ce67f7568dd1d133be732c1fd7a08928c94566279d0f293a0caeed6a58ae6cd3dc293035fe164ea WHIRLPOOL 6b87b1c5ba590e6b19968e823dee22d7bbe0411124c1290593eb5efd78b5af06c51853d3359f339c4ca60b2842c409a1fcd0ff45c59f2e7e07f557534d78fcaa |
25 |
|
26 |
diff --git a/dev-python/testpath/files/testpath-0.2-setup.py.patch b/dev-python/testpath/files/testpath-0.2-setup.py.patch |
27 |
new file mode 100644 |
28 |
index 0000000..065e8e5 |
29 |
--- /dev/null |
30 |
+++ b/dev-python/testpath/files/testpath-0.2-setup.py.patch |
31 |
@@ -0,0 +1,28 @@ |
32 |
+Patch to bring back setup.py from |
33 |
+https://github.com/jupyter/testpath/blob/086bd1bd1ec7da1b3dacfed1705c0c99fae231b3/setup.py |
34 |
+--- /dev/null |
35 |
++++ setup.py |
36 |
+@@ -0,0 +1,22 @@ |
37 |
++from distutils.core import setup |
38 |
++ |
39 |
++with open("README.rst", "r") as f: |
40 |
++ readme = f.read() |
41 |
++ |
42 |
++setup(name='testpath', |
43 |
++ version='0.1', |
44 |
++ description='Test utilities for code working with files and commands', |
45 |
++ long_description = readme, |
46 |
++ author='Thomas Kluyver', |
47 |
++ author_email='thomas@××××××××××.uk', |
48 |
++ url='https://github.com/takluyver/testpath', |
49 |
++ packages=['testpath'], |
50 |
++ classifiers=[ |
51 |
++ 'Intended Audience :: Developers', |
52 |
++ 'License :: OSI Approved :: MIT License', |
53 |
++ 'Programming Language :: Python', |
54 |
++ 'Programming Language :: Python :: 2', |
55 |
++ 'Programming Language :: Python :: 3', |
56 |
++ 'Topic :: Software Development :: Testing', |
57 |
++ ] |
58 |
++) |
59 |
+\ No newline at end of file |
60 |
|
61 |
diff --git a/dev-python/testpath/metadata.xml b/dev-python/testpath/metadata.xml |
62 |
new file mode 100644 |
63 |
index 0000000..4db1c84 |
64 |
--- /dev/null |
65 |
+++ b/dev-python/testpath/metadata.xml |
66 |
@@ -0,0 +1,14 @@ |
67 |
+<?xml version="1.0" encoding="UTF-8"?> |
68 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
69 |
+<pkgmetadata> |
70 |
+ <herd>sci</herd> |
71 |
+ <longdescription> |
72 |
+ Testpath is a collection of utilities for Python code working with |
73 |
+ files and commands. It contains functions to check things on the |
74 |
+ filesystem, and tools for mocking system commands and recording |
75 |
+ calls to those. |
76 |
+ </longdescription> |
77 |
+ <upstream> |
78 |
+ <remote-id type="github">jupyter/testpath</remote-id> |
79 |
+ </upstream> |
80 |
+</pkgmetadata> |
81 |
|
82 |
diff --git a/dev-python/testpath/testpath-0.2.ebuild b/dev-python/testpath/testpath-0.2.ebuild |
83 |
new file mode 100644 |
84 |
index 0000000..a3ee765 |
85 |
--- /dev/null |
86 |
+++ b/dev-python/testpath/testpath-0.2.ebuild |
87 |
@@ -0,0 +1,55 @@ |
88 |
+# Copyright 1999-2015 Gentoo Foundation |
89 |
+# Distributed under the terms of the GNU General Public License v2 |
90 |
+# $Id$ |
91 |
+ |
92 |
+EAPI=5 |
93 |
+ |
94 |
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} ) |
95 |
+ |
96 |
+inherit distutils-r1 |
97 |
+ |
98 |
+DESCRIPTION="Test utilities for code working with files and commands" |
99 |
+HOMEPAGE="http://jupyter.org" |
100 |
+SRC_URI="https://github.com/jupyter/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
101 |
+KEYWORDS="~amd64 ~x86" |
102 |
+ |
103 |
+LICENSE="BSD" |
104 |
+SLOT="0" |
105 |
+IUSE="doc test" |
106 |
+ |
107 |
+DEPEND=" |
108 |
+ test? ( |
109 |
+ dev-python/pytest[${PYTHON_USEDEP}] |
110 |
+ virtual/python-pathlib[${PYTHON_USEDEP}] |
111 |
+ ) |
112 |
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) |
113 |
+ " |
114 |
+ |
115 |
+PATCHES=( |
116 |
+ "${FILESDIR}/${P}"-setup.py.patch |
117 |
+ ) |
118 |
+ |
119 |
+python_prepare_all() { |
120 |
+ # Prevent un-needed download during build |
121 |
+ if use doc; then |
122 |
+ sed -e "/^ 'sphinx.ext.intersphinx',/d" -i doc/conf.py || die |
123 |
+ fi |
124 |
+ |
125 |
+distutils-r1_python_prepare_all |
126 |
+} |
127 |
+ |
128 |
+python_compile_all() { |
129 |
+ use doc && emake -C doc html |
130 |
+} |
131 |
+ |
132 |
+python_install_all() { |
133 |
+ use doc && HTML_DOCS=( doc/_build/html/. ) |
134 |
+ distutils-r1_python_install_all |
135 |
+ } |
136 |
+ |
137 |
+python_test() { |
138 |
+ distutils_install_for_testing |
139 |
+ cd "${TEST_DIR}"/lib || die |
140 |
+ cp -r "${S}"/tests "${TEST_DIR}"/lib/ || die |
141 |
+ py.test || die |
142 |
+} |