dev-python/yappi-1.2.5: Version bump
authorPatrick McLean <patrick.mclean@sony.com>
Wed, 29 Apr 2020 01:13:48 +0000 (18:13 -0700)
committerPatrick McLean <chutzpah@gentoo.org>
Wed, 29 Apr 2020 01:13:48 +0000 (18:13 -0700)
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
dev-python/yappi/Manifest
dev-python/yappi/files/yappi-1.2.5-warnings.patch [new file with mode: 0644]
dev-python/yappi/metadata.xml
dev-python/yappi/yappi-1.2.5.ebuild [new file with mode: 0644]

index 0454a3f54a20fbec7ac813275b6535d31dd68d0d..907cc6b2d7c0a4f734a66109a4beb54e02a3d881 100644 (file)
@@ -1 +1,2 @@
 DIST yappi-1.0.tar.gz 38939 BLAKE2B b07b38bc07ffb6ba7aea3728ba6977680ca7f2dcc499778110aa31e733c512e5704cd580d01faf3344849df6772f110472a01328447228e9c45180beefc36f3e SHA512 d743c471ee3797b9f3b24c831fcb4ddf2cec7c13c56e567c0618eeada9a534ca0b114929da623a2c67142c61f3c38b024b25ba5e32883113148f4377f7574905
+DIST yappi-1.2.5.tar.gz 928100 BLAKE2B 1d303226821d53fb215ac29f8363d9f564f9f40096b5ba8f67475c4074012316f523afb6d770cff879038cd333ef7f050b29c015e2dd2e517859f66a0e1f36f3 SHA512 ec784e76b56e8bc0c3cfe07c90d0810fa90d5a7da62f36187e8a09a9d6e01f3c2d74320de3dd3f4bf1d4a9425fee319c7a575a9d35ad5412c1501c934f1ba353
diff --git a/dev-python/yappi/files/yappi-1.2.5-warnings.patch b/dev-python/yappi/files/yappi-1.2.5-warnings.patch
new file mode 100644 (file)
index 0000000..1594c33
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/setup.py b/setup.py
+index cd9a549..440043c 100644
+--- a/setup.py
++++ b/setup.py
+@@ -23,7 +23,7 @@ link_args = []
+ if os.name == 'posix' and sys.platform != 'darwin':
+     compiler = new_compiler()
+-    if compiler.has_function('timer_create', libraries=('rt', )):
++    if compiler.has_function('timer_create', libraries=('rt', ), includes=["signal.h", "time.h"]):
+         user_macros.append(('LIB_RT_AVAILABLE', '1'))
+         user_libraries.append('rt')
+ if _DEBUG:
index fc71beddc90360e6a999b4da241743d45c03c104..5f26dbbd302707103c58a91ff4af86d034a75fb5 100644 (file)
@@ -11,6 +11,6 @@
   </maintainer>
   <upstream>
     <remote-id type="pypi">yappi</remote-id>
-    <remote-id type="bitbucket">sumerc/yappi</remote-id>
+    <remote-id type="github">sumerc/yappi</remote-id>
   </upstream>
 </pkgmetadata>
diff --git a/dev-python/yappi/yappi-1.2.5.ebuild b/dev-python/yappi/yappi-1.2.5.ebuild
new file mode 100644 (file)
index 0000000..1fc7ac7
--- /dev/null
@@ -0,0 +1,38 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=(python3_{6,7,8})
+DISTUTILS_USE_SETUPTOOLS=rdepend
+inherit distutils-r1
+
+# no tags on github, no tests on pypi
+COMMIT_HASH="b6c7d9f0bb40b511f61bb82cc395ad9140a4f4b0"
+
+DESCRIPTION="Yet Another Python Profiler"
+HOMEPAGE="https://pypi.org/project/yappi/ https://github.com/sumerc/yappi"
+SRC_URI="https://github.com/sumerc/yappi/archive/${COMMIT_HASH}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${COMMIT_HASH}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+       dev-python/contextvars[${PYTHON_USEDEP}]
+"
+
+PATCHES=(
+       "${FILESDIR}/yappi-1.2.5-warnings.patch"
+)
+
+python_prepare_all() {
+       cp tests/utils.py "${S}" || die
+       distutils-r1_python_prepare_all
+}
+
+python_test() {
+       distutils_install_for_testing
+       PATH="${TEST_DIR}/scripts:${PATH}" \
+               "${EPYTHON}" run_tests.py || die "tests fail with ${EPYTHON}"
+}