-# Copyright © 2020-2021 Nick Bowler
+# Copyright © 2020-2022 Nick Bowler
# License GPLv3+: GNU General Public License version 3 or any later version.
# This is free software: you are free to change and redistribute it.
# There is NO WARRANTY, to the extent permitted by law.
EAPI=7
-_PYTHON_ALLOW_PY27=1
-PYTHON_COMPAT=( python2_7 )
-
-inherit python-single-r1
-
DESCRIPTION="GIMP plug-in that exports layers as separate images"
HOMEPAGE="https://khalim19.github.io/gimp-plugin-export-layers/"
SRC_URI="https://github.com/khalim19/$PN/archive/$PV.tar.gz -> $P.tar.gz"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-REQUIRED_USE=$PYTHON_REQUIRED_USE
RDEPEND="dev-lang/python:2.7
|| (
- media-plugins/gimp-python[$PYTHON_SINGLE_USEDEP]
- media-gfx/gimp[python(-),$PYTHON_SINGLE_USEDEP] )"
+ media-plugins/gimp-python[python_targets_python2_7(+)]
+ media-gfx/gimp[python(-)] )"
+BDEPEND="dev-lang/python:2.7"
src_install () {
local plugindir=/usr/$(get_libdir)/gimp/2.0/plug-ins
+
default
- python_moduleinto "$plugindir"
- python_domodule export_layers
+ insinto "$plugindir"
+ doins -r export_layers
+
+ local args=(
+ -m compileall -q -f -d "${EPREFIX%/}$plugindir" "${ED%/}$plugindir"
+ )
+ python2.7 "${args[@]}"
+ python2.7 -OO "${args[@]}"
exeinto "$plugindir"
doexe export_layers.py