1 |
commit: 9e85dc42f965dbbdd20348a18e94dc404db080ec |
2 |
Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com> |
3 |
AuthorDate: Wed Oct 28 23:25:48 2020 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 28 23:36:01 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e85dc42 |
7 |
|
8 |
dev-libs/libpy: New package |
9 |
|
10 |
Copyright: Sony Interactive Entertainment Inc. |
11 |
Package-Manager: Portage-3.0.8, Repoman-3.0.2 |
12 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
13 |
|
14 |
dev-libs/libpy/Manifest | 2 + |
15 |
dev-libs/libpy/files/libpy-0.2.5-no-werror.patch | 13 ++++++ |
16 |
dev-libs/libpy/files/libpy-0.2.5-permissions.patch | 13 ++++++ |
17 |
dev-libs/libpy/libpy-0.2.5.ebuild | 47 ++++++++++++++++++++++ |
18 |
dev-libs/libpy/metadata.xml | 11 +++++ |
19 |
5 files changed, 86 insertions(+) |
20 |
|
21 |
diff --git a/dev-libs/libpy/Manifest b/dev-libs/libpy/Manifest |
22 |
new file mode 100644 |
23 |
index 00000000000..cc03b2563fe |
24 |
--- /dev/null |
25 |
+++ b/dev-libs/libpy/Manifest |
26 |
@@ -0,0 +1,2 @@ |
27 |
+DIST gtest-23b2a3b1cf803999fb38175f6e9e038a4495c8a5.tar.gz 862253 BLAKE2B a7d7acd2a41924d37c06e4908315d80df92815ed3e81973baf915951f2fcfeb4485ce690ba224cd7168537d81bf43b84efbecef8074dd3246a020e0877924803 SHA512 f01af7e17a3b7fb064bb5b7f1f75f0eca5e987a9976555734a88b7f7a18a763c620668da0628cb6bd1553a69b248bb0b91569b99cf873789c5b27700c25a479a |
28 |
+DIST libpy-0.2.5.tar.gz 201467 BLAKE2B 629f650740a54736bc014abd63c729c11070d7d226469668386b6fe187a05b830b7ababa17e6c90777c97d2af5397cb1295712218626c837c1cc2c5526e957fc SHA512 8127bdeffdf218837928d6e5743156987cb5e3ca943ec3e84f1fb5d01c1c5fa387eca3b8c276d60d1eeb18fad7a9555bc54c113c976f1d5f23f779336dd6ed71 |
29 |
|
30 |
diff --git a/dev-libs/libpy/files/libpy-0.2.5-no-werror.patch b/dev-libs/libpy/files/libpy-0.2.5-no-werror.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..214d1764b18 |
33 |
--- /dev/null |
34 |
+++ b/dev-libs/libpy/files/libpy-0.2.5-no-werror.patch |
35 |
@@ -0,0 +1,13 @@ |
36 |
+diff --git a/Makefile b/Makefile |
37 |
+index 09e6e39..bed335b 100644 |
38 |
+--- a/Makefile |
39 |
++++ b/Makefile |
40 |
+@@ -31,7 +31,7 @@ endif |
41 |
+ OPTLEVEL ?= 3 |
42 |
+ MAX_ERRORS ?= 5 |
43 |
+ BASE_WARNINGS := \ |
44 |
+- -Werror -Wall -Wextra \ |
45 |
++ -Wall -Wextra \ |
46 |
+ -Wno-register \ |
47 |
+ -Wno-missing-field-initializers \ |
48 |
+ -Wsign-compare \ |
49 |
|
50 |
diff --git a/dev-libs/libpy/files/libpy-0.2.5-permissions.patch b/dev-libs/libpy/files/libpy-0.2.5-permissions.patch |
51 |
new file mode 100644 |
52 |
index 00000000000..8e5fc2762a9 |
53 |
--- /dev/null |
54 |
+++ b/dev-libs/libpy/files/libpy-0.2.5-permissions.patch |
55 |
@@ -0,0 +1,13 @@ |
56 |
+diff --git a/setup.py b/setup.py |
57 |
+index 61bc3da..a00b565 100644 |
58 |
+--- a/setup.py |
59 |
++++ b/setup.py |
60 |
+@@ -43,7 +43,7 @@ class build_py(_build_py): |
61 |
+ ) |
62 |
+ |
63 |
+ p = pathlib.Path(self.build_lib) / 'libpy/_build-and-run' |
64 |
+- p.chmod(p.stat().st_mode | stat.S_IEXEC) |
65 |
++ p.chmod(p.stat().st_mode | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH) |
66 |
+ |
67 |
+ |
68 |
+ setup( |
69 |
|
70 |
diff --git a/dev-libs/libpy/libpy-0.2.5.ebuild b/dev-libs/libpy/libpy-0.2.5.ebuild |
71 |
new file mode 100644 |
72 |
index 00000000000..567bbd05d59 |
73 |
--- /dev/null |
74 |
+++ b/dev-libs/libpy/libpy-0.2.5.ebuild |
75 |
@@ -0,0 +1,47 @@ |
76 |
+# Copyright 2020 Gentoo Authors |
77 |
+# Distributed under the terms of the GNU General Public License v2 |
78 |
+ |
79 |
+EAPI=7 |
80 |
+ |
81 |
+PYTHON_COMPAT=( python3_{6..9} ) |
82 |
+ |
83 |
+inherit distutils-r1 |
84 |
+ |
85 |
+GTEST_VER="23b2a3b1cf803999fb38175f6e9e038a4495c8a5" |
86 |
+ |
87 |
+DESCRIPTION="Utilities for writing C++ extension modules" |
88 |
+HOMEPAGE="https://quantopian.github.io/libpy/ |
89 |
+ https://github.com/quantopian/libpy" |
90 |
+SRC_URI=" |
91 |
+ https://github.com/quantopian/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz |
92 |
+ test? ( https://github.com/google/googletest/archive/${GTEST_VER}.tar.gz -> gtest-${GTEST_VER}.tar.gz ) |
93 |
+" |
94 |
+ |
95 |
+LICENSE="Apache-2.0" |
96 |
+SLOT="0" |
97 |
+KEYWORDS="~amd64 ~x86" |
98 |
+IUSE="sparsehash test" |
99 |
+ |
100 |
+COMMON_DEPEND=" |
101 |
+ >=dev-python/numpy-1.11.3[${PYTHON_USEDEP}] |
102 |
+" |
103 |
+RDEPEND="${COMMON_DEPEND}" |
104 |
+BDEPEND="${COMMON_DEPEND} |
105 |
+ sparsehash? ( dev-cpp/sparsehash ) |
106 |
+ test? ( |
107 |
+ dev-cpp/gtest |
108 |
+ >=dev-python/pytest-4.4.1[${PYTHON_USEDEP}] |
109 |
+ ) |
110 |
+" |
111 |
+ |
112 |
+RESTRICT="!test? ( test )" |
113 |
+REQUIRES_USE="test? ( sparsehash )" |
114 |
+ |
115 |
+PATCHES=( |
116 |
+ "${FILESDIR}/libpy-0.2.5-no-werror.patch" |
117 |
+ "${FILESDIR}/libpy-0.2.5-permissions.patch" |
118 |
+) |
119 |
+ |
120 |
+python_test() { |
121 |
+ emake GTEST_ROOT="${WORKDIR}/googletest-${GTEST_VER}" test || die "Tests failed with ${EPYTHON}" |
122 |
+} |
123 |
|
124 |
diff --git a/dev-libs/libpy/metadata.xml b/dev-libs/libpy/metadata.xml |
125 |
new file mode 100644 |
126 |
index 00000000000..aa65be8a596 |
127 |
--- /dev/null |
128 |
+++ b/dev-libs/libpy/metadata.xml |
129 |
@@ -0,0 +1,11 @@ |
130 |
+<?xml version="1.0" encoding="UTF-8"?> |
131 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
132 |
+<pkgmetadata> |
133 |
+ <maintainer type="person"> |
134 |
+ <email>chutzpah@g.o</email> |
135 |
+ <name>Patrick McLean</name> |
136 |
+ </maintainer> |
137 |
+ <use> |
138 |
+ <flag name="sparsehash">Include libpy wrappers for <pkg>dev-cpp/sparsehash</pkg></flag> |
139 |
+ </use> |
140 |
+</pkgmetadata> |