public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Lucio Sauer" <watermanpaint@posteo.net>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-python/pyclip/
Date: Mon, 19 Feb 2024 21:58:54 +0000 (UTC)	[thread overview]
Message-ID: <1708379920.36dc547f962382ded195530b6d1d45c13c0b6bac.watermanpaint@gentoo> (raw)

commit:     36dc547f962382ded195530b6d1d45c13c0b6bac
Author:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Mon Feb 19 21:54:04 2024 +0000
Commit:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
CommitDate: Mon Feb 19 21:58:40 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=36dc547f

dev-python/pyclip: clipboard detection should respect USE flags

Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>

 dev-python/pyclip/pyclip-0.7.0-r1.ebuild | 51 ++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/dev-python/pyclip/pyclip-0.7.0-r1.ebuild b/dev-python/pyclip/pyclip-0.7.0-r1.ebuild
new file mode 100644
index 0000000000..85ade02ebc
--- /dev/null
+++ b/dev-python/pyclip/pyclip-0.7.0-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+
+DISTUTILS_USE_PEP517="setuptools"
+
+inherit distutils-r1
+
+if [[ ${PV} == 9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/spyoungtech/pyclip.git"
+else
+	SRC_URI="https://github.com/spyoungtech/pyclip/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+fi
+
+DESCRIPTION="Python clipboard module"
+HOMEPAGE="https://pypi.org/project/pyclip/"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="wayland +X"
+# Needs a working xorg/wayland setup
+RESTRICT="test"
+DOCS="${S}/docs/README.md"
+REQUIRED_USE="|| ( wayland X )"
+
+RDEPEND="
+	wayland? ( gui-apps/wl-clipboard )
+	X? ( x11-misc/xclip )
+"
+
+src_prepare() {
+	# Clipboard detection should respect USE flags
+	if use wayland && ! use X; then
+		sed -ie "/linux':/s/elif .*/elif False:/" pyclip/util.py || die
+	elif ! use wayland && use X; then
+		sed -ie "/WAYLAND/s/elif .*/elif False:/" pyclip/util.py || die
+	fi
+	distutils-r1_src_prepare
+}
+
+pkg_postinst() {
+	if use wayland && use X; then
+		elog "If you wish to use the xclip backend over the wl-clipboard backend,"
+		elog "unset the WAYLAND_DISPLAY environment variable or consider"
+		elog "installing ${CATEGORY}/${PN}[-wayland,X] instead."
+	fi
+}


             reply	other threads:[~2024-02-19 21:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 21:58 Lucio Sauer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-10 15:48 [gentoo-commits] repo/proj/guru:dev commit in: dev-python/pyclip/ Denis Reva
2024-03-21 22:11 Esteve Varela Colominas
2024-02-19 21:58 Lucio Sauer
2024-02-19 21:58 Lucio Sauer
2024-02-19 21:33 Julien Roy
2022-12-19 13:55 Denis Reva
2022-12-19 13:48 Denis Reva
2022-05-26 21:09 Ryan Fox
2022-05-26 20:43 Ryan Fox
2022-05-26 20:43 Ryan Fox
2022-05-19 20:58 Tony Olagbaiye
2022-05-18 19:35 Tony Olagbaiye
2022-05-18 16:00 Tony Olagbaiye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1708379920.36dc547f962382ded195530b6d1d45c13c0b6bac.watermanpaint@gentoo \
    --to=watermanpaint@posteo.net \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox