public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libpy/files/, dev-libs/libpy/
@ 2020-10-28 23:36 Patrick McLean
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick McLean @ 2020-10-28 23:36 UTC (permalink / raw
  To: gentoo-commits

commit:     9e85dc42f965dbbdd20348a18e94dc404db080ec
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Wed Oct 28 23:25:48 2020 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Oct 28 23:36:01 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e85dc42

dev-libs/libpy: New package

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-libs/libpy/Manifest                            |  2 +
 dev-libs/libpy/files/libpy-0.2.5-no-werror.patch   | 13 ++++++
 dev-libs/libpy/files/libpy-0.2.5-permissions.patch | 13 ++++++
 dev-libs/libpy/libpy-0.2.5.ebuild                  | 47 ++++++++++++++++++++++
 dev-libs/libpy/metadata.xml                        | 11 +++++
 5 files changed, 86 insertions(+)

diff --git a/dev-libs/libpy/Manifest b/dev-libs/libpy/Manifest
new file mode 100644
index 00000000000..cc03b2563fe
--- /dev/null
+++ b/dev-libs/libpy/Manifest
@@ -0,0 +1,2 @@
+DIST gtest-23b2a3b1cf803999fb38175f6e9e038a4495c8a5.tar.gz 862253 BLAKE2B a7d7acd2a41924d37c06e4908315d80df92815ed3e81973baf915951f2fcfeb4485ce690ba224cd7168537d81bf43b84efbecef8074dd3246a020e0877924803 SHA512 f01af7e17a3b7fb064bb5b7f1f75f0eca5e987a9976555734a88b7f7a18a763c620668da0628cb6bd1553a69b248bb0b91569b99cf873789c5b27700c25a479a
+DIST libpy-0.2.5.tar.gz 201467 BLAKE2B 629f650740a54736bc014abd63c729c11070d7d226469668386b6fe187a05b830b7ababa17e6c90777c97d2af5397cb1295712218626c837c1cc2c5526e957fc SHA512 8127bdeffdf218837928d6e5743156987cb5e3ca943ec3e84f1fb5d01c1c5fa387eca3b8c276d60d1eeb18fad7a9555bc54c113c976f1d5f23f779336dd6ed71

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
new file mode 100644
index 00000000000..214d1764b18
--- /dev/null
+++ b/dev-libs/libpy/files/libpy-0.2.5-no-werror.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 09e6e39..bed335b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -31,7 +31,7 @@ endif
+ OPTLEVEL ?= 3
+ MAX_ERRORS ?= 5
+ BASE_WARNINGS := \
+-	-Werror -Wall -Wextra \
++	-Wall -Wextra \
+ 	-Wno-register \
+ 	-Wno-missing-field-initializers \
+ 	-Wsign-compare \

diff --git a/dev-libs/libpy/files/libpy-0.2.5-permissions.patch b/dev-libs/libpy/files/libpy-0.2.5-permissions.patch
new file mode 100644
index 00000000000..8e5fc2762a9
--- /dev/null
+++ b/dev-libs/libpy/files/libpy-0.2.5-permissions.patch
@@ -0,0 +1,13 @@
+diff --git a/setup.py b/setup.py
+index 61bc3da..a00b565 100644
+--- a/setup.py
++++ b/setup.py
+@@ -43,7 +43,7 @@ class build_py(_build_py):
+         )
+ 
+         p = pathlib.Path(self.build_lib) / 'libpy/_build-and-run'
+-        p.chmod(p.stat().st_mode | stat.S_IEXEC)
++        p.chmod(p.stat().st_mode | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH)
+ 
+ 
+ setup(

diff --git a/dev-libs/libpy/libpy-0.2.5.ebuild b/dev-libs/libpy/libpy-0.2.5.ebuild
new file mode 100644
index 00000000000..567bbd05d59
--- /dev/null
+++ b/dev-libs/libpy/libpy-0.2.5.ebuild
@@ -0,0 +1,47 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+
+inherit distutils-r1
+
+GTEST_VER="23b2a3b1cf803999fb38175f6e9e038a4495c8a5"
+
+DESCRIPTION="Utilities for writing C++ extension modules"
+HOMEPAGE="https://quantopian.github.io/libpy/
+	https://github.com/quantopian/libpy"
+SRC_URI="
+	https://github.com/quantopian/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
+	test? ( https://github.com/google/googletest/archive/${GTEST_VER}.tar.gz -> gtest-${GTEST_VER}.tar.gz )
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="sparsehash test"
+
+COMMON_DEPEND="
+	>=dev-python/numpy-1.11.3[${PYTHON_USEDEP}]
+"
+RDEPEND="${COMMON_DEPEND}"
+BDEPEND="${COMMON_DEPEND}
+	sparsehash? ( dev-cpp/sparsehash )
+	test? (
+		dev-cpp/gtest
+		>=dev-python/pytest-4.4.1[${PYTHON_USEDEP}]
+	)
+"
+
+RESTRICT="!test? ( test )"
+REQUIRES_USE="test? ( sparsehash )"
+
+PATCHES=(
+	"${FILESDIR}/libpy-0.2.5-no-werror.patch"
+	"${FILESDIR}/libpy-0.2.5-permissions.patch"
+)
+
+python_test() {
+	emake GTEST_ROOT="${WORKDIR}/googletest-${GTEST_VER}" test || die "Tests failed with ${EPYTHON}"
+}

diff --git a/dev-libs/libpy/metadata.xml b/dev-libs/libpy/metadata.xml
new file mode 100644
index 00000000000..aa65be8a596
--- /dev/null
+++ b/dev-libs/libpy/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>chutzpah@gentoo.org</email>
+		<name>Patrick McLean</name>
+	</maintainer>
+	<use>
+		<flag name="sparsehash">Include libpy wrappers for <pkg>dev-cpp/sparsehash</pkg></flag>
+	</use>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libpy/files/, dev-libs/libpy/
@ 2020-10-29 16:57 Patrick McLean
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick McLean @ 2020-10-29 16:57 UTC (permalink / raw
  To: gentoo-commits

commit:     5c0ee68d09f9f5845220c12d764b38cd352ad8ea
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Thu Oct 29 16:56:23 2020 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Thu Oct 29 16:57:21 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c0ee68d

dev-libs/libpy-0.2.5-r1: Fix CFLAGS (bug #751658), typo (bug #751655)

Closes: https://bugs.gentoo.org/751658
Closes: https://bugs.gentoo.org/751655
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-libs/libpy/files/libpy-0.2.5-cflags.patch      | 24 ++++++++++++++++++++++
 .../{libpy-0.2.5.ebuild => libpy-0.2.5-r1.ebuild}  |  9 ++++++--
 2 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/dev-libs/libpy/files/libpy-0.2.5-cflags.patch b/dev-libs/libpy/files/libpy-0.2.5-cflags.patch
new file mode 100644
index 00000000000..be8dd1f2172
--- /dev/null
+++ b/dev-libs/libpy/files/libpy-0.2.5-cflags.patch
@@ -0,0 +1,24 @@
+diff --git a/Makefile b/Makefile
+index 09e6e39..9addb5d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -46,9 +46,8 @@ CLANG_WARNINGS := \
+ 	-Wno-self-assign-overloaded
+ WARNINGS := $(BASE_WARNINGS) $($(COMPILER)_WARNINGS)
+ 
+-BASE_CXXFLAGS = -std=gnu++17 -g -O$(OPTLEVEL) \
++BASE_CXXFLAGS = -std=gnu++17 -g \
+ 	-fwrapv -fno-strict-aliasing -pipe \
+-	-march=x86-64 -mtune=generic \
+ 	-fvisibility=hidden \
+ 	$(WARNINGS) \
+ 	-DPY_MAJOR_VERSION=$(PY_MAJOR_VERSION) \
+@@ -58,7 +57,7 @@ BASE_CXXFLAGS = -std=gnu++17 -g -O$(OPTLEVEL) \
+ 	-DLIBPY_MICRO_VERSION=$(MICRO_VERSION)
+ GCC_FLAGS = -fmax-errors=$(MAX_ERRORS)
+ CLANG_FLAGS = -ferror-limit=$(MAX_ERRORS)
+-CXXFLAGS = $(BASE_CXXFLAGS) $($(COMPILER)_FLAGS)
++CXXFLAGS += $(BASE_CXXFLAGS) $($(COMPILER)_FLAGS)
+ 
+ # https://github.com/quantopian/libpy/pull/86/files#r309288697
+ INCLUDE_DIRS := include/ \

diff --git a/dev-libs/libpy/libpy-0.2.5.ebuild b/dev-libs/libpy/libpy-0.2.5-r1.ebuild
similarity index 87%
rename from dev-libs/libpy/libpy-0.2.5.ebuild
rename to dev-libs/libpy/libpy-0.2.5-r1.ebuild
index 567bbd05d59..a0d5be7d1dc 100644
--- a/dev-libs/libpy/libpy-0.2.5.ebuild
+++ b/dev-libs/libpy/libpy-0.2.5-r1.ebuild
@@ -5,7 +5,7 @@ EAPI=7
 
 PYTHON_COMPAT=( python3_{6..9} )
 
-inherit distutils-r1
+inherit flag-o-matic distutils-r1
 
 GTEST_VER="23b2a3b1cf803999fb38175f6e9e038a4495c8a5"
 
@@ -35,13 +35,18 @@ BDEPEND="${COMMON_DEPEND}
 "
 
 RESTRICT="!test? ( test )"
-REQUIRES_USE="test? ( sparsehash )"
+REQUIRED_USE="test? ( sparsehash )"
 
 PATCHES=(
 	"${FILESDIR}/libpy-0.2.5-no-werror.patch"
 	"${FILESDIR}/libpy-0.2.5-permissions.patch"
+	"${FILESDIR}/libpy-0.2.5-cflags.patch"
 )
 
 python_test() {
 	emake GTEST_ROOT="${WORKDIR}/googletest-${GTEST_VER}" test || die "Tests failed with ${EPYTHON}"
 }
+
+python_configure() {
+	replace-flags '-O*' '-O3'
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/libpy/files/, dev-libs/libpy/
@ 2023-05-03 18:16 Patrick McLean
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick McLean @ 2023-05-03 18:16 UTC (permalink / raw
  To: gentoo-commits

commit:     ebd33ef3a91a715a6ad1dffd87b0b17ca23640ad
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Wed May  3 18:15:31 2023 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed May  3 18:16:23 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ebd33ef3

dev-libs/libpy: Add py311, eapi8

Disable tests for now since they fail to build with a C++ error that I don't
know how to fix.

Closes: https://bugs.gentoo.org/894744
Closes: https://bugs.gentoo.org/896720
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-libs/libpy/files/libpy-0.2.5-setuptools.patch     | 11 +++++++++++
 dev-libs/libpy/files/libpy-0.2.5-stdint.patch         | 11 +++++++++++
 .../{libpy-0.2.5-r1.ebuild => libpy-0.2.5-r2.ebuild}  | 19 ++++++++++++++-----
 3 files changed, 36 insertions(+), 5 deletions(-)

diff --git a/dev-libs/libpy/files/libpy-0.2.5-setuptools.patch b/dev-libs/libpy/files/libpy-0.2.5-setuptools.patch
new file mode 100644
index 000000000000..0f5adc5e9c98
--- /dev/null
+++ b/dev-libs/libpy/files/libpy-0.2.5-setuptools.patch
@@ -0,0 +1,11 @@
+diff --git a/setup.py b/setup.py
+index 61bc3da..39c2ea5 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,5 +1,5 @@
+ import ast
+-from distutils.command.build_py import build_py as _build_py
++from setuptools.command.build_py import build_py as _build_py
+ import os
+ import pathlib
+ import shutil

diff --git a/dev-libs/libpy/files/libpy-0.2.5-stdint.patch b/dev-libs/libpy/files/libpy-0.2.5-stdint.patch
new file mode 100644
index 000000000000..d641ea4da1f4
--- /dev/null
+++ b/dev-libs/libpy/files/libpy-0.2.5-stdint.patch
@@ -0,0 +1,11 @@
+diff --git a/include/libpy/util.h b/include/libpy/util.h
+index 3e0c72d..8669483 100644
+--- a/include/libpy/util.h
++++ b/include/libpy/util.h
+@@ -1,5 +1,6 @@
+ #pragma once
+ 
++#include <cstdint>
+ #include <algorithm>
+ #include <sstream>
+ #include <stdexcept>

diff --git a/dev-libs/libpy/libpy-0.2.5-r1.ebuild b/dev-libs/libpy/libpy-0.2.5-r2.ebuild
similarity index 79%
rename from dev-libs/libpy/libpy-0.2.5-r1.ebuild
rename to dev-libs/libpy/libpy-0.2.5-r2.ebuild
index f17fd083c69e..e11055754550 100644
--- a/dev-libs/libpy/libpy-0.2.5-r1.ebuild
+++ b/dev-libs/libpy/libpy-0.2.5-r2.ebuild
@@ -1,10 +1,11 @@
 # Copyright 2021-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..10} )
+EAPI=8
 
+PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
 inherit flag-o-matic distutils-r1
 
 GTEST_VER="23b2a3b1cf803999fb38175f6e9e038a4495c8a5"
@@ -25,8 +26,11 @@ IUSE="sparsehash test"
 COMMON_DEPEND="
 	>=dev-python/numpy-1.11.3[${PYTHON_USEDEP}]
 "
-RDEPEND="${COMMON_DEPEND}"
-BDEPEND="${COMMON_DEPEND}
+RDEPEND="
+	${COMMON_DEPEND}
+"
+BDEPEND="
+	${COMMON_DEPEND}
 	sparsehash? ( dev-cpp/sparsehash )
 	test? (
 		dev-cpp/gtest
@@ -37,10 +41,15 @@ BDEPEND="${COMMON_DEPEND}
 RESTRICT="!test? ( test )"
 REQUIRED_USE="test? ( sparsehash )"
 
+# my C++ isn't good enough to fix the tests
+RESTRICT+=" test"
+
 PATCHES=(
 	"${FILESDIR}/libpy-0.2.5-no-werror.patch"
 	"${FILESDIR}/libpy-0.2.5-permissions.patch"
 	"${FILESDIR}/libpy-0.2.5-cflags.patch"
+	"${FILESDIR}/libpy-0.2.5-stdint.patch"
+	"${FILESDIR}/libpy-0.2.5-setuptools.patch"
 )
 
 python_test() {


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-03 18:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-28 23:36 [gentoo-commits] repo/gentoo:master commit in: dev-libs/libpy/files/, dev-libs/libpy/ Patrick McLean
  -- strict thread matches above, loose matches on Subject: below --
2020-10-29 16:57 Patrick McLean
2023-05-03 18:16 Patrick McLean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox