public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 0/7] distutils-r1.eclass: DISTUTILS_USE_PEP517=no, take two
@ 2022-06-07 20:08 Michał Górny
  2022-06-07 20:08 ` [gentoo-dev] [PATCH 1/7] distutils-r1.eclass: Move venv creation to post-compile Michał Górny
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Michał Górny @ 2022-06-07 20:08 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

Hi,

Unfortunately, the previous version of the patchset has caused
regressions, so I had to revert the few last commits.  Here's a little
different approach that should be safe for existing ebuilds,
and possibly less confusing to ebuild authors.

Moving the ${BUILD_DIR}/install to D merge logic from
distutils-r1_python_install into post-python_install broke ebuilds that
relied on modifying the install tree in python_install.  The new version
leaves it in distutils-r1_python_install, so that existing ebuilds
continue working.

The different for 'no' mode is that distutils-r1_python_install needs
to be called if you override python_install and expect the merging
to happen.


Michał Górny (7):
  distutils-r1.eclass: Move venv creation to post-compile
  distutils-r1.eclass: Future-proof python_install() for empty root
  distutils-r1.eclass: Move python_optimize call to post-install
  distutils-r1.eclass: Introduce DISTUTILS_USE_PEP517=no mode
  dev-python/tomli: Use DISTUTILS_USE_PEP517=no
  dev-python/installer: Use DISTUTILS_USE_PEP517=no
  dev-python/gpep517: Use DISTUTILS_USE_PEP517=no

 dev-python/gpep517/gpep517-6-r1.ebuild        |  41 ++++++
 .../installer/installer-0.5.1-r1.ebuild       |  37 +++++
 dev-python/tomli/tomli-2.0.1-r1.ebuild        |  36 +++++
 eclass/distutils-r1.eclass                    | 135 ++++++++++++------
 4 files changed, 206 insertions(+), 43 deletions(-)
 create mode 100644 dev-python/gpep517/gpep517-6-r1.ebuild
 create mode 100644 dev-python/installer/installer-0.5.1-r1.ebuild
 create mode 100644 dev-python/tomli/tomli-2.0.1-r1.ebuild

-- 
2.35.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [gentoo-dev] [PATCH 1/7] distutils-r1.eclass: Move venv creation to post-compile
  2022-06-07 20:08 [gentoo-dev] [PATCH 0/7] distutils-r1.eclass: DISTUTILS_USE_PEP517=no, take two Michał Górny
@ 2022-06-07 20:08 ` Michał Górny
  2022-06-07 20:08 ` [gentoo-dev] [PATCH 2/7] distutils-r1.eclass: Future-proof python_install() for empty root Michał Górny
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2022-06-07 20:08 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

---
 eclass/distutils-r1.eclass | 65 ++++++++++++++++++++++----------------
 1 file changed, 38 insertions(+), 27 deletions(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 7829e521ca7b..e5e11c75e39f 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1370,33 +1370,7 @@ distutils-r1_python_compile() {
 		addpredict /usr/lib/portage/pym
 		addpredict /usr/local # bug 498232
 
-		local root=${BUILD_DIR}/install
-		distutils_pep517_install "${root}"
-
-		# copy executables to python-exec directory
-		# we do it early so that we can alter bindir recklessly
-		local bindir=${root}${EPREFIX}/usr/bin
-		local rscriptdir=${root}$(python_get_scriptdir)
-		[[ -d ${rscriptdir} ]] &&
-			die "${rscriptdir} should not exist!"
-		if [[ -d ${bindir} ]]; then
-			mkdir -p "${rscriptdir}" || die
-			cp -a --reflink=auto "${bindir}"/. "${rscriptdir}"/ || die
-		fi
-
-		# enable venv magic inside the install tree
-		mkdir -p "${bindir}" || die
-		ln -s "${PYTHON}" "${bindir}/${EPYTHON}" || die
-		ln -s "${EPYTHON}" "${bindir}/python3" || die
-		ln -s "${EPYTHON}" "${bindir}/python" || die
-		cat > "${bindir}"/pyvenv.cfg <<-EOF || die
-			include-system-site-packages = true
-		EOF
-
-		# we need to change shebangs to point to the venv-python
-		find "${bindir}" -type f -exec sed -i \
-			-e "1s@^#!\(${EPREFIX}/usr/bin/\(python\|pypy\)\)@#!${root}\1@" \
-			{} + || die
+		distutils_pep517_install "${BUILD_DIR}/install"
 	fi
 }
 
@@ -1775,6 +1749,43 @@ distutils-r1_src_configure() {
 	return ${ret}
 }
 
+# @FUNCTION: _distutils-r1_post_python_compile
+# @INTERNAL
+# @DESCRIPTION:
+# Post-phase function called after python_compile.  In PEP517 mode,
+# it adjusts the install tree for venv-style usage.
+_distutils-r1_post_python_compile() {
+	debug-print-function ${FUNCNAME} "${@}"
+
+	local root=${BUILD_DIR}/install
+	if [[ ${DISTUTILS_USE_PEP517} && -d ${root} ]]; then
+		# copy executables to python-exec directory
+		# we do it early so that we can alter bindir recklessly
+		local bindir=${root}${EPREFIX}/usr/bin
+		local rscriptdir=${root}$(python_get_scriptdir)
+		[[ -d ${rscriptdir} ]] &&
+			die "${rscriptdir} should not exist!"
+		if [[ -d ${bindir} ]]; then
+			mkdir -p "${rscriptdir}" || die
+			cp -a --reflink=auto "${bindir}"/. "${rscriptdir}"/ || die
+		fi
+
+		# enable venv magic inside the install tree
+		mkdir -p "${bindir}" || die
+		ln -s "${PYTHON}" "${bindir}/${EPYTHON}" || die
+		ln -s "${EPYTHON}" "${bindir}/python3" || die
+		ln -s "${EPYTHON}" "${bindir}/python" || die
+		cat > "${bindir}"/pyvenv.cfg <<-EOF || die
+			include-system-site-packages = true
+		EOF
+
+		# we need to change shebangs to point to the venv-python
+		find "${bindir}" -type f -exec sed -i \
+			-e "1s@^#!\(${EPREFIX}/usr/bin/\(python\|pypy\)\)@#!${root}\1@" \
+			{} + || die
+	fi
+}
+
 distutils-r1_src_compile() {
 	debug-print-function ${FUNCNAME} "${@}"
 	local ret=0
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-dev] [PATCH 2/7] distutils-r1.eclass: Future-proof python_install() for empty root
  2022-06-07 20:08 [gentoo-dev] [PATCH 0/7] distutils-r1.eclass: DISTUTILS_USE_PEP517=no, take two Michał Górny
  2022-06-07 20:08 ` [gentoo-dev] [PATCH 1/7] distutils-r1.eclass: Move venv creation to post-compile Michał Górny
@ 2022-06-07 20:08 ` Michał Górny
  2022-06-07 20:08 ` [gentoo-dev] [PATCH 3/7] distutils-r1.eclass: Move python_optimize call to post-install Michał Górny
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2022-06-07 20:08 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

Account for the possibility that ${BUILD_DIR}/install does not contain
any files to merge, in preparation for DISTUTILS_USE_PEP517=no.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 eclass/distutils-r1.eclass | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index e5e11c75e39f..370b8bb7c6e0 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1484,6 +1484,7 @@ distutils-r1_python_install() {
 	_python_check_EPYTHON
 
 	local scriptdir=${EPREFIX}/usr/bin
+	local merge_root=
 	if [[ ${DISTUTILS_USE_PEP517} ]]; then
 		local root=${BUILD_DIR}/install
 		# remove the altered bindir, executables from the package
@@ -1495,6 +1496,10 @@ distutils-r1_python_install() {
 				mv "${wrapped_scriptdir}" "${root}${scriptdir}" || die
 			fi
 		fi
+		# prune empty directories to see if ${root} contains anything
+		# to merge
+		find "${BUILD_DIR}"/install -type d -empty -delete || die
+		[[ -d ${BUILD_DIR}/install ]] && merge_root=1
 	else
 		local root=${D%/}/_${EPYTHON}
 		[[ ${DISTUTILS_SINGLE_IMPL} ]] && root=${D%/}
@@ -1521,6 +1526,8 @@ distutils-r1_python_install() {
 		addpredict /usr/local # bug 498232
 
 		if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
+			merge_root=1
+
 			# user may override --install-scripts
 			# note: this is poor but distutils argv parsing is dumb
 
@@ -1549,7 +1556,7 @@ distutils-r1_python_install() {
 		esetup.py "${args[@]}"
 	fi
 
-	if [[ ! ${DISTUTILS_SINGLE_IMPL} || ${DISTUTILS_USE_PEP517} ]]; then
+	if [[ ${merge_root} ]]; then
 		multibuild_merge_root "${root}" "${D%/}"
 		if [[ ${DISTUTILS_USE_PEP517} ]]; then
 			# we need to recompile everything here in order to embed
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-dev] [PATCH 3/7] distutils-r1.eclass: Move python_optimize call to post-install
  2022-06-07 20:08 [gentoo-dev] [PATCH 0/7] distutils-r1.eclass: DISTUTILS_USE_PEP517=no, take two Michał Górny
  2022-06-07 20:08 ` [gentoo-dev] [PATCH 1/7] distutils-r1.eclass: Move venv creation to post-compile Michał Górny
  2022-06-07 20:08 ` [gentoo-dev] [PATCH 2/7] distutils-r1.eclass: Future-proof python_install() for empty root Michał Górny
@ 2022-06-07 20:08 ` Michał Górny
  2022-06-07 20:08 ` [gentoo-dev] [PATCH 4/7] distutils-r1.eclass: Introduce DISTUTILS_USE_PEP517=no mode Michał Górny
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2022-06-07 20:08 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 eclass/distutils-r1.eclass | 32 ++++++++++++++++++--------------
 1 file changed, 18 insertions(+), 14 deletions(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 370b8bb7c6e0..9293f744c7c2 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -1558,11 +1558,6 @@ distutils-r1_python_install() {
 
 	if [[ ${merge_root} ]]; then
 		multibuild_merge_root "${root}" "${D%/}"
-		if [[ ${DISTUTILS_USE_PEP517} ]]; then
-			# we need to recompile everything here in order to embed
-			# the correct paths
-			python_optimize "${D%/}$(python_get_sitedir)"
-		fi
 	fi
 	if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
 		_distutils-r1_wrap_scripts "${scriptdir}"
@@ -1858,16 +1853,25 @@ distutils-r1_src_test() {
 _distutils-r1_post_python_install() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	local forbidden_package_names=(
-		examples test tests
-		.pytest_cache .hypothesis _trial_temp
-	)
-	local p
-	for p in "${forbidden_package_names[@]}"; do
-		if [[ -d ${D}$(python_get_sitedir)/${p} ]]; then
-			die "Package installs '${p}' package which is forbidden and likely a bug in the build system."
+	local sitedir=${D%/}$(python_get_sitedir)
+	if [[ -d ${sitedir} ]]; then
+		local forbidden_package_names=(
+			examples test tests
+			.pytest_cache .hypothesis _trial_temp
+		)
+		local p
+		for p in "${forbidden_package_names[@]}"; do
+			if [[ -d ${sitedir}/${p} ]]; then
+				die "Package installs '${p}' package which is forbidden and likely a bug in the build system."
+			fi
+		done
+
+		if [[ ${DISTUTILS_USE_PEP517} ]]; then
+			# we need to recompile everything here in order to embed
+			# the correct paths
+			python_optimize "${sitedir}"
 		fi
-	done
+	fi
 }
 
 # @FUNCTION: _distutils-r1_check_namespace_pth
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-dev] [PATCH 4/7] distutils-r1.eclass: Introduce DISTUTILS_USE_PEP517=no mode
  2022-06-07 20:08 [gentoo-dev] [PATCH 0/7] distutils-r1.eclass: DISTUTILS_USE_PEP517=no, take two Michał Górny
                   ` (2 preceding siblings ...)
  2022-06-07 20:08 ` [gentoo-dev] [PATCH 3/7] distutils-r1.eclass: Move python_optimize call to post-install Michał Górny
@ 2022-06-07 20:08 ` Michał Górny
  2022-06-07 20:08 ` [gentoo-dev] [PATCH 5/7] dev-python/tomli: Use DISTUTILS_USE_PEP517=no Michał Górny
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2022-06-07 20:08 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

Introduce a new DISTUTILS_USE_PEP517 value "no" that stands for
"no build system".  This is primarily meant to replace the legacy
distutils-r1 logic used for bootstrapping baseline PEP 517 packages.
At the same time, it provides a convenient replacement for some
of the uses of python-r1.

In this mode, the eclass does not add PEP 517-specific dependencies
and the default python_compile() is a no-op.  However, it does set
dependencies, REQUIRED_USE and enables sub-phase usage (with respect to
DISTUTILS_OPTIONAL).  It also permits using
distutils_enable_{sphinx,tests}.

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 eclass/distutils-r1.eclass | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 9293f744c7c2..f3d224a51224 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -106,6 +106,8 @@ esac
 #
 # - maturin - maturin backend
 #
+# - no - no PEP517 build system (see below)
+#
 # - pbr - pbr backend
 #
 # - pdm - pdm.pep517 backend
@@ -121,6 +123,17 @@ esac
 #
 # The variable needs to be set before the inherit line.  The eclass
 # adds appropriate build-time dependencies and verifies the value.
+#
+# The special value "no" indicates that the package has no build system.
+# This is not equivalent to unset DISTUTILS_USE_PEP517 (legacy mode).
+# It causes the eclass not to include any build system dependencies
+# and to disable default python_compile() and python_install()
+# implementations.  Baseline Python deps and phase functions will still
+# be set (depending on the value of DISTUTILS_OPTIONAL).  Most of
+# the other eclass functions will work.  Testing venv will be provided
+# in ${BUILD_DIR}/install after python_compile(), and if any (other)
+# files are found in ${BUILD_DIR}/install after python_install(), they
+# will be merged into ${D}.
 
 # @ECLASS_VARIABLE: DISTUTILS_USE_SETUPTOOLS
 # @DEFAULT_UNSET
@@ -212,6 +225,10 @@ _distutils_set_globals() {
 				bdep+='
 					>=dev-util/maturin-0.12.7[${PYTHON_USEDEP}]'
 				;;
+			no)
+				# undo the generic deps added above
+				bdep=
+				;;
 			pbr)
 				bdep+='
 					>=dev-python/pbr-5.8.0-r1[${PYTHON_USEDEP}]'
@@ -792,7 +809,7 @@ distutils_install_for_testing() {
 distutils_write_namespace() {
 	debug-print-function ${FUNCNAME} "${@}"
 
-	if [[ ! ${DISTUTILS_USE_PEP517} ]]; then
+	if [[ ! ${DISTUTILS_USE_PEP517:-no} != no ]]; then
 		die "${FUNCNAME} is available only in PEP517 mode"
 	fi
 	if [[ ${EBUILD_PHASE} != test || ! ${BUILD_DIR} ]]; then
@@ -915,6 +932,9 @@ _distutils-r1_print_package_versions() {
 					dev-util/maturin
 				)
 				;;
+			no)
+				return
+				;;
 			pbr)
 				packages+=(
 					dev-python/pbr
@@ -1216,6 +1236,10 @@ distutils_pep517_install() {
 	debug-print-function ${FUNCNAME} "${@}"
 	[[ ${#} -eq 1 ]] || die "${FUNCNAME} takes exactly one argument: root"
 
+	if [[ ! ${DISTUTILS_USE_PEP517:-no} != no ]]; then
+		die "${FUNCNAME} is available only in PEP517 mode"
+	fi
+
 	local root=${1}
 	local -x WHEEL_BUILD_DIR=${BUILD_DIR}/wheel
 	mkdir -p "${WHEEL_BUILD_DIR}" || die
@@ -1360,6 +1384,9 @@ distutils-r1_python_compile() {
 			in_iuse debug && use debug &&
 				MATURIN_PEP517_ARGS+=" --cargo-extra-args=--profile=dev"
 			;;
+		no)
+			return
+			;;
 	esac
 
 	if [[ ${DISTUTILS_USE_PEP517} ]]; then
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-dev] [PATCH 5/7] dev-python/tomli: Use DISTUTILS_USE_PEP517=no
  2022-06-07 20:08 [gentoo-dev] [PATCH 0/7] distutils-r1.eclass: DISTUTILS_USE_PEP517=no, take two Michał Górny
                   ` (3 preceding siblings ...)
  2022-06-07 20:08 ` [gentoo-dev] [PATCH 4/7] distutils-r1.eclass: Introduce DISTUTILS_USE_PEP517=no mode Michał Górny
@ 2022-06-07 20:08 ` Michał Górny
  2022-06-07 20:08 ` [gentoo-dev] [PATCH 6/7] dev-python/installer: " Michał Górny
  2022-06-07 20:08 ` [gentoo-dev] [PATCH 7/7] dev-python/gpep517: " Michał Górny
  6 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2022-06-07 20:08 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 dev-python/tomli/tomli-2.0.1-r1.ebuild | 36 ++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 dev-python/tomli/tomli-2.0.1-r1.ebuild

diff --git a/dev-python/tomli/tomli-2.0.1-r1.ebuild b/dev-python/tomli/tomli-2.0.1-r1.ebuild
new file mode 100644
index 000000000000..338d877a350d
--- /dev/null
+++ b/dev-python/tomli/tomli-2.0.1-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 2021-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# please keep this ebuild at EAPI 7 -- sys-apps/portage dep
+EAPI=7
+
+DISTUTILS_USE_PEP517=no
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="A lil' TOML parser"
+HOMEPAGE="
+	https://pypi.org/project/tomli/
+	https://github.com/hukkin/tomli/
+"
+SRC_URI="
+	https://github.com/hukkin/tomli/archive/${PV}.tar.gz
+		-> ${P}.gh.tar.gz
+	https://files.pythonhosted.org/packages/py3/${PN::1}/${PN}/${P}-py3-none-any.whl
+		-> ${P}-py3-none-any.whl.zip
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-macos ~x64-macos ~x64-solaris"
+
+BDEPEND="
+	app-arch/unzip
+"
+
+distutils_enable_tests unittest
+
+python_compile() {
+	python_domodule src/tomli "${WORKDIR}"/*.dist-info
+}
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-dev] [PATCH 6/7] dev-python/installer: Use DISTUTILS_USE_PEP517=no
  2022-06-07 20:08 [gentoo-dev] [PATCH 0/7] distutils-r1.eclass: DISTUTILS_USE_PEP517=no, take two Michał Górny
                   ` (4 preceding siblings ...)
  2022-06-07 20:08 ` [gentoo-dev] [PATCH 5/7] dev-python/tomli: Use DISTUTILS_USE_PEP517=no Michał Górny
@ 2022-06-07 20:08 ` Michał Górny
  2022-06-07 20:08 ` [gentoo-dev] [PATCH 7/7] dev-python/gpep517: " Michał Górny
  6 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2022-06-07 20:08 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 .../installer/installer-0.5.1-r1.ebuild       | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 dev-python/installer/installer-0.5.1-r1.ebuild

diff --git a/dev-python/installer/installer-0.5.1-r1.ebuild b/dev-python/installer/installer-0.5.1-r1.ebuild
new file mode 100644
index 000000000000..4f89e7433018
--- /dev/null
+++ b/dev-python/installer/installer-0.5.1-r1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# please keep this ebuild at EAPI 7 -- sys-apps/portage dep
+EAPI=7
+
+DISTUTILS_USE_PEP517=no
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
+
+inherit distutils-r1
+
+DESCRIPTION="A library for installing Python wheels"
+HOMEPAGE="
+	https://pypi.org/project/installer/
+	https://github.com/pypa/installer/
+	https://installer.readthedocs.io/en/latest/
+"
+SRC_URI="
+	https://github.com/pypa/installer/archive/${PV}.tar.gz
+		-> ${P}.gh.tar.gz
+	https://files.pythonhosted.org/packages/py3/${PN::1}/${PN}/${P%_p*}-py3-none-any.whl
+		-> ${P%_p*}-py3-none-any.whl.zip
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+BDEPEND="
+	app-arch/unzip
+"
+
+distutils_enable_tests pytest
+
+python_compile() {
+	python_domodule src/installer "${WORKDIR}"/*.dist-info
+}
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [gentoo-dev] [PATCH 7/7] dev-python/gpep517: Use DISTUTILS_USE_PEP517=no
  2022-06-07 20:08 [gentoo-dev] [PATCH 0/7] distutils-r1.eclass: DISTUTILS_USE_PEP517=no, take two Michał Górny
                   ` (5 preceding siblings ...)
  2022-06-07 20:08 ` [gentoo-dev] [PATCH 6/7] dev-python/installer: " Michał Górny
@ 2022-06-07 20:08 ` Michał Górny
  6 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2022-06-07 20:08 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

Signed-off-by: Michał Górny <mgorny@gentoo.org>
---
 dev-python/gpep517/gpep517-6-r1.ebuild | 41 ++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 dev-python/gpep517/gpep517-6-r1.ebuild

diff --git a/dev-python/gpep517/gpep517-6-r1.ebuild b/dev-python/gpep517/gpep517-6-r1.ebuild
new file mode 100644
index 000000000000..ee64cb1d660f
--- /dev/null
+++ b/dev-python/gpep517/gpep517-6-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# please keep this ebuild at EAPI 7 -- sys-apps/portage dep
+EAPI=7
+
+DISTUTILS_USE_PEP517=no
+PYTHON_COMPAT=( pypy3 python3_{8..11} )
+
+inherit distutils-r1
+
+DESCRIPTION="A backend script to aid installing Python packages in Gentoo"
+HOMEPAGE="
+	https://pypi.org/project/gpep517/
+	https://github.com/mgorny/gpep517/
+"
+SRC_URI="
+	https://github.com/mgorny/gpep517/archive/v${PV}.tar.gz
+		-> ${P}.gh.tar.gz
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+RDEPEND="
+	>=dev-python/installer-0.5.0[${PYTHON_USEDEP}]
+	>=dev-python/tomli-1.2.3[${PYTHON_USEDEP}]
+"
+
+distutils_enable_tests pytest
+
+python_install() {
+	python_domodule gpep517
+	python_newscript - gpep517 <<-EOF
+		#!${EPREFIX}/usr/bin/python
+		import sys
+		from gpep517.__main__ import main
+		sys.exit(main())
+	EOF
+}
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-06-07 20:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-07 20:08 [gentoo-dev] [PATCH 0/7] distutils-r1.eclass: DISTUTILS_USE_PEP517=no, take two Michał Górny
2022-06-07 20:08 ` [gentoo-dev] [PATCH 1/7] distutils-r1.eclass: Move venv creation to post-compile Michał Górny
2022-06-07 20:08 ` [gentoo-dev] [PATCH 2/7] distutils-r1.eclass: Future-proof python_install() for empty root Michał Górny
2022-06-07 20:08 ` [gentoo-dev] [PATCH 3/7] distutils-r1.eclass: Move python_optimize call to post-install Michał Górny
2022-06-07 20:08 ` [gentoo-dev] [PATCH 4/7] distutils-r1.eclass: Introduce DISTUTILS_USE_PEP517=no mode Michał Górny
2022-06-07 20:08 ` [gentoo-dev] [PATCH 5/7] dev-python/tomli: Use DISTUTILS_USE_PEP517=no Michał Górny
2022-06-07 20:08 ` [gentoo-dev] [PATCH 6/7] dev-python/installer: " Michał Górny
2022-06-07 20:08 ` [gentoo-dev] [PATCH 7/7] dev-python/gpep517: " Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox