commit:     6be2c5ff75fb15eca5cb723efa5badd457046477
Author:     Haelwenn (lanodan) Monnier <contact <AT> hacktivis <DOT> me>
AuthorDate: Wed Mar 20 13:13:54 2024 +0000
Commit:     Haelwenn Monnier <contact <AT> hacktivis <DOT> me>
CommitDate: Wed Mar 20 19:39:11 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6be2c5ff

dev-util/prysk: new package, add 0.18.0

Signed-off-by: Haelwenn (lanodan) Monnier <contact <AT> hacktivis.me>

 dev-util/prysk/Manifest                            |  1 +
 .../prysk-0.18.0-fix-stray-site-packages.patch     | 52 ++++++++++++++++++++++
 dev-util/prysk/metadata.xml                        | 19 ++++++++
 dev-util/prysk/prysk-0.18.0.ebuild                 | 36 +++++++++++++++
 4 files changed, 108 insertions(+)

diff --git a/dev-util/prysk/Manifest b/dev-util/prysk/Manifest
new file mode 100644
index 0000000000..65636bf99b
--- /dev/null
+++ b/dev-util/prysk/Manifest
@@ -0,0 +1 @@
+DIST prysk-0.18.0.gh.tar.gz 78512 BLAKE2B 
0fa715ebdf8202e689abf08029dd0f73863ad6bcc37a156b65e486722351404d1f17b09d4c1661980161292590a69ca0dcf37533088a63489585cd19ffaab074
 SHA512 
2e1c82dcfc3f85dbed2572d1e238a93f1932c9dbf7c79d65189a1584dc6265652f60d8c060a75363ecbd660318874cf01875eff78d387c5be8f29c6599fc8d69

diff --git a/dev-util/prysk/files/prysk-0.18.0-fix-stray-site-packages.patch 
b/dev-util/prysk/files/prysk-0.18.0-fix-stray-site-packages.patch
new file mode 100644
index 0000000000..f1ffa0c63d
--- /dev/null
+++ b/dev-util/prysk/files/prysk-0.18.0-fix-stray-site-packages.patch
@@ -0,0 +1,52 @@
+From d7728b04f59b5e9df52f5df1c6f51fbce4dd0977 Mon Sep 17 00:00:00 2001
+From: "Haelwenn (lanodan) Monnier" <[email protected]>
+Date: Thu, 15 Feb 2024 09:50:41 +0100
+Part-of: https://github.com/prysk/prysk/pull/239
+Subject: [PATCH] pyproject.toml: Only include in sdist
+
+https://projects.gentoo.org/python/guide/qawarn.html#stray-top-level-files-in-site-packages
+
+For example, this is bogus and would mean project overwriting each others:
+  /usr/lib/python3.11/site-packages/pyproject.toml
+  /usr/lib/python3.11/site-packages/poetry.lock
+  /usr/lib/python3.11/site-packages/README.rst
+  /usr/lib/python3.11/site-packages/COPYING.txt
+  /usr/lib/python3.11/site-packages/examples
+---
+ pyproject.toml | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index 6683ab5..3d65573 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -40,16 +40,16 @@ keywords = [
+ repository = "https://github.com/Nicoretti/prysk";
+ homepage = "https://www.prysk.net/";
+ include = [
+-    ".coveragerc",
+-    "noxfile.py",
+-    "poetry.lock",
+-    "*.rst",
+-    "*.txt",
+-    "*.toml",
+-    "docs/*",
+-    "contrib/*",
+-    "scripts/*",
+-    "examples/*",
++    { path = ".coveragerc", format = "sdist" },
++    { path = "noxfile.py", format = "sdist" },
++    { path = "poetry.lock", format = "sdist" },
++    { path = "*.rst", format = "sdist" },
++    { path = "*.txt", format = "sdist" },
++    { path = "*.toml", format = "sdist" },
++    { path = "docs/*", format = "sdist" },
++    { path = "contrib/*", format = "sdist" },
++    { path = "scripts/*", format = "sdist" },
++    { path = "examples/*", format = "sdist" },
+ ]
+ exclude = [
+     "contrib/PKGBUILD",
+-- 
+2.43.0
+

diff --git a/dev-util/prysk/metadata.xml b/dev-util/prysk/metadata.xml
new file mode 100644
index 0000000000..d9ca562941
--- /dev/null
+++ b/dev-util/prysk/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Haelwenn (lanodan) Monnier</name>
+       </maintainer>
+       <stabilize-allarches/>
+       <longdescription lang="en">
+               Prysk is a fork of the popular snapshot testing tool Cram.
+               Prysk tests look like snippets of interactive shell sessions. 
Prysk
+               runs each command and compares the command output in the test 
with
+               the command's actual output.
+       </longdescription>
+       <upstream>
+               <remote-id type="pypi">prysk</remote-id>
+               <remote-id type="github">prysk/prysk</remote-id>
+       </upstream>
+</pkgmetadata>

diff --git a/dev-util/prysk/prysk-0.18.0.ebuild 
b/dev-util/prysk/prysk-0.18.0.ebuild
new file mode 100644
index 0000000000..df08f93c65
--- /dev/null
+++ b/dev-util/prysk/prysk-0.18.0.ebuild
@@ -0,0 +1,36 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+DISTUTILS_USE_PEP517=poetry
+
+inherit distutils-r1
+
+DESCRIPTION="Functional testing framework for command line applications (cram 
fork)"
+HOMEPAGE="https://www.prysk.net/";
+# pypi doesn't includes tests
+SRC_URI="https://github.com/prysk/prysk/archive/refs/tags/${PV}.tar.gz -> 
${P}.gh.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~x86"
+
+distutils_enable_tests pytest
+
+RDEPEND="
+       $(python_gen_cond_dep '>=dev-python/rich-13.3.1[${PYTHON_USEDEP}]')
+"
+
+PATCHES=(
+       "${FILESDIR}/prysk-0.18.0-fix-stray-site-packages.patch"
+)
+
+DOCS=( README.rst docs examples )
+
+python_test() {
+       distutils-r1_python_test
+
+       "${EPYTHON}" -m prysk test/integration || die "Tests fail with 
${EPYTHON}"
+}

Reply via email to