commit: a0916776cbb98363225c3510e5b844868fd5b1bf Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Tue Jun 3 23:18:25 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Jun 3 23:19:59 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0916776
dev-python/gpgmepy: new package, add 2.0.0_pre20250603 We can consider a pkgmove to 'gpg' if upstream actually end up publishing to pypi again. It's not clear if they will, though. Signed-off-by: Sam James <sam <AT> gentoo.org> dev-python/gpgmepy/Manifest | 1 + .../files/gpgmepy-2.0.0_pre20250603-python.patch | 31 ++++++++++ .../gpgmepy/gpgmepy-2.0.0_pre20250603.ebuild | 71 ++++++++++++++++++++++ dev-python/gpgmepy/metadata.xml | 11 ++++ profiles/package.mask | 1 + 5 files changed, 115 insertions(+) diff --git a/dev-python/gpgmepy/Manifest b/dev-python/gpgmepy/Manifest new file mode 100644 index 000000000000..fa00bc52356a --- /dev/null +++ b/dev-python/gpgmepy/Manifest @@ -0,0 +1 @@ +DIST gpgmepy-2.0.0_pre20250603.tar.gz 511499 BLAKE2B 5d21f1a76f69a51723c94236661117e05aeddf374314b029cf83cbf42f58df53aca3fab8e94236e6725d7bbc8a3c762516c68d323061aae3d60eabb7fb685e11 SHA512 52d461ebe064b89129815a9d38874acc2679f8818a04aa83021263e4d2d1f2169d12948a81fc7be218524531967a571b987e713fa326a50e8d5b815cc0183877 diff --git a/dev-python/gpgmepy/files/gpgmepy-2.0.0_pre20250603-python.patch b/dev-python/gpgmepy/files/gpgmepy-2.0.0_pre20250603-python.patch new file mode 100644 index 000000000000..f0ef9a1b5626 --- /dev/null +++ b/dev-python/gpgmepy/files/gpgmepy-2.0.0_pre20250603-python.patch @@ -0,0 +1,31 @@ +Don't search for multiple Pythons as it doesn't interact well with our +distutils-r1 setup. Just search for one Python and allow overriding which +one from the ebuild. +--- a/configure.ac ++++ b/configure.ac +@@ -287,23 +287,8 @@ else + # Only look for Python versions explicitly that are not yet end-of-life. + # As fallback look for any Python version >= 3.6. + m4_foreach([mym4pythonver], +- [[3.9],[3.10],[3.11],[3.12],[3.13],[any]], +- [unset PYTHON +- unset PYTHON_VERSION +- unset PYTHON_CPPFLAGS +- unset PYTHON_LDFLAGS +- unset PYTHON_LIBS +- unset PYTHON_SITE_PKG +- unset PYTHON_PLATFORM_SITE_PKG +- unset PYTHON_EXTRA_LIBS +- unset PYTHON_EXTRA_LDFLAGS +- unset ac_cv_path_PYTHON +- unset am_cv_pathless_PYTHON +- unset am_cv_python_version +- unset am_cv_python_platform +- unset am_cv_python_pythondir +- unset am_cv_python_pyexecdir +- AM_PATH_PYTHON(m4_if(mym4pythonver,[any],[3.6],mym4pythonver), [ ++ [[any]], ++ [AM_PATH_PYTHON(m4_if(mym4pythonver,[any],[3.6],mym4pythonver), [ + AX_PYTHON_DEVEL([], [true]) + if test "$PYTHON_VERSION"; then + AC_MSG_CHECKING([for the setuptools Python package]) diff --git a/dev-python/gpgmepy/gpgmepy-2.0.0_pre20250603.ebuild b/dev-python/gpgmepy/gpgmepy-2.0.0_pre20250603.ebuild new file mode 100644 index 000000000000..072945644b35 --- /dev/null +++ b/dev-python/gpgmepy/gpgmepy-2.0.0_pre20250603.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Maintainers should: +# 1. Join the "Gentoo" project at https://dev.gnupg.org/project/view/27/ +# 2. Subscribe to release tasks like https://dev.gnupg.org/T6159 +# (find the one for the current release then subscribe to it + +# any subsequent ones linked within so you're covered for a while.) + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{11..14} ) +inherit autotools distutils-r1 + +GPGMEPY_COMMIT="1c2c1c0b41af5e34e4f6897639fa41ef3932ec7d" +DESCRIPTION="GnuPG Made Easy is a library for making GnuPG easier to use (C++ bindings)" +HOMEPAGE="https://www.gnupg.org/related_software/gpgme" +SRC_URI="https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgmepy.git;a=snapshot;h=${GPGMEPY_COMMIT};sf=tgz -> ${P}.tar.gz" +#SRC_URI=" +# mirror://gnupg/${PN}/${P}.tar.xz +# verify-sig? ( mirror://gnupg/${PN}/${P}.tar.xz.sig ) +#" +S="${WORKDIR}"/${PN}-${GPGMEPY_COMMIT:0:7} + +LICENSE="GPL-2 LGPL-2+" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="test" +RESTRICT="!test? ( test )" + +RDEPEND=" + >=app-crypt/gpgme-2:= + >=dev-libs/libgpg-error-1.47:= +" +DEPEND="${RDEPEND}" +BDEPEND=" + ${PYTHON_DEPS} + ${DISTUTILS_DEPS} + dev-lang/swig +" + +PATCHES=( + "${FILESDIR}"/${PN}-2.0.0_pre20250603-python.patch +) + +src_prepare() { + distutils-r1_src_prepare + eautoreconf +} + +python_configure() { + local myeconfargs=( + $(use_enable test gpg-test) + + PYTHON=${EPYTHON} + PYTHONS=${EPYTHON} + GPGRT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpgrt-config" + ) + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" + emake -Onone prepare +} + +python_test() { + emake -C tests -Onone check \ + PYTHON=${EPYTHON} \ + PYTHONS=${EPYTHON} \ + TESTFLAGS="--python-libdir=${BUILD_DIR}/lib" +} diff --git a/dev-python/gpgmepy/metadata.xml b/dev-python/gpgmepy/metadata.xml new file mode 100644 index 000000000000..78f45758fdff --- /dev/null +++ b/dev-python/gpgmepy/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>[email protected]</email> + <name>Gentoo Base System</name> + </maintainer> + <upstream> + <remote-id type="pypi">gpg</remote-id> + </upstream> +</pkgmetadata> diff --git a/profiles/package.mask b/profiles/package.mask index 47ae5fe4929c..24f493773fb6 100644 --- a/profiles/package.mask +++ b/profiles/package.mask @@ -41,6 +41,7 @@ >=app-crypt/gpgme-2 dev-cpp/gpgmepp dev-libs/qgpgme +dev-python/gpgmepy # Sam James <[email protected]> (2025-06-03) # Fetching from GitHub seems broken with this:
