From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C7B11138350 for ; Wed, 22 Apr 2020 23:48:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 11D90E0C14; Wed, 22 Apr 2020 23:48:53 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DE34BE0C14 for ; Wed, 22 Apr 2020 23:48:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CF9DE34EFA2 for ; Wed, 22 Apr 2020 23:48:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 232589C for ; Wed, 22 Apr 2020 23:48:20 +0000 (UTC) From: "Marek Szuba" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Marek Szuba" Message-ID: <1587599247.dfc3dd1bac0fb409e346a2813ce0fca107deb2c9.marecki@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/protontricks/files/, app-emulation/protontricks/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/protontricks/Manifest app-emulation/protontricks/files/protontricks-1.4.1_no-setuptools-scm.patch app-emulation/protontricks/protontricks-1.4.1-r1.ebuild X-VCS-Directories: app-emulation/protontricks/files/ app-emulation/protontricks/ X-VCS-Committer: marecki X-VCS-Committer-Name: Marek Szuba X-VCS-Revision: dfc3dd1bac0fb409e346a2813ce0fca107deb2c9 X-VCS-Branch: master Date: Wed, 22 Apr 2020 23:48:20 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c2c3add2-69a0-40f2-bc0d-cd8a4399b2ca X-Archives-Hash: 20ea9558b61362a1ed435673534d41e7 commit: dfc3dd1bac0fb409e346a2813ce0fca107deb2c9 Author: Marek Szuba gentoo org> AuthorDate: Wed Apr 22 21:44:15 2020 +0000 Commit: Marek Szuba gentoo org> CommitDate: Wed Apr 22 23:47:27 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfc3dd1b app-emulation/protontricks: re-enable tests Instead of having to jump through hoops to satisfy setuptools-scm, remove references to that package and seed the version file manually, using the value of ${PV}. Presto, can use GitHub release archives - and by extension run tests - again! Signed-off-by: Marek Szuba gentoo.org> app-emulation/protontricks/Manifest | 1 + .../protontricks-1.4.1_no-setuptools-scm.patch | 36 ++++++++++++++ .../protontricks/protontricks-1.4.1-r1.ebuild | 58 ++++++++++++++++++++++ 3 files changed, 95 insertions(+) diff --git a/app-emulation/protontricks/Manifest b/app-emulation/protontricks/Manifest index fe8223dd60d..07a1ca660a7 100644 --- a/app-emulation/protontricks/Manifest +++ b/app-emulation/protontricks/Manifest @@ -1 +1,2 @@ +DIST protontricks-1.4.1.gh.tar.gz 40029 BLAKE2B 3937f69ad1113c0a368117db38cf8bf1b66feea5cc7c509eaee2f7adabdeea724368baa15f51134a5a9749171a34f439878bfda3fc6b813caba11faf7be76373 SHA512 96d4b3aa5b1ca8f7f9bad0859f5984eb29a0bed01f420d108e537deef0436af314e73fcfaccfd58b5b1dc912698404bd4b0157e69ab6a055d65eb3701a60d00b DIST protontricks-1.4.1.tar.gz 31838 BLAKE2B b8c94a1b96fa7df14eaf1cc6d11cb96e43ae4e8c7bd232687a50cae9c79cf2d0e7864b1af0e1dc4cc20086952e1fcefeb16cb71a9c3a977f6feafad1b17d6857 SHA512 7635c9830afa3c64617514cd86edc7d7f9f33e6e81a1da995ec8bee70adc1cf8b5d9de92036c372134e408d735615b267b46a9afc9246f14ff161cb2ee1fc8f9 diff --git a/app-emulation/protontricks/files/protontricks-1.4.1_no-setuptools-scm.patch b/app-emulation/protontricks/files/protontricks-1.4.1_no-setuptools-scm.patch new file mode 100644 index 00000000000..fac3ed813d4 --- /dev/null +++ b/app-emulation/protontricks/files/protontricks-1.4.1_no-setuptools-scm.patch @@ -0,0 +1,36 @@ +Since version 1.4.1 upstream has used setuptools-scm to determine the +current version number. Unfortunately the package in question does not +support GitHub release archives, using GitHub VCS snapshots would require +retrieving and updating commit hashes corresponding to release tags, and +PyPI tarballs do not contain tests. setuptools_scm_git_archive does not +help because it requires extra files to be included in the repository, +which upstream has not done. + +Seeing as we already know the version number, bypass setuptools_scm +altogether and create the version file ourselves. For obvious reasons the +latter cannot be done with a patch alone - have to call sed in src_prepare. + +--- a/setup.py ++++ b/setup.py +@@ -16,9 +16,6 @@ + + setup( + name="protontricks", +- use_scm_version={ +- "write_to": "src/protontricks/_version.py" +- }, + description=DESCRIPTION, + long_description=LONG_DESCRIPTION, + author=AUTHOR, +@@ -28,7 +25,6 @@ + packages=["protontricks"], + package_data={"": ["LICENSE"]}, + package_dir={"protontricks": "src/protontricks"}, +- setup_requires=["setuptools_scm"], + install_requires=["vdf>=2.4"], + entry_points={ + "console_scripts": [ +--- /dev/null ++++ b/src/protontricks/_version.py +@@ -0,0 +1 @@ ++version = '@VERSION@' diff --git a/app-emulation/protontricks/protontricks-1.4.1-r1.ebuild b/app-emulation/protontricks/protontricks-1.4.1-r1.ebuild new file mode 100644 index 00000000000..d17ef1b4599 --- /dev/null +++ b/app-emulation/protontricks/protontricks-1.4.1-r1.ebuild @@ -0,0 +1,58 @@ +# 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_SINGLE_IMPL=1 +DISTUTILS_USE_SETUPTOOLS=rdepend + +inherit distutils-r1 + +DESCRIPTION="app-emulation/winetricks wrapper for Proton (Steam Play) games" +HOMEPAGE="https://github.com/Matoking/protontricks" +# Will remove the .gh bit come next version bump +SRC_URI="https://github.com/Matoking/${PN}/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+gui" + +RDEPEND="app-emulation/winetricks + $(python_gen_cond_dep ' + dev-python/vdf[${PYTHON_USEDEP}] + ') + gui? ( gnome-extra/zenity + || ( + app-emulation/winetricks[gtk] + app-emulation/winetricks[kde] + ) + )" + +PATCHES=( + "${FILESDIR}"/${PN}-1.4.1_no-setuptools-scm.patch +) + +DOCS=( CHANGELOG.md README.md ) + +distutils_enable_tests pytest + +python_prepare_all() { + distutils-r1_python_prepare_all + sed -i -e "s/@VERSION@/${PV}/" "${S}"/src/${PN}/_version.py || die +} + +pkg_postinst() { + elog + + if ! use gui; then + ewarn "Please note that disabling USE=gui does *not* presently remove the --gui command-line option," + ewarn "it just means using this option will fail unless gnome-extra/zenity happens to be installed." + ewarn + fi + + elog "Protontricks can only find games for which a Proton prefix already exists." + elog "Make sure to run a Proton game at least once before trying to use protontricks on it." + elog +}