Merge pull request #417 from flatcar/krnowak/python-update

Update python and python packages and eclasses
This commit is contained in:
Krzesimir Nowak 2023-02-20 17:11:33 +01:00 committed by GitHub
commit 44f8a01b1c
200 changed files with 4491 additions and 3160 deletions

View File

@ -93,11 +93,17 @@ app-eselect/eselect-iptables
app-portage/portage-utils
app-shells/bash-completion
app-text/asciidoc
dev-db/sqlite
dev-lang/duktape
dev-lang/perl
dev-lang/python
dev-lang/python-exec
dev-lang/python-exec-conf
dev-libs/boost
dev-libs/cJSON
@ -108,9 +114,11 @@ dev-libs/glib
dev-libs/gmp
dev-libs/gobject-introspection
dev-libs/gobject-introspection-common
dev-libs/jsoncpp
dev-libs/libaio
dev-libs/libksba
dev-libs/libltdl
dev-libs/libnl
dev-libs/libpcre2
dev-libs/libtasn1
dev-libs/libxml2
@ -125,7 +133,42 @@ dev-perl/Text-Unidecode
dev-perl/Unicode-EastAsianWidth
dev-perl/libintl-perl
dev-python/appdirs
dev-python/autocommand
dev-python/boto
dev-python/certifi
dev-python/crcmod
dev-python/cython
dev-python/distro
dev-python/docutils
dev-python/fasteners
dev-python/flit_core
dev-python/gentoo-common
dev-python/gpep517
dev-python/inflect
dev-python/installer
dev-python/jaraco-context
dev-python/jaraco-functools
dev-python/jaraco-text
dev-python/jinja
dev-python/lazy-object-proxy
dev-python/lxml
dev-python/markupsafe
dev-python/more-itertools
dev-python/nspektr
dev-python/ordered-set
dev-python/packaging
dev-python/pydantic
dev-python/pydecomp
dev-python/pygments
dev-python/pyparsing
dev-python/setuptools
dev-python/setuptools_scm
dev-python/six
dev-python/snakeoil
dev-python/tomli
dev-python/typing-extensions
dev-python/wheel
dev-util/b2
dev-util/bpftool
@ -150,6 +193,7 @@ dev-util/re2c
dev-util/strace
dev-vcs/git
dev-vcs/repo
eclass/acct-group.eclass
eclass/acct-user.eclass
@ -162,7 +206,9 @@ eclass/autotools.eclass
eclass/cmake-multilib.eclass
eclass/cmake.eclass
eclass/desktop.eclass
eclass/distutils-r1.eclass
eclass/eapi7-ver.eclass
eclass/eapi8-dosym.eclass
eclass/edo.eclass
eclass/edos2unix.eclass
eclass/elisp-common.eclass
@ -185,12 +231,14 @@ eclass/llvm.eclass
eclass/ltprune.eclass
eclass/meson-multilib.eclass
eclass/meson.eclass
eclass/multibuild.eclass
eclass/multilib-build.eclass
eclass/multilib-minimal.eclass
eclass/multilib.eclass
eclass/multiprocessing.eclass
eclass/ninja-utils.eclass
eclass/optfeature.eclass
eclass/out-of-source-utils.eclass
eclass/pam.eclass
eclass/pax-utils.eclass
eclass/perl-functions.eclass
@ -198,7 +246,12 @@ eclass/portability.eclass
eclass/plocale.eclass
eclass/prefix.eclass
eclass/preserve-libs.eclass
eclass/readme.gentoo-r1
eclass/pypi.eclass
eclass/python-any-r1.eclass
eclass/python-r1.eclass
eclass/python-single-r1.eclass
eclass/python-utils-r1.eclass
eclass/readme.gentoo-r1.eclass
eclass/savedconfig.eclass
eclass/strip-linguas.eclass
eclass/systemd.eclass
@ -215,6 +268,7 @@ eclass/verify-sig.eclass
eclass/vim-doc.eclass
eclass/vim-plugin.eclass
eclass/virtualx.eclass
eclass/waf-utils.eclass
eclass/wrapper.eclass
eclass/xdg-utils.eclass
@ -257,6 +311,7 @@ sys-apps/attr
sys-apps/diffutils
sys-apps/dtc
sys-apps/file
sys-apps/findutils
sys-apps/gawk
sys-apps/gentoo-functions
sys-apps/help2man

View File

@ -1,10 +1,10 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
BASHCOMP_P=bashcomp-2.0.3
PYTHON_COMPAT=( python3_{7..9} )
PYTHON_COMPAT=( python3_{9..10} )
inherit bash-completion-r1 python-any-r1 user-info
DESCRIPTION="Programmable Completion for bash"
@ -15,7 +15,7 @@ SRC_URI="
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris"
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"
IUSE="+eselect test"
RESTRICT="!test? ( test )"
@ -89,7 +89,10 @@ src_prepare() {
src_test() {
# portage's HOME override breaks tests
emake check HOME="$(egethome "${UID}")" PYTESTFLAGS="-vv" NETWORK=none
local myhome=$(unset HOME; echo ~)
local -x SANDBOX_PREDICT=${SANDBOX_PREDICT}
addpredict "${myhome}"
emake check HOME="${myhome}" PYTESTFLAGS="-vv" NETWORK=none
}
src_install() {

View File

@ -1,9 +1,9 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7..9} )
PYTHON_COMPAT=( python3_{9..10} )
inherit autotools git-r3 python-any-r1 user-info
DESCRIPTION="Programmable Completion for bash"
@ -99,7 +99,10 @@ src_prepare() {
src_test() {
# portage's HOME override breaks tests
emake check HOME="$(egethome "${UID}")" PYTESTFLAGS="-vv" NETWORK=none
local myhome=$(unset HOME; echo ~)
local -x SANDBOX_PREDICT=${SANDBOX_PREDICT}
addpredict "${myhome}"
emake check HOME="${myhome}" PYTESTFLAGS="-vv" NETWORK=none
}
src_install() {

View File

@ -11,7 +11,7 @@
</maintainer>
<use>
<flag name="eselect">
Support blacklisting of completions via 'eselect bash-completion'.
Support blacklisting of completions via 'eselect bashcomp'.
This enables custom Gentoo patching of upstream completion loader.
</flag>
</use>

View File

@ -1,4 +1,2 @@
DIST asciidoc-9.0.2.new.tar.gz 1269444 BLAKE2B 0041073c572267628b8bbfd56258d86c35edb0e7f3a222743ce1476b405483b01144faf768ab1492fd3f378960f6cc8e17d92ef61671d84c318fbe7c1ca8cd7c SHA512 c20629001704f1c3acfef0407b82f35f6077f5b32ef754fcbeee03a5a86d4e01e374e89b79cbdb236fc2c7fc76bf47ba81efd691f2f9e1c87dc85a7111f5e030
DIST asciidoc-9.0.4.new.tar.gz 1233878 BLAKE2B 506a2c82d95ce0d522f45b20eee31f7ce2b114e0ad43c78bb313f34b210a7bdd282a8a3779a3ea29025e865847eb8298bd5a6ddac7ee338e4b878ae79bdf149e SHA512 59be96514d0c4c82e5842ddea412ddd6e06647ebe09e0f1828b7c07e787d890896bab4271e7566ed038eb2da6755a67c725bee07bcfbd7aa31475f39c3abc089
DIST asciidoc-9.0.5.new.tar.gz 1225334 BLAKE2B c3e428098dc4d71704ed13b54fd5f640b9de81d12939facb5faaf38a3123794e57201ecd9c312a22c220a2ec6b06c88a76ab47f05ffa972fc8751089b3471cfc SHA512 9125631fdee464f96f7e3c76a60fe37331905e9e55a81db27aece4065b246dc05a35db4c157dc7dbb2345eb95c153b474251d6a447d65774bf1b3f57e1883895
DIST asciidoc-10.2.0.tar.gz 216824 BLAKE2B 500038d655f820fe89048bbff683ae029c7044de839ae4f9ec4666b843585511c99bbc1991ec1764262f33c55b08845661fc1e62eb21bb3250d3168e369928ff SHA512 2f83c7f6d1d0a34948035347833ca59841de1271e8d008b4c4a43a7a8273b230148e6f51ee8f6e2dc702460e27c495037fbe2d6d43195b70bf3447ad86390d28
DIST asciidoc-9.1.0.new.tar.gz 1249958 BLAKE2B 0a98f58f7604f84d704092313c38563634bad5d697d60d02760f3be1d2a78a97ee2488dda3a9918b02e0062710175c6513d600f3fbd850fe700bf3fa917a3980 SHA512 c30854a936228fe5bcf2f9305741fbc4b17ef088b2fa637d5f3b19c7803306085634fb71146f0b089c2fad01f986da71a4fae364139f520c0906525317c0c4a6

View File

@ -0,0 +1,48 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_SINGLE_IMPL=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..11} pypy3 )
inherit distutils-r1 optfeature readme.gentoo-r1
DESCRIPTION="A plain text human readable/writable document format"
HOMEPAGE="https://asciidoc.org/ https://github.com/asciidoc-py/asciidoc-py/"
# Could use the github tarball but we need autotools then
#SRC_URI="https://github.com/asciidoc-py/asciidoc-py/releases/download/${PV}/${P}.tar.gz"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
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="app-text/docbook-xml-dtd:4.5
>=app-text/docbook-xsl-stylesheets-1.75
dev-libs/libxslt
dev-libs/libxml2:2"
DOC_CONTENTS="
If you are going to use a2x, please also look at a2x(1) under
REQUISITES for a list of runtime dependencies.
"
src_install() {
distutils-r1_src_install
# TODO: Consider using Debian patch to allow /usr/share?
insinto /usr/share/asciidoc
doins -r asciidoc/resources/.
readme.gentoo_create_doc
}
pkg_postinst() {
readme.gentoo_print_elog
optfeature "music filter support" "media-sound/lilypond virtual/imagemagick-tools"
optfeature "source filter support" "dev-util/source-highlight dev-python/pygments app-text/highlight"
optfeature "latex filter support" "dev-texlive/texlive-latex app-text/dvipng" "dev-texlive/texlive-latex app-text/dvisvgm"
optfeature "graphviz filter support" "media-gfx/graphviz"
}

View File

@ -1,84 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7,8,9} pypy3 )
inherit autotools optfeature python-single-r1 readme.gentoo-r1
DESCRIPTION="A plain text human readable/writable document format"
HOMEPAGE="https://asciidoc.org/ https://github.com/asciidoc-py/asciidoc-py/"
SRC_URI="https://github.com/asciidoc-py/asciidoc-py/releases/download/${PV}/${P}.tar.gz -> ${P}.new.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
RDEPEND="${PYTHON_DEPS}
app-text/docbook-xml-dtd:4.5
>=app-text/docbook-xsl-stylesheets-1.75
dev-libs/libxslt
dev-libs/libxml2:2
"
DEPEND="
test? (
${PYTHON_DEPS}
app-text/dvipng
app-text/dvisvgm
dev-texlive/texlive-latex
dev-util/source-highlight
media-gfx/graphviz
media-gfx/imagemagick
media-sound/lilypond
)"
DOC_CONTENTS="
If you are going to use a2x, please also look at a2x(1) under
REQUISITES for a list of runtime dependencies.
"
DOCS=( BUGS.txt CHANGELOG.txt README.asciidoc
docbook-xsl/asciidoc-docbook-xsl.txt dblatex/dblatex-readme.txt
filters/code/code-filter-readme.txt )
src_prepare() {
default
# Only needed for prefix - harmless (does nothing) otherwise
sed -i -e "s:^CONF_DIR=.*:CONF_DIR='${EPREFIX}/etc/asciidoc':" \
asciidoc.py || die
# enforce usage of the configured version of Python
sed -i -e "s:python3:${EPYTHON}:" Makefile.in || die
eautoreconf
}
src_configure() {
econf --sysconfdir="${EPREFIX}"/usr/share
}
src_install() {
default
if use doc; then
emake DESTDIR="${D}" docs
fi
python_fix_shebang "${ED}"/usr/bin/*.py
readme.gentoo_create_doc
}
pkg_postinst() {
readme.gentoo_print_elog
optfeature "\"music\" filter support" "media-sound/lilypond media-gfx/imagemagick"
optfeature "\"source\" filter support" dev-util/source-highlight dev-python/pygments app-text/highlight
optfeature "\"latex\" filter support" "dev-texlive/texlive-latex app-text/dvipng" "dev-texlive/texlive-latex app-text/dvisvgm"
optfeature "\"graphviz\" filter support" media-gfx/graphviz
}

View File

@ -1,84 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7,8,9} pypy3 )
inherit autotools optfeature python-single-r1 readme.gentoo-r1
DESCRIPTION="A plain text human readable/writable document format"
HOMEPAGE="https://asciidoc.org/ https://github.com/asciidoc-py/asciidoc-py/"
SRC_URI="https://github.com/asciidoc-py/asciidoc-py/releases/download/${PV}/${P}.tar.gz -> ${P}.new.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
RDEPEND="${PYTHON_DEPS}
app-text/docbook-xml-dtd:4.5
>=app-text/docbook-xsl-stylesheets-1.75
dev-libs/libxslt
dev-libs/libxml2:2
"
DEPEND="
test? (
${PYTHON_DEPS}
app-text/dvipng
app-text/dvisvgm
dev-texlive/texlive-latex
dev-util/source-highlight
media-gfx/graphviz
media-gfx/imagemagick
media-sound/lilypond
)"
DOC_CONTENTS="
If you are going to use a2x, please also look at a2x(1) under
REQUISITES for a list of runtime dependencies.
"
DOCS=( BUGS.txt CHANGELOG.txt README.asciidoc
docbook-xsl/asciidoc-docbook-xsl.txt dblatex/dblatex-readme.txt
filters/code/code-filter-readme.txt )
src_prepare() {
default
# Only needed for prefix - harmless (does nothing) otherwise
sed -i -e "s:^CONF_DIR=.*:CONF_DIR='${EPREFIX}/etc/asciidoc':" \
asciidoc.py || die
# enforce usage of the configured version of Python
sed -i -e "s:python3:${EPYTHON}:" Makefile.in || die
eautoreconf
}
src_configure() {
econf --sysconfdir="${EPREFIX}"/usr/share
}
src_install() {
default
if use doc; then
emake DESTDIR="${D}" docs
fi
python_fix_shebang "${ED}"/usr/bin/*.py
readme.gentoo_create_doc
}
pkg_postinst() {
readme.gentoo_print_elog
optfeature "\"music\" filter support" "media-sound/lilypond media-gfx/imagemagick"
optfeature "\"source\" filter support" dev-util/source-highlight dev-python/pygments app-text/highlight
optfeature "\"latex\" filter support" "dev-texlive/texlive-latex app-text/dvipng" "dev-texlive/texlive-latex app-text/dvisvgm"
optfeature "\"graphviz\" filter support" media-gfx/graphviz
}

View File

@ -1,84 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7,8,9} pypy3 )
inherit autotools optfeature python-single-r1 readme.gentoo-r1
DESCRIPTION="A plain text human readable/writable document format"
HOMEPAGE="https://asciidoc.org/ https://github.com/asciidoc-py/asciidoc-py/"
SRC_URI="https://github.com/asciidoc-py/asciidoc-py/releases/download/${PV}/${P}.tar.gz -> ${P}.new.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
RDEPEND="${PYTHON_DEPS}
app-text/docbook-xml-dtd:4.5
>=app-text/docbook-xsl-stylesheets-1.75
dev-libs/libxslt
dev-libs/libxml2:2
"
DEPEND="
test? (
${PYTHON_DEPS}
app-text/dvipng
app-text/dvisvgm
dev-texlive/texlive-latex
dev-util/source-highlight
media-gfx/graphviz
media-gfx/imagemagick
media-sound/lilypond
)"
DOC_CONTENTS="
If you are going to use a2x, please also look at a2x(1) under
REQUISITES for a list of runtime dependencies.
"
DOCS=( BUGS.txt CHANGELOG.txt README.asciidoc
docbook-xsl/asciidoc-docbook-xsl.txt dblatex/dblatex-readme.txt
filters/code/code-filter-readme.txt )
src_prepare() {
default
# Only needed for prefix - harmless (does nothing) otherwise
sed -i -e "s:^CONF_DIR=.*:CONF_DIR='${EPREFIX}/etc/asciidoc':" \
asciidoc.py || die
# enforce usage of the configured version of Python
sed -i -e "s:python3:${EPYTHON}:" Makefile.in || die
eautoreconf
}
src_configure() {
econf --sysconfdir="${EPREFIX}"/usr/share
}
src_install() {
default
if use doc; then
emake DESTDIR="${D}" docs
fi
python_fix_shebang "${ED}"/usr/bin/*.py
readme.gentoo_create_doc
}
pkg_postinst() {
readme.gentoo_print_elog
optfeature "\"music\" filter support" "media-sound/lilypond media-gfx/imagemagick"
optfeature "\"source\" filter support" dev-util/source-highlight dev-python/pygments app-text/highlight
optfeature "\"latex\" filter support" "dev-texlive/texlive-latex app-text/dvipng" "dev-texlive/texlive-latex app-text/dvisvgm"
optfeature "\"graphviz\" filter support" media-gfx/graphviz
}

View File

@ -1,9 +1,9 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{8..10} pypy3 )
PYTHON_COMPAT=( python3_{9..10} pypy3 )
inherit autotools optfeature python-single-r1 readme.gentoo-r1
@ -13,7 +13,7 @@ SRC_URI="https://github.com/asciidoc-py/asciidoc-py/releases/download/${PV}/${P}
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"

View File

@ -1,17 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person" proxied="yes">
<email>marcec@gmx.de</email>
<name>Marc Joliet</name>
</maintainer>
<maintainer type="project" proxied="proxy">
<email>proxy-maint@gentoo.org</email>
<name>Proxy Maintainers</name>
</maintainer>
<upstream>
<remote-id type="sourceforge">asciidoc</remote-id>
<remote-id type="github">asciidoc-py/asciidoc-py</remote-id>
<bugs-to>https://github.com/asciidoc-py/asciidoc-py/issues</bugs-to>
</upstream>
<!-- maintainer-needed -->
<upstream>
<remote-id type="sourceforge">asciidoc</remote-id>
<remote-id type="github">asciidoc-py/asciidoc-py</remote-id>
<bugs-to>https://github.com/asciidoc-py/asciidoc-py/issues</bugs-to>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,2 @@
- findutils ([4.9.0](https://lists.gnu.org/archive/html/info-gnu/2022-02/msg00003.html))
- SDK: python ([3.10.9](https://docs.python.org/3.10/whatsnew/changelog.html#python-3-10-9-final) (includes [3.10](https://www.python.org/downloads/release/python-3100/))

View File

@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -13,7 +13,7 @@ S=${WORKDIR}/${MY_P}
LICENSE="BSD-2"
SLOT="2"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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"
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"
# Internal Python project hack. Do not copy it. Ever.
IUSE="${_PYTHON_ALL_IMPLS[@]/#/python_targets_}"

View File

@ -1 +1 @@
DIST python-exec-2.4.8.tar.bz2 82671 BLAKE2B ac85f3dd6da3d1c535ad56a25edbbcb1d0e75b91e3567b80f27fd01d32a199a713909a8552dffaacbe96c43bca491f31c3f0c7f1a618fb9144814365686715cf SHA512 d6dabab217dc2f1817e2f4d159102a9467f51b26b91f4ae7fb7e4930d30334f74bd8a5f37cc60d58c6e1e61e89a3b4d2e1bd17413493ba86f38fa71250cf5ac1
DIST python-exec-2.4.10.tar.bz2 84412 BLAKE2B 1fe79e0d31a48954959a5556f96c3868fcf762ebc473d17f03e78a95cca83ab40b4933b7e42bc5751b0546e6229f9fdde9171c3fcbdd184f993536f944870491 SHA512 8c7d3c6b1fa362c8c97ec74ee01b5a195dc409d883408033e9709773b6059deb5291f6e63df6d9a4e42a0951aad4a1d513d4baa00ad9ff3dce3e1d2d38b694e1

View File

@ -10,8 +10,8 @@
<email>mgorny@gentoo.org</email>
<name>Michał Górny</name>
</maintainer>
<bugs-to>https://github.com/mgorny/python-exec/issues/</bugs-to>
<remote-id type="github">mgorny/python-exec</remote-id>
<bugs-to>https://github.com/projg2/python-exec/issues/</bugs-to>
<remote-id type="github">projg2/python-exec</remote-id>
</upstream>
<use>
<flag name="native-symlinks">

View File

@ -1,18 +1,18 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{8..10} pypy3 )
PYTHON_COMPAT=( python3_{9..11} pypy3 )
inherit python-any-r1
DESCRIPTION="Python script wrapper"
HOMEPAGE="https://github.com/mgorny/python-exec/"
SRC_URI="https://github.com/mgorny/python-exec/releases/download/v${PV}/${P}.tar.bz2"
HOMEPAGE="https://github.com/projg2/python-exec/"
SRC_URI="https://github.com/projg2/python-exec/releases/download/v${PV}/${P}.tar.bz2"
LICENSE="BSD-2"
SLOT="2"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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"
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"
# Internal Python project hack. Do not copy it. Ever.
IUSE="${_PYTHON_ALL_IMPLS[@]/#/python_targets_} +native-symlinks test"
RESTRICT="!test? ( test )"
@ -26,7 +26,7 @@ BDEPEND="
)"
python_check_deps() {
has_version -b "dev-python/pytest[${PYTHON_USEDEP}]"
python_has_version -b "dev-python/pytest[${PYTHON_USEDEP}]"
}
pkg_setup() {

View File

@ -1,21 +1,27 @@
DIST Python-2.7.18.tar.xz 12854736 BLAKE2B 060a621c91dd8e3d321aec99d44c17aa67381998256a1a002d316b38288349884d5960de35c49352d03129ed0bae599e641ec2225898158ebce50a7a2fd74d2c SHA512 a7bb62b51f48ff0b6df0b18f5b0312a523e3110f49c3237936bfe56ed0e26838c0274ff5401bda6fc21bf24337477ccac49e8026c5d651e4b4cafb5eb5086f6c
DIST Python-2.7.18.tar.xz.asc 833 BLAKE2B 1d98770e46171971fb99994508d238c01d2755281d2f94353314014d9e83e0ec5f0b3e3950ea1fdf5fce9ba6b8f55312355845c2a3fc4291c27ee56fe6215448 SHA512 c2a5f5a52f47dec52460ad3275758d4e5de6e7075c3def4353c988d74d563a39b42cae2d5eb24e2a23a6247cef69100f91620b11a49c2359fbf99b203c9cbda8
DIST Python-3.10.10.tar.xz 19627028 BLAKE2B 57fc6869fa05586158a170c1892d93a3036823bfafb9484b9d70bca6cdc3e76f75357622eace4bde9a4c0ca62a1bb79665e5751b41655f9f4d7e345547013ad8 SHA512 f0aee65970a68287b34c4eafcf35c6fa09c81ba234ac356db16fbbc6c36417e4ac67071e616d118f5e192d541d7f177dcab5585b9780e842f656c09e01c37ced
DIST Python-3.10.10.tar.xz.asc 833 BLAKE2B fd60e6268f7dd6676ea58bd7e80c513506ac9810c1a62ff060134207b0fd8e7b096d5f11f3cc536a1578144ff54c00bcb076d3c3f5889a69a898660dd280312b SHA512 591746d74c6123bf36c763b6e8e1de1554f02eeff30c855623ef0f12d3864d5573eb5efe96d6e142f24627c77b90738ada3456df4ad59bddcb008658f2ca8af9
DIST Python-3.10.9.tar.xz 19612112 BLAKE2B ef2d063a9fbaf234aa4a47149cb184a0379dc403515df10249104a5092750cdaf22ad47916d34e17dd68fff1c30338c0375f4e4e3cc9bde33e0896c1c3ba655b SHA512 d66ea8adeb6dc4951e612175f8838b3092967ff275b7a3470f2d86f470036aa2221e722c3144d90bcd230b88efd53dde204213f72f703e524e4b833e2ccc68e2
DIST Python-3.10.9.tar.xz.asc 833 BLAKE2B 8895c6cb5031b2463cc6ba3e0dc56bee40c2e99117c062f9c72f2b7adb0d5a49782b968abfc764117e8513bd12816915245677c25b1710e3dae3c9e26937c2b9 SHA512 525e166ede6836086de814c26fc880f41eaf1ed4bff6118f00342e42f7ab1c47148447ced1b565e146d3125fa06b5cd6b394a256bc61096766b26e07f18bbf10
DIST Python-3.11.1.tar.xz 19856648 BLAKE2B 2a8942e7a145cfcc5b6932865ff9a1afd300bf2e6c4c915e88d0e849441196a3a4cacf94f3db87eaa7538872059085cf7eeff91c436f424448f85d4b180a6f24 SHA512 5edd70c881e083c96199c60471f18f9ebc4c97a2d45dc66f89e16d7c3638d8a5d2cbf2e84b1be3d7f1178ce9f7fa4197884385c1ee3618ff66a538f872f318ed
DIST Python-3.11.1.tar.xz.asc 833 BLAKE2B 27c6101b2022cb7bea3e6082f1554b31cceb8cabe720e4b19391f550e870588c4defd1552c580a7e063638b80e8b8f415e54a11cf40ae3b0f449500c2e9babc6 SHA512 81ed05c2adf38552bdc5ac761704f2720a646d56681a919a6bfa51f1a4b42cd14edb9c84d58664dbc8e7b561cd78d82ae6b10dda423e1fae543bc7fa4bf3f78e
DIST Python-3.12.0a3.tar.xz 19695444 BLAKE2B c869e68612b7b32a3a9cdb5accd1fec3453abbea68ca6993e7ce6d5f8deead50902ee6026c3bf2a3faf92e5a571b6b71fbcfc85d49fa03b4ac12ab5dba3f486a SHA512 82d88adda53a1e5c16fc7165ac0d55f3828bae9249d361fbf7237d8826bd5acd941befb9b2c74f815a251b216d377f416831fbd233f1bfef31c2cab73b6554d1
DIST Python-3.12.0a3.tar.xz.asc 963 BLAKE2B ff0a4eb7a3e27281494450dca7f23f4e1816e18d0487e09b6a9f58d441b766f32e8653b7e01753c8353bb34a235b8296cbe975ee7a917ae4a24e5b8875b4ff5f SHA512 e25a42982f3cab6e38ef7a4f5bfd71ad25811f52dffeffbb827ee9f48bf45003edad14ffdd3289bfda113a34b7ef818d04a413d0da7e8ca52d0c47f9b4475dbb
DIST Python-3.11.2.tar.xz 19893284 BLAKE2B 0cfb1fefcdd4c4baf5c34f74ab0600ac7cd40101d266c28f66f9d35bcfbf19d6c3ff2a5b0d357ee1d03061e06005ea3ee7b18adf878d32e197434b3da2b7d918 SHA512 5684ec7eae2dce26facc54d448ccdb6901bbfa1cab03abbe8fd34e4268a2b701daa13df15903349492447035be78380d473389e8703b4e910a65b088d2462e8b
DIST Python-3.11.2.tar.xz.asc 833 BLAKE2B 15795836babd269424f1ff511073e27235827353383d15cac6a85406b967787840ca6c0f119faa1971a50ebb6699e6cdf0de095f428b868b57a91eb8dc6d5baa SHA512 9d9d1c6dd6e56a916c6861cd0e7e623a165b0845bafe0acfcae27b4fe10a6b7015844e6b3f8deded26a763c935e32f565b2e12beb20c43fda16c11eba8d282a1
DIST Python-3.12.0a4.tar.xz 19690792 BLAKE2B f4da53e856afca1acd8ba56dc37d78ef4cfee0007a3a66c9276b7a93dbd4c9e7ddb39aaea344bc55219e33ad09a9b34bf0e8b89273bba8e99643eeafc7e76d42 SHA512 19a98939077004259868cc5e6901d8fbf0ae90ad579700d6993f6b82990b1b4eb92efa5c8b5b7b50cfc46e311cb5c45f83251223a623fe1ade5da45ef2ca5dce
DIST Python-3.12.0a4.tar.xz.asc 963 BLAKE2B da2279932786fad5cb3def5e34f9f113b9203233f70edc805ac1f7c3ddb584883655bb3da7fac1651017269a0dd8ce9a88fcca609ab2072bc6285190c487a566 SHA512 b74a1bf0d5e4f402b6e5164cd140457ed0b172b2bfe61be1642fe053b71092b8bae1f5281e03516a6fba24319c78cd2505494cfada2416b766f4c602c1284d2a
DIST Python-3.12.0a5.tar.xz 19743140 BLAKE2B 3613523f8417251127b2a013218518a1f311d80a1534e0dd1eb704fc6bfd9e143848a18328a0c8d3fb00d7c6f580ac1b314d38893ca66d1de7eab198862ab99a SHA512 090d205a3cbfce1ea4c1ca5950d24db64e6f8aceb2f6458f17b996071ce6ddf80e60ed3e293b89f242df705e1dec6069ccc3e46f24f5d4e22819d7d54743a27a
DIST Python-3.12.0a5.tar.xz.asc 963 BLAKE2B f04f9c4b15404887611ff92cf661e65a2465f0a2d20b6c084ef76d0d426e4bfcf3963c45d96d385ce8ce3f739ae37f0834dd7c1837f10d8e4bce438ec8b044e2 SHA512 626ccafcb390e3987494f1c3fecf094047afbb255a65948fd1a1c8568cbd9c58be8e7e50e64b20873645428db7b363166984d075a3674daa9771b4be6fb46439
DIST Python-3.8.16.tar.xz 19046724 BLAKE2B cbdeec7961d39cb9ab4960760b5d4c7ae71675c174156aa9f6fca55ee92a93a937ef39defe86e423237a25e0e24703233ce4b91dc97005b6ffc1f342ddd9e22c SHA512 d206e80806409410c00ef8acd8c3d90e3cc9553f996d0a57faa63802f2415e9d7591542b2e84b5e8e79245f40f6478790b5ba2acf1da98ebbc9495999183f7fd
DIST Python-3.8.16.tar.xz.asc 833 BLAKE2B 678dabc558d013b104bf9e65d4319076c4730a67093a66fefc073b429c640d4facb31a0d6b7238deb08b265586a0cfb2c345051fe4df7bf5001d7317e6c06c9b SHA512 e93c394c0c5afcaaab625a3bd540dcc8e0ab946803d212343b8d1d6d5e6b89b09b6a20607bab0d858b30389a03305d57e14548605a65277d053c7817f32f4546
DIST Python-3.9.16.tar.xz 19738796 BLAKE2B 70dedeb70d9d8f27e4f6db5106623e087c61d451c7a04639cf8d3503ad02d4d43f1b36d0cdf1131aefc9bf6e677e561227dd4baef2c2c3d2dbf6d3e7dc36bd94 SHA512 b5fd0afe131c82bbce6ddf887c59eef6945910d6a9a2bc87c0927f4e4a096bf9ca4d25bcb729c40f6ebb8a65fbe8bf7b0b97a7c4a8c9e551240eb4f34b878653
DIST Python-3.9.16.tar.xz.asc 833 BLAKE2B 416b4a4be06e101c5971c12a6f21229c425bcabaea58487e0d1b24d6dea318c58806ee43892fc704df8252670451bd6a4a2610c25672d3983ddb081fed34b92d SHA512 468959c36a3ec6136f57a39475fff4745a25be0cb5d3d58cf3e5faf0b9ce2d2a8b89f1f9fea1479c4c6ad12ac49e97c1cfd4291c978bb3d30df5a582ec315210
DIST python-gentoo-patches-2.7.18_p16.tar.xz 35448 BLAKE2B 0139c0944f62f9cdd236f6a8557e0ed19704c7d72869af1cb7d8bd3e646a746cd4a0201e1b44232a5e78ef49f254db20b0d0271bf744fbfd4fe0f1e99b8f3e6c SHA512 810be590d0e06fab4b2165e6852ca49662f09dcd7e20b47a29f613ad7653252c8dfac3f0eb228d77c8a914efa7c08788b2fbd552a4b47504f5fd0ec17450c48f
DIST python-gentoo-patches-3.10.10_p1.tar.xz 12836 BLAKE2B 2a146138e4c34b35e7a3e79215ca03afb97c61b52fe68fe6b930aad2af748925c46b1faec9b38ec1b6be11c19b2e9ebecfa2acd86486a01babbe695fe305a284 SHA512 4821b0ba9731d5868dce31d6f51b6fa429331f49b1d07f1425d9561fb57b47719ef91ede9af33beb2d96d9824b755ba9d3fec867bbcc3462507c315153db57d2
DIST python-gentoo-patches-3.10.9.tar.xz 12216 BLAKE2B ced4f951089c51ddaab6c62ade9d2c84f69e7e1baf2acf5247559534c7d0fb0e88dca1222f5bd2209b4e61f5aca17279b8054f269535dbc10de0786c2c5779f5 SHA512 2d01f0f3831beeba004517bb82f7d616f25f08e5c755409ecff79cd68e0a619b5bf6802fffd0e5f7f39f1d9d93e65b018b91cdeb337a5e47f1651f36bea0e96e
DIST python-gentoo-patches-3.11.1.tar.xz 7076 BLAKE2B 3ec45f7529d34eabc9d9ba7fa7f8dd51d8754d9758a605b61857a9fd80386a0357837c925263ad7b0e207ff916944b94cc0e03c0f59921f839d5e51d92f0e47e SHA512 4253dbfa057a91db584b92550e2d39d87986f33041233bc400dd0254cbd95415b33fc47b0fe997bb84192c755bc16d3d31941bba4c216ee4d65facf0b48c7862
DIST python-gentoo-patches-3.12.0a3.tar.xz 6152 BLAKE2B 6c8c88100d184440cf27a4b9baf4f192310f62960b2061adca8dd423745836048f3f8489c434c51ab7572320356bc889498d68f3635f174194d6009e1b9277e4 SHA512 7b0dbcbefeafbdb2a822bb06950844ff21336ba1685a2af6bf2bd32b1ecde7c17591d01b2a018105b8c094149a9804d709c3ca17af67378644ad40fd5e02c012
DIST python-gentoo-patches-3.11.2_p1.tar.xz 7788 BLAKE2B 9652c46cd323958a43e26fd6b0afdd8f214953db59d9acf133366f7576502578c10e0a80ca13a9d768442d79c71dd6d095d73ef2bbbd1f79ef269a9ee20fc4b8 SHA512 7c5794e582d8ea5f99acb9ccf87c7e1f45a6557d0eb95de2b8c0cd7831f22e53eef0f03f32ca37568d1742024be127f0219463351f5b604f258c8a9985f89ea9
DIST python-gentoo-patches-3.12.0a4.tar.xz 8504 BLAKE2B 1257c1fe428fc967ef7d3107f99e4fcef0758a2bfa5b345bf69bb47bc0af1644b449f2b11b61148a8f79ed583a80365432d78ec4bade3d92070f08ad2ff568c2 SHA512 142f5d2ee8c1beeb6084bb6b48a0bbdcde907f48f514ac7743f0e6898a761696bb7788861fcb5c938cc36f212d444ddcfe874880ac8b4d0d54bc8ec04b166ca0
DIST python-gentoo-patches-3.8.16.tar.xz 28716 BLAKE2B 28ccad9d77a89f80f72dd12eb89d657825e80061eaa069d4c491736bffd87b235f483b9d079b9f383377ea4bc6c19471bb6a4869a37fc0401abe28e2444fd9d2 SHA512 fe94ee2851af5c87c64ea3af5c1a744a53dcb03743f824a7726803daf454f38511894e24fe68be9de4ab59d1798161a3c320748309d04afd1e77906df353a246
DIST python-gentoo-patches-3.9.16.tar.xz 23348 BLAKE2B 26b66e57530d167776d2aee60fd4620fc8e6c229f371616fdaa74aa2f03fd5a50b61653a5f34e0f2659901ba167af7c2aadbb0d2db773ab08bac8b3125c84b77 SHA512 8260369d96a6328ad8498359ecc56f48cb02015547065cdaec28a6bb2293bef420cb12764fae9fdd13f4a6faa60c4c402e804a22cbed7dca031ac1679032f9f6
DIST python-gentoo-patches-3.12.0a5.tar.xz 7704 BLAKE2B 7224d3e4318313183a10dc0d4fa73ab589b9de8096945750f31d45371b926f7e2cbeb2c672c254e369f04bb5588a79335ceea2e3ce4968e76f70206bdc3c9672 SHA512 951d6fd25e113bf29fb334a9162bc132d27a8c3186c8b6cbaddfbdea8ccd221fe126d09cf7c6df59942d49dac8561a4e168468daa0e7cd0d0d3a925166b4d835
DIST python-gentoo-patches-3.8.16_p2.tar.xz 30888 BLAKE2B c1816cd8b043b9aa3629a7753b7a9afa7c9af5d35b81954113af40632c97dabaa2148f0b920d9a37e8f4ebeadc1d76788a904c254ea842ea1062d552d2208e8e SHA512 6383c3f07fc7d6f37bb0cf9af27544323784eb2ded9b6f7913f3f59f5011ccb5615fb1adcc9eb3f9a58a98b7a2c24393bfbeef0b85728d77404621e29cb72656
DIST python-gentoo-patches-3.9.16_p1.tar.xz 25564 BLAKE2B e6b7f20bb0457011d74f441d58eb0c9c4426a61bf0f8a2146f0180104c7b8b5054a04afc664374a17f3770d3ae94836099c362e841e4c00631a75fc56a2b352d SHA512 43f473dba8f6bd19c6a30f169ec8e8abb9eefe7d26c357884ee27cabf1b5876c079ea0e9454b9e52021d15f070e0a824e3366cfde20d57175f5f89774ee50a5b

View File

@ -27,7 +27,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="
berkdb bluetooth build examples gdbm hardened +ncurses +readline
+sqlite +ssl tk valgrind wininst +xml

View File

@ -1,316 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
WANT_LIBTOOL="none"
inherit autotools flag-o-matic pax-utils toolchain-funcs verify-sig
MY_P="Python-${PV%_p*}"
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${PV}"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
https://gitweb.gentoo.org/fork/cpython.git/
"
SRC_URI="
https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%_*}/${MY_P}.tar.xz.asc
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="
berkdb bluetooth build examples gdbm hardened +ncurses +readline
+sqlite +ssl tk valgrind wininst +xml
"
RESTRICT="test"
# Do not add a dependency on dev-lang/python to this ebuild.
# If you need to apply a patch which requires python for bootstrapping, please
# run the bootstrap code on your dev box and include the results in the
# patchset. See bug 447752.
RDEPEND="
app-arch/bzip2:=
dev-libs/libffi:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
virtual/libintl
berkdb? ( || (
sys-libs/db:5.3
sys-libs/db:4.8
) )
gdbm? ( sys-libs/gdbm:=[berkdb] )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? ( >=sys-libs/readline-4.1:= )
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
ssl? ( dev-libs/openssl:= )
tk? (
>=dev-lang/tcl-8.0:=
>=dev-lang/tk-8.0:=
dev-tcltk/blt:=
dev-tcltk/tix
)
xml? ( >=dev-libs/expat-2.1:= )
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
valgrind? ( dev-util/valgrind )
"
BDEPEND="
app-alternatives/awk
virtual/pkgconfig
verify-sig? ( sec-keys/openpgp-keys-python )
"
RDEPEND+="
!build? ( app-misc/mime-types )
"
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
QA_PKGCONFIG_VERSION=${PYVER}
pkg_setup() {
if use berkdb; then
ewarn "'bsddb' module is out-of-date and no longer maintained inside"
ewarn "dev-lang/python. 'bsddb' and 'dbhash' modules have been additionally"
ewarn "removed in Python 3. A maintained alternative of 'bsddb3' module"
ewarn "is provided by dev-python/bsddb3."
fi
}
src_unpack() {
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
fi
default
}
src_prepare() {
# Ensure that internal copies of expat, libffi and zlib are not used.
rm -r Modules/expat || die
rm -r Modules/_ctypes/libffi* || die
rm -r Modules/zlib || die
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
)
default
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" \
Lib/distutils/command/install.py \
Lib/distutils/sysconfig.py \
Lib/site.py \
Lib/sysconfig.py \
Lib/test/test_site.py \
Makefile.pre.in \
Modules/Setup.dist \
Modules/getpath.c \
setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@"
eautoreconf
}
src_configure() {
# dbm module can be linked against berkdb or gdbm.
# Defaults to gdbm when both are enabled, #204343.
local disable
use berkdb || use gdbm || disable+=" dbm"
use berkdb || disable+=" _bsddb"
# disable automagic bluetooth headers detection
use bluetooth || export ac_cv_header_bluetooth_bluetooth_h=no
use gdbm || disable+=" gdbm"
use ncurses || disable+=" _curses _curses_panel"
use readline || disable+=" readline"
use sqlite || disable+=" _sqlite3"
use ssl || export PYTHON_DISABLE_SSL="1"
use tk || disable+=" _tkinter"
use xml || disable+=" _elementtree pyexpat" # _elementtree uses pyexpat.
export PYTHON_DISABLE_MODULES="${disable}"
if ! use xml; then
ewarn "You have configured Python without XML support."
ewarn "This is NOT a recommended configuration as you"
ewarn "may face problems parsing any XML documents."
fi
if [[ -n "${PYTHON_DISABLE_MODULES}" ]]; then
einfo "Disabled modules: ${PYTHON_DISABLE_MODULES}"
fi
append-flags -fwrapv
filter-flags -malign-double
if tc-is-cross-compiler; then
# Force some tests that try to poke fs paths.
export ac_cv_file__dev_ptc=no
export ac_cv_file__dev_ptmx=yes
fi
# Export CXX so it ends up in /usr/lib/python2.X/config/Makefile.
tc-export CXX
# The configure script fails to use pkg-config correctly.
# http://bugs.python.org/issue15506
export ac_cv_path_PKG_CONFIG=$(tc-getPKG_CONFIG)
local dbmliborder=
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
if use berkdb; then
dbmliborder+="${dbmliborder:+:}bdb"
fi
local myeconfargs=(
# The check is broken on clang, and gives false positive:
# https://bugs.gentoo.org/596798
# (upstream dropped this flag in 3.2a4 anyway)
ac_cv_opt_olimit_ok=no
# glibc-2.30 removes it; since we can't cleanly force-rebuild
# Python on glibc upgrade, remove it proactively to give
# a chance for users rebuilding python before glibc
ac_cv_header_stropts_h=no
--with-fpectl
--enable-shared
--enable-ipv6
--with-threads
--enable-unicode=ucs4
--infodir='${prefix}/share/info'
--mandir='${prefix}/share/man'
--with-computed-gotos
--with-dbmliborder="${dbmliborder}"
--with-libc=
--enable-loadable-sqlite-extensions
--without-ensurepip
--with-system-expat
--with-system-ffi
$(use_with valgrind)
)
# disable implicit optimization/debugging flags
local -x OPT=
econf "${myeconfargs[@]}"
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
eerror "configure has detected that the sem_open function is broken."
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
die "Broken sem_open function (bug 496328)"
fi
# install epython.py as part of stdlib
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
# Avoid invoking pgen for cross-compiles.
touch Include/graminit.h Python/graminit.c || die
emake
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
# Skip failing tests.
local skipped_tests=( distutils gdb )
for test in "${skipped_tests[@]}"; do
mv Lib/test/test_${test}.py "${T}"/ || die
done
# bug 660358
local -x COLUMNS=80
# Daylight saving time problem
# https://bugs.python.org/issue22067
# https://bugs.gentoo.org/610628
local -x TZ=UTC
# Rerun failed tests in verbose mode (regrtest -w).
emake test EXTRATESTOPTS="-w" < /dev/tty
for test in "${skipped_tests[@]}"; do
mv "${T}/test_${test}.py" Lib/test/ || die
done
}
src_install() {
local libdir=${ED}/usr/$(get_libdir)/python${PYVER}
emake DESTDIR="${D}" altinstall
sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die
# Remove static library
rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
# Fix collisions between different slots of Python.
mv "${ED}/usr/bin/2to3" "${ED}/usr/bin/2to3-${PYVER}" || die
mv "${ED}/usr/bin/pydoc" "${ED}/usr/bin/pydoc${PYVER}" || die
mv "${ED}/usr/bin/idle" "${ED}/usr/bin/idle${PYVER}" || die
rm "${ED}/usr/bin/smtpd.py" || die
if ! use berkdb; then
rm -r "${libdir}/"{bsddb,dbhash.py*,test/test_bsddb*} || die
fi
if ! use sqlite; then
rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die
fi
if ! use tk; then
rm -r "${ED}/usr/bin/idle${PYVER}" || die
rm -r "${libdir}/"{idlelib,lib-tk} || die
fi
if ! use wininst; then
rm "${libdir}/distutils/command/"wininst-*.exe || die
fi
dodoc Misc/{ACKS,HISTORY,NEWS}
if use examples; then
docinto examples
dodoc -r Tools
fi
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
sed \
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
-e "s:@PYDOC@:pydoc${PYVER}:" \
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
# python2* is no longer wrapped, so just symlink it
local pymajor=${PYVER%.*}
dosym "python${PYVER}" "/usr/bin/python${pymajor}"
dosym "python${PYVER}-config" "/usr/bin/python${pymajor}-config"
}

View File

@ -4,7 +4,7 @@
EAPI="7"
WANT_LIBTOOL="none"
inherit autotools flag-o-matic multiprocessing pax-utils
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
inherit prefix python-utils-r1 toolchain-funcs verify-sig
MY_PV=${PV/_rc/rc}
@ -30,8 +30,8 @@ LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth build +ensurepip examples gdbm hardened lto +ncurses pgo
+readline +sqlite +ssl test tk valgrind wininst +xml
bluetooth build +ensurepip examples gdbm hardened libedit lto
+ncurses pgo +readline +sqlite +ssl test tk valgrind +xml
"
RESTRICT="!test? ( test )"
@ -43,7 +43,9 @@ RESTRICT="!test? ( test )"
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
dev-lang/python-exec[python_targets_python3_10(-)]
dev-libs/libffi:=
dev-python/gentoo-common
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
@ -51,7 +53,10 @@ RDEPEND="
ensurepip? ( dev-python/ensurepip-wheels )
gdbm? ( sys-libs/gdbm:=[berkdb] )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? ( >=sys-libs/readline-4.1:= )
readline? (
!libedit? ( >=sys-libs/readline-4.1:= )
libedit? ( dev-libs/libedit:= )
)
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
ssl? ( >=dev-libs/openssl-1.1.1:= )
tk? (
@ -61,13 +66,14 @@ RDEPEND="
dev-tcltk/tix
)
xml? ( >=dev-libs/expat-2.1:= )
!!<sys-apps/sandbox-2.21
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )
valgrind? ( dev-util/valgrind )
test? ( app-arch/xz-utils[extra-filters(+)] )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
@ -82,8 +88,19 @@ RDEPEND+="
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
# large file tests involve a 2.5G file being copied (duplicated)
CHECKREQS_DISK_BUILD=5500M
QA_PKGCONFIG_VERSION=${PYVER}
pkg_pretend() {
use test && check-reqs_pkg_pretend
}
pkg_setup() {
use test && check-reqs_pkg_setup
}
src_unpack() {
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
@ -111,10 +128,6 @@ src_prepare() {
sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
if ! use wininst; then
rm Lib/distutils/command/wininst*.exe || die
fi
eautoreconf
}
@ -144,7 +157,6 @@ src_configure() {
fi
append-flags -fwrapv
filter-flags -malign-double
# https://bugs.gentoo.org/700012
@ -161,6 +173,34 @@ src_configure() {
dbmliborder+="${dbmliborder:+:}gdbm"
fi
if use pgo; then
local profile_task_flags=(
-m test
"-j$(makeopts_jobs)"
--pgo-extended
-x test_gdb
-u-network
# All of these seem to occasionally hang for PGO inconsistently
# They'll even hang here but be fine in src_test sometimes.
# bug #828535 (and related: bug #788022)
-x test_asyncio
-x test_httpservers
-x test_logging
-x test_multiprocessing_fork
-x test_socket
-x test_xmlrpc
)
if has_version "app-arch/rpm" ; then
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
profile_task_flags+=(
-x test_distutils
)
fi
local -x PROFILE_TASK="${profile_task_flags[*]}"
fi
local myeconfargs=(
# glibc-2.30 removes it; since we can't cleanly force-rebuild
# Python on glibc upgrade, remove it proactively to give
@ -168,6 +208,7 @@ src_configure() {
ac_cv_header_stropts_h=no
--enable-shared
--without-static-libpython
--enable-ipv6
--infodir='${prefix}/share/info'
--mandir='${prefix}/share/man'
@ -180,6 +221,9 @@ src_configure() {
--with-system-ffi
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
$(use_with lto)
$(use_enable pgo optimizations)
$(use_with readline readline "$(usex libedit editline readline)")
$(use_with valgrind)
)
@ -203,6 +247,9 @@ src_configure() {
--libdir="${cbuild_libdir:2}"
# Avoid needing to load the right libpython.so.
--disable-shared
# As minimal as possible for the mini CBUILD Python
# we build just for cross.
--without-lto
@ -277,10 +324,26 @@ src_compile() {
# https://bugs.gentoo.org/823728
export SETUPTOOLS_USE_DISTUTILS=stdlib
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
# end up writing bytecode & violating sandbox.
# bug #831897
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
if use pgo ; then
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
addpredict "/usr/lib/python${PYVER}/site-packages"
fi
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Restore saved value from above.
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
@ -320,6 +383,8 @@ src_test() {
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
# workaround https://bugs.gentoo.org/775416
addwrite "/usr/lib/python${PYVER}/site-packages"
nonfatal emake test EXTRATESTOPTS="${test_opts[*]}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
@ -335,9 +400,6 @@ src_install() {
emake DESTDIR="${D}" altinstall
# Remove static library
rm "${ED}"/usr/$(get_libdir)/libpython*.a || die
# Fix collisions between different slots of Python.
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
@ -373,6 +435,8 @@ src_install() {
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
fi
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
dodoc Misc/{ACKS,HISTORY,NEWS}
if use examples; then

View File

@ -1,4 +1,4 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@ -45,6 +45,7 @@ RDEPEND="
app-arch/xz-utils:=
dev-lang/python-exec[python_targets_python3_10(-)]
dev-libs/libffi:=
dev-python/gentoo-common
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
@ -246,6 +247,9 @@ src_configure() {
--libdir="${cbuild_libdir:2}"
# Avoid needing to load the right libpython.so.
--disable-shared
# As minimal as possible for the mini CBUILD Python
# we build just for cross.
--without-lto
@ -431,6 +435,8 @@ src_install() {
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
fi
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
dodoc Misc/{ACKS,HISTORY,NEWS}
if use examples; then

View File

@ -1,4 +1,4 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@ -46,6 +46,7 @@ RDEPEND="
app-crypt/libb2
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
dev-python/gentoo-common
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
@ -235,6 +236,9 @@ src_configure() {
--libdir="${cbuild_libdir:2}"
# Avoid needing to load the right libpython.so.
--disable-shared
# As minimal as possible for the mini CBUILD Python
# we build just for cross to satisfy --with-build-python.
--without-lto
@ -444,6 +448,8 @@ src_install() {
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
fi
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
dodoc Misc/{ACKS,HISTORY,NEWS}
if use examples; then

View File

@ -0,0 +1,515 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
WANT_LIBTOOL="none"
inherit autotools check-reqs flag-o-matic multiprocessing pax-utils
inherit prefix python-utils-r1 toolchain-funcs verify-sig
MY_PV=${PV/_rc/rc}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.asc
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth build +ensurepip examples gdbm hardened libedit lto
+ncurses pgo +readline +sqlite +ssl test tk valgrind
"
RESTRICT="!test? ( test )"
# Do not add a dependency on dev-lang/python to this ebuild.
# If you need to apply a patch which requires python for bootstrapping, please
# run the bootstrap code on your dev box and include the results in the
# patchset. See bug 447752.
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
app-crypt/libb2
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
dev-python/gentoo-common
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
virtual/libintl
ensurepip? ( dev-python/ensurepip-wheels )
gdbm? ( sys-libs/gdbm:=[berkdb] )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? (
!libedit? ( >=sys-libs/readline-4.1:= )
libedit? ( dev-libs/libedit:= )
)
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
ssl? ( >=dev-libs/openssl-1.1.1:= )
tk? (
>=dev-lang/tcl-8.0:=
>=dev-lang/tk-8.0:=
dev-tcltk/blt:=
dev-tcltk/tix
)
!!<sys-apps/sandbox-2.21
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? ( app-arch/xz-utils[extra-filters(+)] )
valgrind? ( dev-util/valgrind )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
sys-devel/autoconf-archive
app-alternatives/awk
virtual/pkgconfig
verify-sig? ( sec-keys/openpgp-keys-python )
"
RDEPEND+="
!build? ( app-misc/mime-types )
"
if [[ ${PV} != *_alpha* ]]; then
RDEPEND+="
dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
"
fi
VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/python.org.asc
# large file tests involve a 2.5G file being copied (duplicated)
CHECKREQS_DISK_BUILD=5500M
QA_PKGCONFIG_VERSION=${PYVER}
pkg_pretend() {
use test && check-reqs_pkg_pretend
}
pkg_setup() {
use test && check-reqs_pkg_setup
}
src_unpack() {
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.asc}
fi
default
}
src_prepare() {
# Ensure that internal copies of expat and libffi are not used.
rm -r Modules/expat || die
rm -r Modules/_ctypes/libffi* || die
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
)
default
# https://bugs.gentoo.org/850151
sed -i -e "s:@@GENTOO_LIBDIR@@:$(get_libdir):g" setup.py || die
# force the correct number of jobs
# https://bugs.gentoo.org/737660
local jobs=$(makeopts_jobs)
sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
eautoreconf
}
src_configure() {
local disable
# disable automagic bluetooth headers detection
if ! use bluetooth; then
local -x ac_cv_header_bluetooth_bluetooth_h=no
fi
append-flags -fwrapv
filter-flags -malign-double
# https://bugs.gentoo.org/700012
if is-flagq -flto || is-flagq '-flto=*'; then
append-cflags $(test-flags-CC -ffat-lto-objects)
fi
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
# PKG_CONFIG needed for cross.
tc-export CXX PKG_CONFIG
local dbmliborder=
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
if use pgo; then
local profile_task_flags=(
-m test
"-j$(makeopts_jobs)"
--pgo-extended
-x test_gdb
-u-network
# All of these seem to occasionally hang for PGO inconsistently
# They'll even hang here but be fine in src_test sometimes.
# bug #828535 (and related: bug #788022)
-x test_asyncio
-x test_httpservers
-x test_logging
-x test_multiprocessing_fork
-x test_socket
-x test_xmlrpc
)
if has_version "app-arch/rpm" ; then
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
profile_task_flags+=(
-x test_distutils
)
fi
local -x PROFILE_TASK="${profile_task_flags[*]}"
fi
local myeconfargs=(
# glibc-2.30 removes it; since we can't cleanly force-rebuild
# Python on glibc upgrade, remove it proactively to give
# a chance for users rebuilding python before glibc
ac_cv_header_stropts_h=no
--enable-shared
--without-static-libpython
--enable-ipv6
--infodir='${prefix}/share/info'
--mandir='${prefix}/share/man'
--with-computed-gotos
--with-dbmliborder="${dbmliborder}"
--with-libc=
--enable-loadable-sqlite-extensions
--without-ensurepip
--with-system-expat
--with-system-ffi
--with-platlibdir=lib
--with-pkg-config=yes
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
$(use_with lto)
$(use_enable pgo optimizations)
$(use_with readline readline "$(usex libedit editline readline)")
$(use_with valgrind)
)
# disable implicit optimization/debugging flags
local -x OPT=
if tc-is-cross-compiler ; then
# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
# propagated to sysconfig for built extensions
local -x CFLAGS_NODIST=${CFLAGS_FOR_BUILD}
local -x LDFLAGS_NODIST=${LDFLAGS_FOR_BUILD}
local -x CFLAGS= LDFLAGS=
# We need to build our own Python on CBUILD first, and feed it in.
# bug #847910
local myeconfargs_cbuild=(
"${myeconfargs[@]}"
--libdir="${cbuild_libdir:2}"
# Avoid needing to load the right libpython.so.
--disable-shared
# As minimal as possible for the mini CBUILD Python
# we build just for cross to satisfy --with-build-python.
--without-lto
--without-readline
--disable-optimizations
)
myeconfargs+=(
# Point the imminent CHOST build to the Python we just
# built for CBUILD.
--with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
)
mkdir "${WORKDIR}"/${P}-${CBUILD} || die
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
# We disable _ctypes and _crypt for CBUILD because Python's setup.py can't handle locating
# libdir correctly for cross.
PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" \
ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
# Avoid as many dependencies as possible for the cross build.
cat >> Makefile <<-EOF || die
MODULE_NIS_STATE=disabled
MODULE__DBM_STATE=disabled
MODULE__GDBM_STATE=disabled
MODULE__DBM_STATE=disabled
MODULE__SQLITE3_STATE=disabled
MODULE__HASHLIB_STATE=disabled
MODULE__SSL_STATE=disabled
MODULE__CURSES_STATE=disabled
MODULE__CURSES_PANEL_STATE=disabled
MODULE_READLINE_STATE=disabled
MODULE__TKINTER_STATE=disabled
MODULE_PYEXPAT_STATE=disabled
MODULE_ZLIB_STATE=disabled
EOF
# Unfortunately, we do have to build this immediately, and
# not in src_compile, because CHOST configure for Python
# will check the existence of the --with-build-python value
# immediately.
PYTHON_DISABLE_MODULES="${PYTHON_DISABLE_MODULES} _ctypes _crypt" emake
popd &> /dev/null || die
fi
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
# propagated to sysconfig for built extensions
local -x CFLAGS_NODIST=${CFLAGS}
local -x LDFLAGS_NODIST=${LDFLAGS}
local -x CFLAGS= LDFLAGS=
# Fix implicit declarations on cross and prefix builds. Bug #674070.
if use ncurses; then
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
fi
hprefixify setup.py
econf "${myeconfargs[@]}"
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
eerror "configure has detected that the sem_open function is broken."
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
die "Broken sem_open function (bug 496328)"
fi
# force-disable modules we don't want built
local disable_modules=( NIS )
use gdbm || disable_modules+=( _GDBM _DBM )
use sqlite || disable_modules+=( _SQLITE3 )
use ssl || disable_modules+=( _HASHLIB _SSL )
use ncurses || disable_modules+=( _CURSES _CURSES_PANEL )
use readline || disable_modules+=( READLINE )
use tk || disable_modules+=( _TKINTER )
local mod
for mod in "${disable_modules[@]}"; do
echo "MODULE_${mod}_STATE=disabled"
done >> Makefile || die
# install epython.py as part of stdlib
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
# Prevent using distutils bundled by setuptools.
# https://bugs.gentoo.org/823728
export SETUPTOOLS_USE_DISTUTILS=stdlib
export PYTHONSTRICTEXTENSIONBUILD=1
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
# end up writing bytecode & violating sandbox.
# bug #831897
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
if use pgo ; then
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
addpredict "/usr/lib/python${PYVER}/site-packages"
fi
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Restore saved value from above.
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
# this just happens to skip test_support.test_freeze that is broken
# without bundled expat
# TODO: get a proper skip for it upstream
local -x LOGNAME=buildbot
local test_opts=(
-u-network
-j "$(makeopts_jobs)"
# fails
-x test_gdb
)
if use sparc ; then
# bug #788022
test_opts+=(
-x test_multiprocessing_fork
-x test_multiprocessing_forkserver
)
fi
# workaround docutils breaking tests
cat > Lib/docutils.py <<-EOF || die
raise ImportError("Thou shalt not import!")
EOF
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
# workaround https://bugs.gentoo.org/775416
addwrite "/usr/lib/python${PYVER}/site-packages"
nonfatal emake test EXTRATESTOPTS="${test_opts[*]}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
local ret=${?}
rm Lib/docutils.py || die
[[ ${ret} -eq 0 ]] || die "emake test failed"
}
src_install() {
local libdir=${ED}/usr/lib/python${PYVER}
# -j1 hack for now for bug #843458
emake -j1 DESTDIR="${D}" altinstall
# Fix collisions between different slots of Python.
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
# Cheap hack to get version with ABIFLAGS
local abiver=$(cd "${ED}/usr/include"; echo python*)
if [[ ${abiver} != python${PYVER} ]]; then
# Replace python3.X with a symlink to python3.Xm
rm "${ED}/usr/bin/python${PYVER}" || die
dosym "${abiver}" "/usr/bin/python${PYVER}"
# Create python3.X-config symlink
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
# Create python-3.5m.pc symlink
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
fi
# python seems to get rebuilt in src_install (bug 569908)
# Work around it for now.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E "${ED}/usr/bin/${abiver}"
else
pax-mark m "${ED}/usr/bin/${abiver}"
fi
rm -r "${libdir}"/ensurepip/_bundled || die
if ! use ensurepip; then
rm -r "${libdir}"/ensurepip || die
fi
if ! use sqlite; then
rm -r "${libdir}/"sqlite3 || die
fi
if ! use tk; then
rm -r "${ED}/usr/bin/idle${PYVER}" || die
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
fi
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
dodoc Misc/{ACKS,HISTORY,NEWS}
if use examples; then
docinto examples
find Tools -name __pycache__ -exec rm -fr {} + || die
dodoc -r Tools
fi
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
local libname=$(
printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
emake --no-print-directory -s -f - 2>/dev/null
)
newins Tools/gdb/libpython.py "${libname}"-gdb.py
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
sed \
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
-e "s:@PYDOC@:pydoc${PYVER}:" \
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
# python-exec wrapping support
local pymajor=${PYVER%.*}
local EPYTHON=python${PYVER}
local scriptdir=${D}$(python_get_scriptdir)
mkdir -p "${scriptdir}" || die
# python and pythonX
ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
ln -s "python${pymajor}" "${scriptdir}/python" || die
# python-config and pythonX-config
# note: we need to create a wrapper rather than symlinking it due
# to some random dirname(argv[0]) magic performed by python-config
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
#!/bin/sh
exec "${abiver}-config" "\${@}"
EOF
chmod +x "${scriptdir}/python${pymajor}-config" || die
ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
# 2to3, pydoc
ln -s "../../../bin/2to3-${PYVER}" "${scriptdir}/2to3" || die
ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
# idle
if use tk; then
ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
fi
}
pkg_postinst() {
local v
for v in ${REPLACING_VERSIONS}; do
if ver_test "${v}" -lt 3.11.0_beta4-r2; then
ewarn "Python 3.11.0b4 has changed its module ABI. The .pyc files"
ewarn "installed previously are no longer valid and will be regenerated"
ewarn "(or ignored) on the next import. This may cause sandbox failures"
ewarn "when installing some packages and checksum mismatches when removing"
ewarn "old versions. To actively prevent this, rebuild all packages"
ewarn "installing Python 3.11 modules, e.g. using:"
ewarn
ewarn " emerge -1v /usr/lib/python3.11/site-packages"
fi
done
}

View File

@ -46,6 +46,7 @@ RDEPEND="
app-crypt/libb2
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
dev-python/gentoo-common
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
@ -229,6 +230,9 @@ src_configure() {
--libdir="${cbuild_libdir:2}"
# Avoid needing to load the right libpython.so.
--disable-shared
# As minimal as possible for the mini CBUILD Python
# we build just for cross to satisfy --with-build-python.
--without-lto
@ -439,6 +443,8 @@ src_install() {
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
fi
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
dodoc Misc/{ACKS,HISTORY,NEWS}
if use examples; then

View File

@ -1,4 +1,4 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@ -46,6 +46,7 @@ RDEPEND="
app-crypt/libb2
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
dev-python/gentoo-common
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
@ -116,7 +117,6 @@ src_prepare() {
# Ensure that internal copies of expat and libffi are not used.
# TODO: Makefile has annoying deps on expat headers
#rm -r Modules/expat || die
rm -r Modules/_ctypes/libffi* || die
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
@ -200,7 +200,6 @@ src_configure() {
--enable-loadable-sqlite-extensions
--without-ensurepip
--with-system-expat
--with-system-ffi
--with-platlibdir=lib
--with-pkg-config=yes
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
@ -231,6 +230,9 @@ src_configure() {
--libdir="${cbuild_libdir:2}"
# Avoid needing to load the right libpython.so.
--disable-shared
# As minimal as possible for the mini CBUILD Python
# we build just for cross to satisfy --with-build-python.
--without-lto
@ -441,6 +443,8 @@ src_install() {
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
fi
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
dodoc Misc/{ACKS,HISTORY,NEWS}
if use examples; then

View File

@ -111,6 +111,10 @@ src_prepare() {
sed -i -e "s:-j0:-j${jobs}:" Makefile.pre.in || die
sed -i -e "/self\.parallel/s:True:${jobs}:" setup.py || die
if ! use wininst; then
rm Lib/distutils/command/wininst*.exe || die
fi
eautoreconf
}
@ -199,6 +203,9 @@ src_configure() {
--libdir="${cbuild_libdir:2}"
# Avoid needing to load the right libpython.so.
--disable-shared
# As minimal as possible for the mini CBUILD Python
# we build just for cross.
--without-lto
@ -368,9 +375,6 @@ src_install() {
rm -r "${ED}/usr/bin/idle${PYVER}" || die
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
fi
if ! use wininst; then
rm "${libdir}/distutils/command/"wininst-*.exe || die
fi
dodoc Misc/{ACKS,HISTORY,NEWS}

View File

@ -1,4 +1,4 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@ -45,6 +45,7 @@ RDEPEND="
app-arch/xz-utils:=
dev-lang/python-exec[python_targets_python3_9(-)]
dev-libs/libffi:=
dev-python/gentoo-common
sys-apps/util-linux:=
>=sys-libs/zlib-1.1.3:=
virtual/libcrypt:=
@ -240,6 +241,9 @@ src_configure() {
--libdir="${cbuild_libdir:2}"
# Avoid needing to load the right libpython.so.
--disable-shared
# As minimal as possible for the mini CBUILD Python
# we build just for cross.
--without-lto
@ -426,6 +430,8 @@ src_install() {
rm -r "${libdir}/"{idlelib,tkinter,test/test_tk*} || die
fi
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
dodoc Misc/{ACKS,HISTORY,NEWS}
if use examples; then

View File

@ -1,3 +1 @@
DIST jsoncpp-1.9.3.tar.gz 212922 BLAKE2B 6f89762e899ffe127705a30c1fe86f458d62fa05b8dbde6c465c73b6855d3945f3d739ff0c26e1a6326a211c946277908684ace9363df72ba0f460f66b3e3fd8 SHA512 f1c035d54ed952d8d4e41acab5c3ecf6aa445f348f98aeac2e7c89555ec2f6421d727b3bc4c2f54176afce137c545b20d886562901953ec091f91890e91e8559
DIST jsoncpp-1.9.4.tar.gz 214057 BLAKE2B 9a8c52e5d0b78f1593c93bc40f48d3789b031ba0da519c99cce17f1f6e104b24e0ffe88138c25da6dfa250586aeb9e98d00fbf74d9fb9309b29a6d4f17762263 SHA512 adfd4afbdf6b79bd37edcf0e248f07864994f1c4bcb7431f3b44102490ce467f72381908066655fa486dec12f467af0a11f42f859bbf719895974c7339db7d22
DIST jsoncpp-1.9.5.tar.gz 216055 BLAKE2B 744275297647be8f1ac7bbf6c818e5106fc122591b3fb68c37cf33f5b3b7d6666e8429bb7ca2ae693202a5a83c274303804e21ebb27f05ba235568bf75a9b375 SHA512 1d06e044759b1e1a4cc4960189dd7e001a0a4389d7239a6d59295af995a553518e4e0337b4b4b817e70da5d9731a4c98655af90791b6287870b5ff8d73ad8873

View File

@ -1,45 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7..9} )
inherit meson python-any-r1
DESCRIPTION="C++ JSON reader and writer"
HOMEPAGE="https://github.com/open-source-parsers/jsoncpp"
SRC_URI="
https://github.com/open-source-parsers/${PN}/archive/${PV}.tar.gz
-> ${P}.tar.gz"
LICENSE="|| ( public-domain MIT )"
SLOT="0/24"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="doc test"
RESTRICT="!test? ( test )"
BDEPEND="
${PYTHON_DEPS}
doc? ( app-doc/doxygen )"
RDEPEND=""
src_configure() {
local emesonargs=(
# Follow Debian, Ubuntu, Arch convention for headers location
# bug #452234
--includedir include/jsoncpp
-Dtests=$(usex test true false)
)
meson_src_configure
}
src_compile() {
meson_src_compile
if use doc; then
echo "${PV}" > version || die
"${EPYTHON}" doxybuild.py --doxygen="${EPREFIX}"/usr/bin/doxygen || die
HTML_DOCS=( dist/doxygen/jsoncpp*/. )
fi
}

View File

@ -1,50 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7..9} )
inherit meson python-any-r1
DESCRIPTION="C++ JSON reader and writer"
HOMEPAGE="https://github.com/open-source-parsers/jsoncpp"
SRC_URI="
https://github.com/open-source-parsers/${PN}/archive/${PV}.tar.gz
-> ${P}.tar.gz"
LICENSE="|| ( public-domain MIT )"
SLOT="0/24"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc test"
RESTRICT="!test? ( test )"
BDEPEND="
${PYTHON_DEPS}
doc? ( app-doc/doxygen )"
RDEPEND=""
src_configure() {
local emesonargs=(
# Follow Debian, Ubuntu, Arch convention for headers location
# bug #452234
--includedir include/jsoncpp
-Dtests=$(usex test true false)
)
meson_src_configure
}
src_compile() {
meson_src_compile
if use doc; then
echo "${PV}" > version || die
"${EPYTHON}" doxybuild.py --doxygen="${EPREFIX}"/usr/bin/doxygen || die
HTML_DOCS=( dist/doxygen/jsoncpp*/. )
fi
}
src_test() {
# increase test timeout due to failures on slower hardware
meson_src_test -t 2
}

View File

@ -1,9 +1,9 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{8..10} )
PYTHON_COMPAT=( python3_{9..11} )
inherit meson python-any-r1
DESCRIPTION="C++ JSON reader and writer"
@ -14,7 +14,7 @@ SRC_URI="
LICENSE="|| ( public-domain MIT )"
SLOT="0/25"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="doc test"
RESTRICT="!test? ( test )"

View File

@ -6,6 +6,7 @@
<name>Michał Górny</name>
</maintainer>
<upstream>
<remote-id type="cpe">cpe:/a:jsoncpp_project:jsoncpp</remote-id>
<remote-id type="github">open-source-parsers/jsoncpp</remote-id>
<remote-id type="sourceforge">jsoncpp</remote-id>
</upstream>

View File

@ -1,2 +1 @@
DIST libnl-1.1.4.tar.gz 1174974 BLAKE2B e6466e15db17fe4725674d77c6cdcefac73e51346f6f4378bc3ea8409c1534519cc28f1123c8201e78f6b95254701a2f9591f907b3cc597ac1210fd3f8b832ea SHA512 25e26ddcc16540346ea34815ab6ac094177e5cee2eb3d843c4f8b30cd9d83390a3e87cb46046dc3bd9ae4d21f77e57bb3827c2cfc588eb18afe049921f2030b4
DIST libnl-3.5.0.tar.gz 967835 BLAKE2B cf21c1ffa89799b91bf4bddb8833d5af5c62eb1c53a078ee55a2888bd8439e1ae6db8886c9c4f937297962faac6873b4cf5211ee3d1e5354d96b5dc545a6fc2d SHA512 9c94c09bac34297493b3ea482713d7c0865d2839b5042e5c7d1ed008e2402ab63df35a18e272f40b2cce27d0c31dc733fe7e4b2d376e7ca847a2b0d5e90de50c
DIST libnl-3.7.0.tar.gz 1000913 BLAKE2B 22c418ea520416d79ee4552ab6bc5ba99239b29e074c840d31b0ec4171a0403ea9d2c1afcbf1b3428564dd371cadd99bc062ae7540e7496f970c4fb98f967e84 SHA512 80fbbc079299c90afd2a5eda62e4d4f98bf4ef23958c3ce5101f4ed4d81d783af733213bb3bab15f218555d8460bc2394898f909f4ac024fc27281faec86a041

View File

@ -1,11 +0,0 @@
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -48,7 +48,7 @@
$(OUT_SLIB): ../Makefile.opts $(OBJ)
@echo " LD $(OUT_SLIB)"; \
- $(CC) -shared -Wl,-soname,libnl.so.1 -o $(OUT_SLIB) $(OBJ) $(LIBNL_LIB) -lc
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,libnl.so.1 -o $(OUT_SLIB) $(OBJ) $(LIBNL_LIB) -lc
@echo " LN $(OUT_SLIB) $(LN1_SLIB)"; \
rm -f $(LN1_SLIB) ; $(LN) -s $(OUT_SLIB) $(LN1_SLIB)
@echo " LN $(LN1_SLIB) $(LN_SLIB)"; \

View File

@ -1,80 +0,0 @@
From: Patrick McHardy <kaber@trash.net>
Date: Fri, 18 Jan 2008 16:55:48 +0000 (+0100)
Subject: [LIBNL]: Add if_vlan.h
X-Git-Url: http://git.kernel.org/?p=libs%2Fnetlink%2Flibnl.git;a=commitdiff_plain;h=e91bb2ffb090955d443e643a25b250bf3d33534a;hp=7f6b7a8eea0334b34d58dec72c66121a76f08958
[LIBNL]: Add if_vlan.h
vlan support needs VLAN_FLAG_REORDER_HDR, which is not available in
older if_vlan.h versions. Add the current version from the kernel.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
new file mode 100644
index 0000000..068cd7b
--- /dev/null
+++ include/linux/if_vlan.h
@@ -0,0 +1,61 @@
+/*
+ * VLAN An implementation of 802.1Q VLAN tagging.
+ *
+ * Authors: Ben Greear <greearb@candelatech.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ */
+
+#ifndef _LINUX_IF_VLAN_H_
+#define _LINUX_IF_VLAN_H_
+
+
+/* VLAN IOCTLs are found in sockios.h */
+
+/* Passed in vlan_ioctl_args structure to determine behaviour. */
+enum vlan_ioctl_cmds {
+ ADD_VLAN_CMD,
+ DEL_VLAN_CMD,
+ SET_VLAN_INGRESS_PRIORITY_CMD,
+ SET_VLAN_EGRESS_PRIORITY_CMD,
+ GET_VLAN_INGRESS_PRIORITY_CMD,
+ GET_VLAN_EGRESS_PRIORITY_CMD,
+ SET_VLAN_NAME_TYPE_CMD,
+ SET_VLAN_FLAG_CMD,
+ GET_VLAN_REALDEV_NAME_CMD, /* If this works, you know it's a VLAN device, btw */
+ GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */
+};
+
+enum vlan_flags {
+ VLAN_FLAG_REORDER_HDR = 0x1,
+};
+
+enum vlan_name_types {
+ VLAN_NAME_TYPE_PLUS_VID, /* Name will look like: vlan0005 */
+ VLAN_NAME_TYPE_RAW_PLUS_VID, /* name will look like: eth1.0005 */
+ VLAN_NAME_TYPE_PLUS_VID_NO_PAD, /* Name will look like: vlan5 */
+ VLAN_NAME_TYPE_RAW_PLUS_VID_NO_PAD, /* Name will look like: eth0.5 */
+ VLAN_NAME_TYPE_HIGHEST
+};
+
+struct vlan_ioctl_args {
+ int cmd; /* Should be one of the vlan_ioctl_cmds enum above. */
+ char device1[24];
+
+ union {
+ char device2[24];
+ int VID;
+ unsigned int skb_priority;
+ unsigned int name_type;
+ unsigned int bind_type;
+ unsigned int flag; /* Matches vlan_dev_info flags */
+ } u;
+
+ short vlan_qos;
+};
+
+#endif /* !(_LINUX_IF_VLAN_H_) */

View File

@ -1,12 +0,0 @@
--- a/include/netlink-local.h
+++ b/include/netlink-local.h
@@ -343,7 +343,9 @@
}
#define ARRAY_SIZE(X) (sizeof(X) / sizeof((X)[0]))
+#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
#define __init __attribute__ ((constructor))
#define __exit __attribute__ ((destructor))

View File

@ -1,42 +0,0 @@
--- a/python/netlink/route/links/bridge.py
+++ b/python/netlink/route/links/bridge.py
@@ -6,7 +6,7 @@
"""
-from __future__ import absolute_import
+
from ... import core as netlink
from .. import capi as capi
@@ -19,10 +19,10 @@
def bridge_assert_ext_info(self):
if self._has_ext_info == False:
- print """
+ print("""
Please update your kernel to be able to call this method.
Your current kernel bridge version is too old to support this extention.
- """
+ """)
raise RuntimeWarning()
def port_state2str(self, state):
--- a/doc/resolve-asciidoc-refs.py
+++ b/doc/resolve-asciidoc-refs.py
@@ -22,4 +22,4 @@
rc = re.compile('|'.join(map(re.escape, sorted(refs, reverse=True))))
for line in open(sys.argv[1], 'r'):
- print rc.sub(translate, line),
+ print(rc.sub(translate, line), end=' ')
--- a/doc/doxygen-link.py
+++ b/doc/doxygen-link.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-from __future__ import print_function
+
import fileinput
import re
import sys

View File

@ -1,61 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit toolchain-funcs
DESCRIPTION="Libraries providing APIs to netlink protocol based Linux kernel interfaces"
HOMEPAGE="https://www.infradead.org/~tgr/libnl/"
SRC_URI="http://www.infradead.org/~tgr/libnl/files/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="1.1"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="doc static-libs"
DEPEND="doc? ( app-doc/doxygen )"
DOCS=( ChangeLog )
PATCHES=(
"${FILESDIR}"/${PN}-1.1-vlan-header.patch
"${FILESDIR}"/${PN}-1.1-flags.patch
"${FILESDIR}"/${PN}-1.1.3-offsetof.patch
)
src_prepare() {
default
sed -i \
-e '/@echo/d' \
Makefile.rules {lib,src,tests}/Makefile || die
sed -i \
-e 's|-g ||g' \
Makefile.opts.in || die
if ! use static-libs; then
sed -i lib/Makefile -e '/OUT_AR/d' || die
fi
rm -f lib/libnl.a || die
}
src_compile() {
emake AR="$(tc-getAR)"
if use doc ; then
cd "${S}/doc" || die
emake gendoc
fi
}
src_install() {
default
if use doc ; then
cd "${S}/doc" || die
docinto html
dodoc -r html/*
fi
}

View File

@ -1,60 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit git-r3 toolchain-funcs
DESCRIPTION="Libraries providing APIs to netlink protocol based Linux kernel interfaces"
HOMEPAGE="https://www.infradead.org/~tgr/libnl/"
EGIT_REPO_URI="https://github.com/tgraf/libnl-1.1-stable"
LICENSE="LGPL-2.1"
SLOT="1.1"
IUSE="doc static-libs"
BDEPEND="doc? ( app-doc/doxygen )"
DOCS=( ChangeLog )
PATCHES=(
"${FILESDIR}"/${PN}-1.1-vlan-header.patch
"${FILESDIR}"/${PN}-1.1-flags.patch
"${FILESDIR}"/${PN}-1.1.3-offsetof.patch
)
src_prepare() {
default
sed -i \
-e '/@echo/d' \
Makefile.rules {lib,src,tests}/Makefile || die
sed -i \
-e 's|-g ||g' \
Makefile.opts.in || die
if ! use static-libs ; then
sed -i lib/Makefile -e '/OUT_AR/d' || die
fi
rm -f lib/libnl.a || die
}
src_compile() {
emake AR="$(tc-getAR)"
if use doc ; then
cd "${S}/doc" || die
emake gendoc
fi
}
src_install() {
default
if use doc ; then
cd "${S}/doc" || die
docinto html
dodoc -r html/*
fi
}

View File

@ -1,11 +1,12 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
PYTHON_COMPAT=( python3_{7,8,9} )
DISTUTILS_OPTIONAL=1
inherit distutils-r1 libtool multilib-minimal
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..10} )
inherit autotools distutils-r1 multilib-minimal
LIBNL_P=${P/_/-}
LIBNL_DIR=${PV/_/}
@ -13,28 +14,33 @@ LIBNL_DIR=${LIBNL_DIR//./_}
DESCRIPTION="Libraries providing APIs to netlink protocol based Linux kernel interfaces"
HOMEPAGE="https://www.infradead.org/~tgr/libnl/ https://github.com/thom311/libnl"
SRC_URI="https://github.com/thom311/${PN}/releases/download/${PN}${LIBNL_DIR}/${P/_rc/-rc}.tar.gz"
S="${WORKDIR}/${LIBNL_P}"
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/thom311/libnl"
inherit git-r3
else
SRC_URI="https://github.com/thom311/${PN}/releases/download/${PN}${LIBNL_DIR}/${P/_rc/-rc}.tar.gz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
S="${WORKDIR}/${LIBNL_P}"
fi
LICENSE="LGPL-2.1 utils? ( GPL-2 )"
SLOT="3"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="+debug static-libs python test +threads utils"
IUSE="+debug python test utils"
RESTRICT="!test? ( test )"
RDEPEND="python? ( ${PYTHON_DEPS} )"
DEPEND="${RDEPEND}"
BDEPEND="
${RDEPEND}
python? ( dev-lang/swig )
test? ( dev-libs/check )
BDEPEND="${RDEPEND}
sys-devel/bison
sys-devel/flex
"
python? (
${DISTUTILS_DEPS}
dev-lang/swig
)
test? ( dev-libs/check )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
DOCS=( ChangeLog )
MULTILIB_WRAPPED_HEADERS=(
# we do not install CLI stuff for non-native
/usr/include/libnl3/netlink/cli/addr.h
@ -43,6 +49,7 @@ MULTILIB_WRAPPED_HEADERS=(
/usr/include/libnl3/netlink/cli/ct.h
/usr/include/libnl3/netlink/cli/exp.h
/usr/include/libnl3/netlink/cli/link.h
/usr/include/libnl3/netlink/cli/mdb.h
/usr/include/libnl3/netlink/cli/neigh.h
/usr/include/libnl3/netlink/cli/qdisc.h
/usr/include/libnl3/netlink/cli/route.h
@ -54,47 +61,53 @@ MULTILIB_WRAPPED_HEADERS=(
src_prepare() {
default
elibtoolize
eautoreconf
if use python; then
cd "${S}"/python || die
pushd "${S}"/python > /dev/null || die
distutils-r1_src_prepare
popd > /dev/null || die
fi
# out-of-source build broken
# https://github.com/thom311/libnl/pull/58
multilib_copy_sources
}
multilib_src_configure() {
econf \
# bug #884277
export YACC=yacc.bison
ECONF_SOURCE="${S}" econf \
$(multilib_native_use_enable utils cli) \
$(use_enable debug) \
$(use_enable static-libs static) \
$(use_enable threads)
$(use_enable debug)
}
multilib_src_compile() {
default
if multilib_is_native_abi && use python; then
cd python || die
if multilib_is_native_abi && use python ; then
pushd python > /dev/null || die
distutils-r1_src_compile
popd > /dev/null || die
fi
}
multilib_src_install() {
emake DESTDIR="${D}" install
default
if multilib_is_native_abi && use python; then
if multilib_is_native_abi && use python ; then
# Unset DOCS= since distutils-r1.eclass interferes
local DOCS=()
cd python || die
pushd python > /dev/null || die
distutils-r1_src_install
popd > /dev/null || die
fi
}
multilib_src_install_all() {
DOCS=( ChangeLog )
einstalldocs
find "${ED}" -name '*.la' -delete || die
}

View File

@ -1,35 +1,46 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
PYTHON_COMPAT=( python3_{7,8,9} )
DISTUTILS_OPTIONAL=1
inherit autotools distutils-r1 git-r3 multilib-minimal
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..10} )
inherit autotools distutils-r1 multilib-minimal
LIBNL_P=${P/_/-}
LIBNL_DIR=${PV/_/}
LIBNL_DIR=${LIBNL_DIR//./_}
DESCRIPTION="Libraries providing APIs to netlink protocol based Linux kernel interfaces"
HOMEPAGE="https://www.infradead.org/~tgr/libnl/ https://github.com/thom311/libnl"
EGIT_REPO_URI="https://github.com/thom311/libnl"
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://github.com/thom311/libnl"
inherit git-r3
else
SRC_URI="https://github.com/thom311/${PN}/releases/download/${PN}${LIBNL_DIR}/${P/_rc/-rc}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
S="${WORKDIR}/${LIBNL_P}"
fi
LICENSE="LGPL-2.1 utils? ( GPL-2 )"
SLOT="3"
KEYWORDS=""
IUSE="+debug static-libs python test +threads utils"
IUSE="+debug python test utils"
RESTRICT="!test? ( test )"
RDEPEND="python? ( ${PYTHON_DEPS} )"
DEPEND="${RDEPEND}"
BDEPEND="
${RDEPEND}
BDEPEND="${RDEPEND}
sys-devel/bison
sys-devel/flex
python? ( dev-lang/swig )
test? ( dev-libs/check )
"
python? (
${DISTUTILS_DEPS}
dev-lang/swig
)
test? ( dev-libs/check )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
DOCS=( ChangeLog )
MULTILIB_WRAPPED_HEADERS=(
# we do not install CLI stuff for non-native
/usr/include/libnl3/netlink/cli/addr.h
@ -38,6 +49,7 @@ MULTILIB_WRAPPED_HEADERS=(
/usr/include/libnl3/netlink/cli/ct.h
/usr/include/libnl3/netlink/cli/exp.h
/usr/include/libnl3/netlink/cli/link.h
/usr/include/libnl3/netlink/cli/mdb.h
/usr/include/libnl3/netlink/cli/neigh.h
/usr/include/libnl3/netlink/cli/qdisc.h
/usr/include/libnl3/netlink/cli/route.h
@ -46,10 +58,6 @@ MULTILIB_WRAPPED_HEADERS=(
/usr/include/libnl3/netlink/cli/utils.h
)
PATCHES=(
"${FILESDIR}"/${PN}-99999999-2to3.patch
)
src_prepare() {
default
@ -60,25 +68,18 @@ src_prepare() {
distutils-r1_src_prepare
popd > /dev/null || die
fi
# out-of-source build broken
# https://github.com/thom311/libnl/pull/58
multilib_copy_sources
}
multilib_src_configure() {
econf \
ECONF_SOURCE="${S}" econf \
$(multilib_native_use_enable utils cli) \
$(use_enable debug) \
$(use_enable static-libs static) \
$(use_enable threads) \
--disable-doc
$(use_enable debug)
}
multilib_src_compile() {
default
if multilib_is_native_abi && use python; then
if multilib_is_native_abi && use python ; then
pushd python > /dev/null || die
distutils-r1_src_compile
popd > /dev/null || die
@ -88,7 +89,7 @@ multilib_src_compile() {
multilib_src_install() {
default
if multilib_is_native_abi && use python; then
if multilib_is_native_abi && use python ; then
# Unset DOCS= since distutils-r1.eclass interferes
local DOCS=()
@ -96,14 +97,14 @@ multilib_src_install() {
distutils-r1_src_install
# For no obvious reason this is not done automatically
python_foreach_impl python_optimize
popd > /dev/null || die
fi
}
multilib_src_install_all() {
DOCS=( ChangeLog )
einstalldocs
find "${ED}" -name '*.la' -delete || die
}

View File

@ -6,7 +6,6 @@
<name>Gentoo network monitoring and analysis project</name>
</maintainer>
<use>
<flag name="doc">Install development documentation</flag>
<flag name="python">Install experimental <pkg>dev-lang/python</pkg> bindings</flag>
<flag name="utils">Install command line interface utils</flag>
</use>

View File

@ -1,11 +1,11 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 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=flit
PYTHON_COMPAT=( python3_{8..11} pypy3 )
PYTHON_COMPAT=( python3_{9..11} pypy3 )
inherit distutils-r1

View File

@ -0,0 +1 @@
DIST autocommand-2.2.2.gh.tar.gz 22188 BLAKE2B 757fd96d0505466e7d3e371e13e931d0dd20d9b02da3e88c2bf85b1b946ef6c67fb14366856fe66c23adab5d635c4bd08d51acc7e55830636cce5aa0a0c265bc SHA512 5ed109db16a0e309ed5107b26db0b70ed8669d73817e82eb5a219650d29f53785aa1f9471b2ac71d21dbffc9f0a13ea0fdf69e63ab534fd84407a1d6741cf5b5

View File

@ -0,0 +1,25 @@
# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..11} pypy3 )
inherit distutils-r1
DESCRIPTION="Library to create a command-line program from a function"
HOMEPAGE="
https://github.com/Lucretiel/autocommand/
https://pypi.org/project/autocommand/
"
SRC_URI="
https://github.com/Lucretiel/autocommand/archive/${PV}.tar.gz
-> ${P}.gh.tar.gz
"
LICENSE="LGPL-3+"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
distutils_enable_tests pytest

View File

@ -7,8 +7,7 @@
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">Mako</remote-id>
<remote-id type="github">sqlalchemy/mako</remote-id>
<bugs-to>https://github.com/sqlalchemy/mako/issues</bugs-to>
<remote-id type="pypi">autocommand</remote-id>
<remote-id type="github">Lucretiel/autocommand</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1 @@
DIST boto-2.49.0.tar.gz 1478498 BLAKE2B 6a897ea162f5f4bd34a2d488a3e3897f7f2f5b8707dd0922c01b6a0b90ea577223bf3e588b6685bda1f2bc0e92af426711fcba67a70377183465a530065c6c84 SHA512 2175cf30cd25bbc05812e83e5ade7668c3e21b1bb09aa1b43f0f0ac7d6967a646394fb52c9be673ebb65618c5b33a52d6f31f6da702f5cd1d6c9a18169476dd4

View File

@ -0,0 +1,64 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..11} )
DISTUTILS_USE_PEP517=setuptools
inherit distutils-r1
DESCRIPTION="Amazon Web Services API"
HOMEPAGE="https://github.com/boto/boto https://pypi.org/project/boto/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 arm arm64 ppc ~ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
PATCHES=(
# taken from https://bugs.debian.org/909545
"${FILESDIR}"/${P}-try-to-add-SNI-support-v3.patch
"${FILESDIR}"/${P}-py38.patch
"${FILESDIR}"/${P}-py3-socket-binary.patch
"${FILESDIR}"/${P}-py3-httplib-strict.patch
"${FILESDIR}"/${P}-py3-server-port.patch
"${FILESDIR}"/${P}-unbundle-six.patch
"${FILESDIR}"/${P}-py310.patch
"${FILESDIR}"/${P}-mock-spec.patch
)
RDEPEND="
>=dev-python/six-1.12.0[${PYTHON_USEDEP}]
"
BDEPEND="
${RDEPEND}
test? (
dev-python/httpretty[${PYTHON_USEDEP}]
dev-python/keyring[${PYTHON_USEDEP}]
dev-python/lxml[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
dev-python/paramiko[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
dev-python/rsa[${PYTHON_USEDEP}]
dev-python/selenium[${PYTHON_USEDEP}]
)"
distutils_enable_tests nose
src_prepare() {
# remove bundled libs.
rm -f "${S}"/boto/vendored/six.py || die
# broken, not worth fixing
rm tests/unit/cloudfront/test_signed_urls.py || die
# fix tests
mkdir -p "${HOME}"/.ssh || die
touch "${HOME}"/.ssh/known_hosts || die
distutils-r1_src_prepare
}
python_test() {
distutils-r1_python_test tests/unit
}

View File

@ -0,0 +1,12 @@
diff -ur boto-2.49.0.orig/tests/unit/ec2/test_volume.py boto-2.49.0/tests/unit/ec2/test_volume.py
--- boto-2.49.0.orig/tests/unit/ec2/test_volume.py 2022-11-02 22:22:36.173725700 -0000
+++ boto-2.49.0/tests/unit/ec2/test_volume.py 2022-11-02 22:24:26.502590025 -0000
@@ -55,7 +55,7 @@
@mock.patch("boto.resultset.ResultSet")
def test_startElement_with_name_tagSet_calls_ResultSet(self, ResultSet, startElement):
startElement.return_value = None
- result_set = mock.Mock(ResultSet([("item", Tag)]))
+ result_set = ResultSet([("item", Tag)])
volume = Volume()
volume.tags = result_set
retval = volume.startElement("tagSet", None, None)

View File

@ -0,0 +1,35 @@
https://github.com/boto/boto/commit/4f4dcb31fe852c05ce19b44eb9d5b5d747e36f7c
https://github.com/boto/boto/pull/2718
From 4f4dcb31fe852c05ce19b44eb9d5b5d747e36f7c Mon Sep 17 00:00:00 2001
From: Lee Ball <43632885+catleeball@users.noreply.github.com>
Date: Mon, 10 Jun 2019 16:02:53 -0700
Subject: [PATCH] Remove `strict=True` from http_client (#6)
In Python 3.4, the `strict` kwarg was removed[1]. We are removing it
here too.
Alternatively, we can leave in `strict=True` for 2.x, but I chose to
remove it entirely to maintain consistent behavior across versions.
[1]: https://docs.python.org/3/library/http.client.html
---
boto/connection.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boto/connection.py b/boto/connection.py
index c731173bb4eb..54e26fb2de16 100644
--- a/boto/connection.py
+++ b/boto/connection.py
@@ -807,7 +807,7 @@ class AWSAuthConnection(object):
sock.sendall(six.ensure_binary("\r\n"))
else:
sock.sendall(six.ensure_binary("\r\n"))
- resp = http_client.HTTPResponse(sock, strict=True, debuglevel=self.debug)
+ resp = http_client.HTTPResponse(sock, debuglevel=self.debug)
resp.begin()
if resp.status != 200:
--
2.28.0

View File

@ -0,0 +1,42 @@
https://github.com/boto/boto/commit/b9f6cb0ab717ea76e2780c7fddd1cd36b3bf7d63
From b9f6cb0ab717ea76e2780c7fddd1cd36b3bf7d63 Mon Sep 17 00:00:00 2001
From: Matt Houglum <houglum@google.com>
Date: Fri, 21 Jun 2019 15:09:11 -0700
Subject: [PATCH] Make server_name() behave correctly for PY3
...because Python-2.6-or-newer doesn't just include Python 2.6 and 2.7.
---
boto/connection.py | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/boto/connection.py b/boto/connection.py
index 54e26fb2de16..bbb25d8fb842 100644
--- a/boto/connection.py
+++ b/boto/connection.py
@@ -650,17 +650,13 @@ class AWSAuthConnection(object):
if port == 80:
signature_host = self.host
else:
- # This unfortunate little hack can be attributed to
- # a difference in the 2.6 version of http_client. In old
- # versions, it would append ":443" to the hostname sent
- # in the Host header and so we needed to make sure we
- # did the same when calculating the V2 signature. In 2.6
- # (and higher!)
- # it no longer does that. Hence, this kludge.
- if ((ON_APP_ENGINE and sys.version[:3] == '2.5') or
- sys.version[:3] in ('2.6', '2.7')) and port == 443:
+ ver_int = sys.version_info[0] * 10 + sys.version_info[1]
+ if port == 443 and ver_int >= 26: # Py >= 2.6
signature_host = self.host
else:
+ # In versions < 2.6, Python's http_client would append ":443"
+ # to the hostname sent in the Host header and so we needed to
+ # make sure we did the same when calculating the V2 signature.
signature_host = '%s:%d' % (self.host, port)
return signature_host
--
2.28.0

View File

@ -0,0 +1,59 @@
https://github.com/boto/boto/commit/d2cb697b32c297858ecc36701a5a4176818ab36d
https://github.com/boto/boto/pull/2718
https://github.com/boto/boto/pull/2893
https://github.com/boto/boto/pull/3699
From d2cb697b32c297858ecc36701a5a4176818ab36d Mon Sep 17 00:00:00 2001
From: Cat Lee Ball <cball@google.com>
Date: Mon, 10 Jun 2019 13:31:11 -0700
Subject: [PATCH] Ensure binary strings sent to socket
When running pre-release tests with proxied connections, it appeared a
few spots in connection.py would fail under Python 3 since the
socket.sendall method expects binary strings rather than unicode.
---
boto/connection.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/boto/connection.py b/boto/connection.py
index a0d89a51f49c..d084d1f881fb 100644
--- a/boto/connection.py
+++ b/boto/connection.py
@@ -796,17 +796,17 @@ class AWSAuthConnection(object):
else:
sock = socket.create_connection((self.proxy, int(self.proxy_port)))
boto.log.debug("Proxy connection: CONNECT %s HTTP/1.0\r\n", host)
- sock.sendall("CONNECT %s HTTP/1.0\r\n" % host)
- sock.sendall("User-Agent: %s\r\n" % UserAgent)
+ sock.sendall(six.ensure_binary("CONNECT %s HTTP/1.0\r\n" % host))
+ sock.sendall(six.ensure_binary("User-Agent: %s\r\n" % UserAgent))
if self.proxy_user and self.proxy_pass:
for k, v in self.get_proxy_auth_header().items():
- sock.sendall("%s: %s\r\n" % (k, v))
+ sock.sendall(six.ensure_binary("%s: %s\r\n" % (k, v)))
# See discussion about this config option at
# https://groups.google.com/forum/?fromgroups#!topic/boto-dev/teenFvOq2Cc
if config.getbool('Boto', 'send_crlf_after_proxy_auth_headers', False):
- sock.sendall("\r\n")
+ sock.sendall(six.ensure_binary("\r\n"))
else:
- sock.sendall("\r\n")
+ sock.sendall(six.ensure_binary("\r\n"))
resp = http_client.HTTPResponse(sock, strict=True, debuglevel=self.debug)
resp.begin()
@@ -814,9 +814,10 @@ class AWSAuthConnection(object):
# Fake a socket error, use a code that make it obvious it hasn't
# been generated by the socket library
raise socket.error(-71,
+ six.ensure_binary(
"Error talking to HTTP proxy %s:%s: %s (%s)" %
(self.proxy, self.proxy_port,
- resp.status, resp.reason))
+ resp.status, resp.reason)))
# We can safely close the response, it duped the original socket
resp.close()
--
2.28.0

View File

@ -0,0 +1,44 @@
diff --git a/boto/dynamodb/types.py b/boto/dynamodb/types.py
index d9aaaa4c..3f8d8601 100644
--- a/boto/dynamodb/types.py
+++ b/boto/dynamodb/types.py
@@ -27,7 +27,7 @@ Python types and vice-versa.
import base64
from decimal import (Decimal, DecimalException, Context,
Clamped, Overflow, Inexact, Underflow, Rounded)
-from collections import Mapping
+from collections.abc import Mapping
from boto.dynamodb.exceptions import DynamoDBNumberError
from boto.compat import filter, map, six, long_type
diff --git a/boto/mws/connection.py b/boto/mws/connection.py
index 687fae74..3a1f5f80 100644
--- a/boto/mws/connection.py
+++ b/boto/mws/connection.py
@@ -21,7 +21,7 @@
import xml.sax
import hashlib
import string
-import collections
+import collections.abc
from boto.connection import AWSQueryConnection
from boto.exception import BotoServerError
import boto.mws.exception
@@ -109,7 +109,7 @@ def http_body(field):
def destructure_object(value, into, prefix, members=False):
if isinstance(value, boto.mws.response.ResponseElement):
destructure_object(value.__dict__, into, prefix, members=members)
- elif isinstance(value, collections.Mapping):
+ elif isinstance(value, collections.abc.Mapping):
for name in value:
if name.startswith('_'):
continue
@@ -117,7 +117,7 @@ def destructure_object(value, into, prefix, members=False):
members=members)
elif isinstance(value, six.string_types):
into[prefix] = value
- elif isinstance(value, collections.Iterable):
+ elif isinstance(value, collections.abc.Iterable):
for index, element in enumerate(value):
suffix = (members and '.member.' or '.') + str(index + 1)
destructure_object(element, into, prefix + suffix,

View File

@ -0,0 +1,54 @@
diff --git a/boto/ecs/item.py b/boto/ecs/item.py
index 79177a31..292b05af 100644
--- a/boto/ecs/item.py
+++ b/boto/ecs/item.py
@@ -21,7 +21,7 @@
import xml.sax
-import cgi
+import html
from boto.compat import six, StringIO
class ResponseGroup(xml.sax.ContentHandler):
@@ -67,7 +67,7 @@ class ResponseGroup(xml.sax.ContentHandler):
return None
def endElement(self, name, value, connection):
- self._xml.write("%s</%s>" % (cgi.escape(value).replace("&amp;amp;", "&amp;"), name))
+ self._xml.write("%s</%s>" % (html.escape(value).replace("&amp;amp;", "&amp;"), name))
if len(self._nodepath) == 0:
return
obj = None
diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py
index db15b56d..89d1a524 100644
--- a/tests/unit/utils/test_utils.py
+++ b/tests/unit/utils/test_utils.py
@@ -85,7 +85,7 @@ class TestPassword(unittest.TestCase):
def hmac_hashfunc(cls, msg):
if not isinstance(msg, bytes):
msg = msg.encode('utf-8')
- return hmac.new(b'mysecretkey', msg)
+ return hmac.new(b'mysecretkey', msg, digestmod='MD5')
class HMACPassword(Password):
hashfunc = hmac_hashfunc
@@ -95,15 +95,15 @@ class TestPassword(unittest.TestCase):
password.set('foo')
self.assertEquals(str(password),
- hmac.new(b'mysecretkey', b'foo').hexdigest())
+ hmac.new(b'mysecretkey', b'foo', digestmod='MD5').hexdigest())
def test_constructor(self):
- hmac_hashfunc = lambda msg: hmac.new(b'mysecretkey', msg)
+ hmac_hashfunc = lambda msg: hmac.new(b'mysecretkey', msg, digestmod='MD5')
password = Password(hashfunc=hmac_hashfunc)
password.set('foo')
self.assertEquals(password.str,
- hmac.new(b'mysecretkey', b'foo').hexdigest())
+ hmac.new(b'mysecretkey', b'foo', digestmod='MD5').hexdigest())
class TestPythonizeName(unittest.TestCase):

View File

@ -0,0 +1,104 @@
From f5e7f6c98b46ff622f60a4661ffc9ce07216d109 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Date: Sat, 29 Sep 2018 21:47:11 +0200
Subject: [PATCH] boto: try to add SNI support
Add SNI support. Newer OpenSSL (with TLS1.3) fail to connect if the
hostname is missing.
Link: https://bugs.debian.org/bug=909545
Tested-by: Witold Baryluk <witold.baryluk@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
---
boto/connection.py | 19 ++++++++++---------
boto/https_connection.py | 22 +++++++++++-----------
2 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/boto/connection.py b/boto/connection.py
index 34b428f101df7..b4867a7657465 100644
--- a/boto/connection.py
+++ b/boto/connection.py
@@ -778,8 +778,10 @@
def proxy_ssl(self, host=None, port=None):
if host and port:
+ cert_host = host
host = '%s:%d' % (host, port)
else:
+ cert_host = self.host
host = '%s:%d' % (self.host, self.port)
# Seems properly to use timeout for connect too
timeout = self.http_connection_kwargs.get("timeout")
@@ -824,23 +824,24 @@ DEFAULT_CA_CERTS_FILE = os.path.join(os.path.dirname(os.path.abspath(boto.cacert
h = http_client.HTTPConnection(host)
if self.https_validate_certificates and HAVE_HTTPS_CONNECTION:
+ context = ssl.create_default_context()
+ context.verify_mode = ssl.CERT_REQUIRED
+ context.check_hostname = True
+
msg = "wrapping ssl socket for proxied connection; "
if self.ca_certificates_file:
msg += "CA certificate file=%s" % self.ca_certificates_file
+ context.load_verify_locations(cafile=self.ca_certificates_file)
else:
msg += "using system provided SSL certs"
+ context.load_default_certs()
boto.log.debug(msg)
key_file = self.http_connection_kwargs.get('key_file', None)
cert_file = self.http_connection_kwargs.get('cert_file', None)
- sslSock = ssl.wrap_socket(sock, keyfile=key_file,
- certfile=cert_file,
- cert_reqs=ssl.CERT_REQUIRED,
- ca_certs=self.ca_certificates_file)
- cert = sslSock.getpeercert()
- hostname = self.host.split(':', 0)[0]
- if not https_connection.ValidateCertificateHostname(cert, hostname):
- raise https_connection.InvalidCertificateException(
- hostname, cert, 'hostname mismatch')
+ if key_file:
+ context.load_cert_chain(certfile=cert_file, keyfile=key_file)
+
+ sslSock = context.wrap_socket(sock, server_hostname=cert_host)
else:
# Fallback for old Python without ssl.wrap_socket
if hasattr(http_client, 'ssl'):
diff --git a/boto/https_connection.py b/boto/https_connection.py
index ddc31a152292e..a5076f6f9b261 100644
--- a/boto/https_connection.py
+++ b/boto/https_connection.py
@@ -119,20 +119,20 @@ from boto.compat import six, http_client
sock = socket.create_connection((self.host, self.port), self.timeout)
else:
sock = socket.create_connection((self.host, self.port))
+
+ context = ssl.create_default_context()
+ context.verify_mode = ssl.CERT_REQUIRED
+ context.check_hostname = True
+ if self.key_file:
+ context.load_cert_chain(certfile=self.cert_file, keyfile=self.key_file)
+
msg = "wrapping ssl socket; "
if self.ca_certs:
msg += "CA certificate file=%s" % self.ca_certs
+ context.load_verify_locations(cafile=self.ca_certs)
else:
msg += "using system provided SSL certs"
+ context.load_default_certs()
boto.log.debug(msg)
- self.sock = ssl.wrap_socket(sock, keyfile=self.key_file,
- certfile=self.cert_file,
- cert_reqs=ssl.CERT_REQUIRED,
- ca_certs=self.ca_certs)
- cert = self.sock.getpeercert()
- hostname = self.host.split(':', 0)[0]
- if not ValidateCertificateHostname(cert, hostname):
- raise InvalidCertificateException(hostname,
- cert,
- 'remote hostname "%s" does not match '
- 'certificate' % hostname)
+
+ self.sock = context.wrap_socket(sock, server_hostname=self.host)
--
2.19.0

View File

@ -0,0 +1,28 @@
use the system copy of six
--- a/boto/compat.py
+++ b/boto/compat.py
@@ -46,16 +46,16 @@ except (AttributeError, ImportError):
# This is probably running on App Engine.
expanduser = (lambda x: x)
-from boto.vendored import six
+import six
-from boto.vendored.six import BytesIO, StringIO
-from boto.vendored.six.moves import filter, http_client, map, _thread, \
+from six import BytesIO, StringIO
+from six.moves import filter, http_client, map, _thread, \
urllib, zip
-from boto.vendored.six.moves.queue import Queue
-from boto.vendored.six.moves.urllib.parse import parse_qs, quote, unquote, \
+from six.moves.queue import Queue
+from six.moves.urllib.parse import parse_qs, quote, unquote, \
urlparse, urlsplit
-from boto.vendored.six.moves.urllib.parse import unquote_plus
-from boto.vendored.six.moves.urllib.request import urlopen
+from six.moves.urllib.parse import unquote_plus
+from six.moves.urllib.request import urlopen
if six.PY3:
# StandardError was removed, so use the base exception type instead

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="google-code">boto</remote-id>
<remote-id type="pypi">boto</remote-id>
<remote-id type="github">boto/boto</remote-id>
</upstream>
</pkgmetadata>

View File

@ -1 +1 @@
DIST certifi-system-store-3021.3.16.tar.gz 13784 BLAKE2B c0c2322fe298d363c4ef4dada2c0db8837bf7a32d86a7b54a1b45bb3dd3c99d732b2612f25495f4a59d9692f896e2b962e7057fa5fec9998724476db48f90c2a SHA512 44953ed8a3deb5fa4aff3f74afa557219e042acea395e9cdebfd26fd43ce0bdeca07c6b6dfe91977f88852e7674b94337b93c4d78fd2da6f47a6187fa46d6668
DIST certifi-system-store-3021.3.16.gh.tar.gz 13784 BLAKE2B c0c2322fe298d363c4ef4dada2c0db8837bf7a32d86a7b54a1b45bb3dd3c99d732b2612f25495f4a59d9692f896e2b962e7057fa5fec9998724476db48f90c2a SHA512 44953ed8a3deb5fa4aff3f74afa557219e042acea395e9cdebfd26fd43ce0bdeca07c6b6dfe91977f88852e7674b94337b93c4d78fd2da6f47a6187fa46d6668

View File

@ -1,60 +0,0 @@
# Copyright 1999-2021 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
PYTHON_COMPAT=( python3_{8..10} pypy3 )
DISTUTILS_USE_SETUPTOOLS=rdepend
inherit distutils-r1
MY_P=certifi-system-store-${PV}
DESCRIPTION="A certifi hack to use system trust store on Linux/FreeBSD"
HOMEPAGE="
https://github.com/tiran/certifi-system-store/
https://pypi.org/project/certifi-system-store/"
SRC_URI="
https://github.com/tiran/certifi-system-store/archive/v${PV}.tar.gz
-> ${MY_P}.tar.gz"
S=${WORKDIR}/${MY_P}
LICENSE="MPL-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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"
RDEPEND="app-misc/ca-certificates"
PATCHES=(
"${FILESDIR}"/${PN}-3021.3.16-setuptools.patch
)
EPYTEST_IGNORE=(
# requires Internet
tests/test_requests.py
)
distutils_enable_tests --install pytest
src_prepare() {
sed -i -e "s^/etc^${EPREFIX}/etc^" src/certifi/core.py || die
distutils-r1_src_prepare
}
symlink_info() {
pushd "${1}" >/dev/null || die
local egginfo=( certifi_system_store*.egg-info )
[[ -d ${egginfo} ]] || die
ln -v -s "${egginfo}" "${egginfo/_system_store}" || die
popd >/dev/null || die
}
python_test() {
distutils_install_for_testing
symlink_info "${TEST_DIR}"/lib
epytest
}
python_install() {
distutils-r1_python_install
symlink_info "${D}$(python_get_sitedir)"
}

View File

@ -0,0 +1,55 @@
# Copyright 1999-2023 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=setuptools
PYTHON_COMPAT=( python3_{9..11} pypy3 )
inherit distutils-r1
MY_P=certifi-system-store-${PV}
DESCRIPTION="A certifi hack to use system trust store on Linux/FreeBSD"
HOMEPAGE="
https://github.com/tiran/certifi-system-store/
https://pypi.org/project/certifi-system-store/
"
SRC_URI="
https://github.com/tiran/certifi-system-store/archive/v${PV}.tar.gz
-> ${MY_P}.gh.tar.gz
"
S=${WORKDIR}/${MY_P}
LICENSE="MPL-2.0"
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"
RDEPEND="
app-misc/ca-certificates
dev-python/setuptools[${PYTHON_USEDEP}]
"
PATCHES=(
"${FILESDIR}"/${P}-use-importlib.patch
)
EPYTEST_IGNORE=(
# requires Internet
tests/test_requests.py
)
distutils_enable_tests pytest
src_prepare() {
sed -i -e "s^/etc^${EPREFIX}/etc^" src/certifi/core.py || die
distutils-r1_src_prepare
}
python_compile() {
distutils-r1_python_compile
cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
local distinfo=( certifi_system_store*.dist-info )
[[ -d ${distinfo} ]] || die
ln -v -s "${distinfo}" "${distinfo/_system_store}" || die
}

View File

@ -1,21 +0,0 @@
https://github.com/tiran/certifi-system-store/pull/17
https://bugs.gentoo.org/822777
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Tue, 23 Nov 2021 15:56:33 +0100
Subject: [PATCH] Add missing install_requires on setuptools
This package is using pkg_resources explicitly, it should therefore
declare an explicit dependency on setuptools. The missing dependency
has lead me to actually miss the runtime dependency which caused issues
for Gentoo users for whom setuptools were cleaned.
--- a/setup.cfg
+++ b/setup.cfg
@@ -40,6 +40,7 @@ zip_safe = True
setup_requires = setuptools
# hack to prevent installation on unsupported platforms Windows and macOS
install_requires =
+ setuptools
certifi-system-store > 4000; sys_platform == "win32" or sys_platform == "darwin"
python_requires = >=3.6

View File

@ -0,0 +1,164 @@
1. https://github.com/tiran/certifi-system-store/commit/6945f34b7be433dbf22946825cdb225d5d2136d5
2. https://github.com/tiran/certifi-system-store/pull/21
Avoid repeated instances of https://bugs.gentoo.org/878045 when a package
has too-strict requirements and then affects other, unrelated Python
packages on the system.
From 6945f34b7be433dbf22946825cdb225d5d2136d5 Mon Sep 17 00:00:00 2001
From: Christian Heimes <christian@python.org>
Date: Tue, 16 Mar 2021 16:00:08 +0100
Subject: [PATCH] Relax patch checks (#13)
- only check that version matches, not files are identical
- compare base directories with samefile. This fixes a problem with
lib64 symlink in virtual envs.
Signed-off-by: Christian Heimes <christian@python.org>
--- a/src/certifi/_patch.py
+++ b/src/certifi/_patch.py
@@ -28,7 +28,7 @@ def _patch_dist_info():
except pkg_resources.DistributionNotFound:
pass
else:
- if os.path.samefile(css_dist.egg_info, certifi_dist.egg_info):
+ if certifi_dist.version == css_dist.version:
return False, css_dist.egg_info, certifi_dist.egg_info
else:
# blow away certifi's dist-info
@@ -55,7 +55,9 @@ def _patch_dist_info():
certifi_dir = os.path.dirname(os.path.abspath(__file__))
dist_dir = os.path.abspath(certifi_dist.egg_info)
- if os.path.dirname(certifi_dir) != os.path.dirname(dist_dir):
+ # compare with samefile instead of string comparison to avoid false
+ # negatives caused by venv lib64 / lib symlinks
+ if not os.path.samefile(os.path.dirname(certifi_dir), os.path.dirname(dist_dir)):
raise RuntimeError(
f"'{certifi_dir} and {dist_dir} have different parent directories."
)
From cdec6d20b5d716d9853e72a1519a304070395498 Mon Sep 17 00:00:00 2001
From: Christian Heimes <christian@python.org>
Date: Wed, 22 Jun 2022 10:08:18 +0200
Subject: [PATCH] Use importlib on Python 3.8+
--- a/setup.cfg
+++ b/setup.cfg
@@ -38,8 +40,9 @@ packages = certifi
include_package_data = True
zip_safe = True
setup_requires = setuptools
-# hack to prevent installation on unsupported platforms Windows and macOS
install_requires =
+ setuptools; python_version < "3.8"
+ # hack to prevent installation on unsupported platforms Windows and macOS
certifi-system-store > 4000; sys_platform == "win32" or sys_platform == "darwin"
python_requires = >=3.6
--- a/src/certifi/_patch.py
+++ b/src/certifi/_patch.py
@@ -1,7 +1,31 @@
import os
import shutil
import sys
-import pkg_resources
+
+if sys.version_info >= (3, 8):
+ from importlib import metadata
+
+ PackageNotFoundError = metadata.PackageNotFoundError
+
+ def _get_distinfo(name):
+ dist = metadata.distribution(name)
+ egg_info = dist._path
+ return dist.version, egg_info
+
+ def _invalidate_caches():
+ pass
+
+else:
+ import pkg_resources
+
+ PackageNotFoundError = pkg_resources.DistributionNotFound
+
+ def _get_distinfo(name):
+ dist = pkg_resources.get_distribution(name)
+ return dist.version, dist.egg_info
+
+ def _invalidate_caches():
+ pkg_resources.working_set.__init__()
def _relsymlink(target, linkname):
@@ -22,22 +46,22 @@ def _relsymlink(target, linkname):
def _patch_dist_info():
# distribution object for the canonical project name
- css_dist = pkg_resources.get_distribution("certifi_system_store")
+ css_version, css_egg_info = _get_distinfo("certifi_system_store")
try:
- certifi_dist = pkg_resources.get_distribution("certifi")
- except pkg_resources.DistributionNotFound:
+ certifi_version, certifi_egg_info = _get_distinfo("certifi")
+ except PackageNotFoundError:
pass
else:
- if certifi_dist.version == css_dist.version:
- return False, css_dist.egg_info, certifi_dist.egg_info
+ if certifi_version == css_version:
+ return False, css_egg_info, certifi_egg_info
else:
# blow away certifi's dist-info
- shutil.rmtree(certifi_dist.egg_info)
+ shutil.rmtree(certifi_egg_info)
# reset current working set, so pkg_resources can pick up our hack
- pkg_resources.working_set.__init__()
+ _invalidate_caches()
# certifi-system-store's dist-info
- abs_css_distinfodir = os.path.abspath(css_dist.egg_info)
+ abs_css_distinfodir = os.path.abspath(css_egg_info)
css_basedir, css_distinfodir = os.path.split(abs_css_distinfodir)
# certifi's dist-info in same base directory
@@ -48,12 +72,12 @@ def _patch_dist_info():
_relsymlink(target=abs_css_distinfodir, linkname=abs_certifi_distinfodir)
# get dist info from refreshed working set
- css_dist = pkg_resources.get_distribution("certifi_system_store")
- certifi_dist = pkg_resources.get_distribution("certifi")
+ css_version, css_egg_info = _get_distinfo("certifi_system_store")
+ certifi_version, certifi_egg_info = _get_distinfo("certifi")
# check that certifi dist-info is in same site-packages as certifi package
certifi_dir = os.path.dirname(os.path.abspath(__file__))
- dist_dir = os.path.abspath(certifi_dist.egg_info)
+ dist_dir = os.path.abspath(certifi_egg_info)
# compare with samefile instead of string comparison to avoid false
# negatives caused by venv lib64 / lib symlinks
@@ -65,17 +89,17 @@ def _patch_dist_info():
# double check versions
_verify_dist_info()
- return True, css_dist.egg_info, certifi_dist.egg_info
+ return True, css_egg_info, certifi_egg_info
def _verify_dist_info():
- css_dist = pkg_resources.get_distribution("certifi_system_store")
+ css_version, css_egg_info = _get_distinfo("certifi_system_store")
try:
- certifi_dist = pkg_resources.get_distribution("certifi")
- except pkg_resources.DistributionNotFound as e:
+ certifi_version, certifi_egg_info = _get_distinfo("certifi")
+ except PackageNotFoundError as e:
raise RuntimeError(e)
else:
- if certifi_dist.version != css_dist.version:
+ if certifi_version != css_version:
raise RuntimeError(
f"'certifi.dist-info' is not an alias to "
f"'certifi_system_store.dist-info'. "

View File

@ -1,16 +1,18 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
DISTUTILS_USE_SETUPTOOLS=no
PYTHON_COMPAT=( python3_{8..10} )
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..11} )
inherit distutils-r1
DESCRIPTION="Python CRC Generator module"
HOMEPAGE="http://crcmod.sourceforge.net/"
SRC_URI="mirror://sourceforge/crcmod/${P}.tar.gz"
SRC_URI="
https://downloads.sourceforge.net/project/crcmod/crcmod/${P}/${P}.tar.gz
"
LICENSE="MIT"
SLOT="0"

View File

@ -1,2 +1,2 @@
DIST cython-0.29.28.gh.tar.gz 2101301 BLAKE2B 980c04545e935deb4b4b1653f167dcbc94b8e2b24bc8897b5cc996dfca977645f7475c32aa973251ffcbbb31e725e27693af61ceaf66f2332c9525b02653dc76 SHA512 52490d0b5355e13cbe586830f763173d7556cf3d79d79192ca75138b1190e7a4c1f3feeb0568349802ef3b97300c3805f54eef5ffd73a5180d68f023ac2a44cd
DIST cython-74073417c4f7e616af0a139a55f790f1ec7fe728.gh.tar.gz 2106765 BLAKE2B c2686a1d49fd1b522dcdf89f16c52fbb34595aed72e5626c8d3697ecc9318751d108999db443cfefe08334155ab59d230fcbd8e74715e185a161399abad6ae35 SHA512 2454a364fdd33f0090ba052a0bfa0ffb464ef750253a91c20a63c4db0b513f743870e7b9fafd844b0bf1a6b66b9b639f830d3a8c2f64abac6e197e2ff2279a59
DIST cython-0.29.32.gh.tar.gz 2110417 BLAKE2B 008ffe325c87d165bf45afb2ff92db5286f611bbe425d0e9f18b530202135ca21f5f5ab564a4d0c6251ec2479ea0fd19207274a255fb1faf8863d3b067d17ae9 SHA512 55462792fa70d8edf60aa470627ab494918d7297fd7d282a7a54da76ee5a180233108404a1c8f3d79f6408f19b6e4f46b36e59fd47c38ede24f061f374437b6f
DIST cython-0.29.33.gh.tar.gz 2113910 BLAKE2B 9212edfa36680a3243632d28c4f5616a7336e82ee1f96df7d5e29711056619639c9a8fe9bbf9aea0a86aed39e836dc6eaa112ad35080f530add6309ccd09c53c SHA512 85f5ba7159d8793dbda980140b26086727f356a71d78f8522419657841d07b865d09c2f0a0f77d398669d071c1d261060235321a19eb7808e35d24f8ac71560d

View File

@ -1,10 +1,10 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..10} pypy3 )
PYTHON_COMPAT=( python3_{9..11} pypy3 )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1 toolchain-funcs elisp-common
@ -59,6 +59,11 @@ python_compile_all() {
}
python_test() {
if has "${EPYTHON}" pypy3 python3.11; then
einfo "Skipping tests on ${EPYTHON} (xfail)"
return
fi
tc-export CC
# https://github.com/cython/cython/issues/1911
local -x CFLAGS="${CFLAGS} -fno-strict-overflow"

View File

@ -1,17 +1,14 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..11} pypy3 )
PYTHON_COMPAT=( python3_{9..11} pypy3 )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1 toolchain-funcs elisp-common
EGIT_COMMIT="74073417c4f7e616af0a139a55f790f1ec7fe728"
MY_P=${PN}-${EGIT_COMMIT}
DESCRIPTION="A Python to C compiler"
HOMEPAGE="
https://cython.org/
@ -19,10 +16,9 @@ HOMEPAGE="
https://pypi.org/project/Cython/
"
SRC_URI="
https://github.com/cython/cython/archive/${EGIT_COMMIT}.tar.gz
-> ${MY_P}.gh.tar.gz
https://github.com/cython/cython/archive/${PV}.tar.gz
-> ${P}.gh.tar.gz
"
S=${WORKDIR}/${MY_P}
LICENSE="Apache-2.0"
SLOT="0"
@ -63,7 +59,7 @@ python_compile_all() {
}
python_test() {
if [[ ${EPYTHON} == python3.11 ]]; then
if has "${EPYTHON}" pypy3 python3.11; then
einfo "Skipping tests on ${EPYTHON} (xfail)"
return
fi

View File

@ -1 +1 @@
DIST distro-1.7.0.tar.gz 58164 BLAKE2B 22bbd2daf9cac589530eac9a58767db6b9e389b77719516f7386a9377b49ba4c9b696165701acc42366b760b9a632c70a2243a58c12a367fef2a0a770a4aea44 SHA512 14516ecab33ee8c57c35a8279eb515fd699031fabac7d8886092ea98696797d55503179870aeb513a85e1a66c7e69f2f60bb6ea9fc935be975cb5135e1917ecc
DIST distro-1.8.0.tar.gz 59428 BLAKE2B d1b47dd801c4414a6bb21c544c62c306a1cf49b43f70974f7a0b4bcba64620047c7d06b6507ba262eba44d2f192f654646bb69241ed5bf6b761dc9d42e049e18 SHA512 027fe8bc50e263dc49451932774f32cea7900820b6e30cc80afcdc84374777ba733137fdd8d27fec76f66ce9c579bc172721e7ae0f43e72dffbc092126b26af2

View File

@ -1,20 +1,23 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..11} pypy3 )
PYTHON_COMPAT=( python3_{8..10} pypy3 )
inherit distutils-r1
DESCRIPTION="Reliable machine-readable Linux distribution information for Python"
HOMEPAGE="
https://distro.readthedocs.io/en/latest/
https://github.com/python-distro/distro/
https://pypi.org/project/distro/
https://github.com/python-distro/distro/"
"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
SLOT="0"
LICENSE="Apache-2.0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
distutils_enable_tests pytest

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<longdescription>
distro (for: Linux Distribution) provides information about the
Linux distribution it runs on, such as a reliable machine-readable
ID, or version information. It is a renewed alternative
implementation for Python's original platform.linux_distribution
function, but it also provides much more functionality which isn't
necessarily Python bound like a command-line interface.
</longdescription>
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">distro</remote-id>
<remote-id type="github">python-distro/distro</remote-id>
</upstream>
</pkgmetadata>

View File

@ -1,3 +1,2 @@
DIST docutils-0.16.tar.gz 1962041 BLAKE2B 64d045d43433e944686b5d9077de0b544d49d041adf398f9b66612db432860853df4a84f4c4b44461789b3039f83e3847547062b2f5bc5d2bde3a0f1ffc9ffba SHA512 4e0c6662924cac6b8f28bb77a4f50eafd637c1083990a23dbd905d8a05362a18dae96e63408ed43b595b693ca755c7961d1282129d3215ed3774af0dddcc0466
DIST docutils-0.17.1.tar.gz 2016138 BLAKE2B aa0b6525ba2e3eaebc17010806952ed5f40919876fcb813f50cc05b628dfd22e6073a9a4b2bfe989089ae68d9b7111ae3a97dda2bde5c0536f8fb76c0942fe29 SHA512 5ec2087116bd5356fdffc54f07f6b0355aac5fa9d6caeefa77e8d201fd4706c0d419193c4d9a3964ae493da3091fe2c7dc36b74f81a1e1b9282173658b06e71b
DIST docutils-0.18.1.tar.gz 2043249 BLAKE2B 3959199236baade9601d61c3f6d7b6f840fbefdd46d9ea05869fde2cd2c800356a01faba891f51e220c85e66f3029f49f616f2046b85041b674c64825a4242ec SHA512 44404a6cc9d4c1e79c73a6ffee2898e459c9925ab9661e5d41394e13b3d861334cf0c5efcd18e87eb03041374e326cfd00539a6b2ec5979678889e8a536c9542
DIST docutils-0.19.tar.gz 2056383 BLAKE2B 9983a905642de4e81ca118578671b503ddfda4bef1afcc0524de40543e1f9617fd8d768ef467da49d2f01076683400bad6a0fe15f6b5a3a1e202c42b2e34ab1b SHA512 fb904a899f2b6f3c07c5079577bd7c52a3182cb85f6a4149391e523498df15bfa317f0c04095b890beeb3f89c2b444875a2a609d880ac4d7fbc3125e46b37ea5

View File

@ -1,72 +0,0 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{8..10} pypy3 )
inherit distutils-r1
DESCRIPTION="Python Documentation Utilities"
HOMEPAGE="https://docutils.sourceforge.io/ https://pypi.org/project/docutils/"
#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD-2 GPL-3 public-domain"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~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"
IUSE=""
BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
dev-python/pygments[${PYTHON_USEDEP}]"
RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}"/${P}-tests.patch
)
python_compile_all() {
# Generate html docs from reStructured text sources.
# Place html4css1.css in base directory to ensure that the generated reference to it is correct.
cp docutils/writers/html4css1/html4css1.css . || die
cd tools || die
"${EPYTHON}" buildhtml.py --input-encoding=utf-8 \
--stylesheet-path=../html4css1.css, --traceback ../docs || die
}
src_test() {
cd test || die
distutils-r1_src_test
}
python_test() {
"${EPYTHON}" alltests.py -v || die "Testing failed with ${EPYTHON}"
}
python_install() {
distutils-r1_python_install
# Install tools.
python_doscript tools/{buildhtml,quicktest}.py
}
install_txt_doc() {
local doc="${1}"
local dir="txt/$(dirname ${doc})"
docinto "${dir}"
dodoc "${doc}"
}
python_install_all() {
local DOCS=( *.txt )
local HTML_DOCS=( docs tools docutils/writers/html4css1/html4css1.css )
distutils-r1_python_install_all
local doc
while IFS= read -r -d '' doc; do
install_txt_doc "${doc}"
done < <(find docs tools -name '*.txt' -print0)
}

View File

@ -1,24 +1,34 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{8..10} pypy3 )
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..11} pypy3 )
inherit distutils-r1
DESCRIPTION="Python Documentation Utilities"
HOMEPAGE="https://docutils.sourceforge.io/ https://pypi.org/project/docutils/"
#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
DESCRIPTION="Python Documentation Utilities (reference reStructuredText impl.)"
HOMEPAGE="
https://docutils.sourceforge.io/
https://pypi.org/project/docutils/
"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD-2 GPL-3 public-domain"
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"
IUSE=""
RDEPEND="dev-python/pygments[${PYTHON_USEDEP}]"
BDEPEND="${RDEPEND}"
RDEPEND="
dev-python/pygments[${PYTHON_USEDEP}]
"
BDEPEND="
${RDEPEND}
"
PATCHES=(
"${FILESDIR}/docutils-0.18.1-py311.patch"
)
python_compile_all() {
# Generate html docs from reStructured text sources.

View File

@ -1,24 +1,34 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
EAPI=8
PYTHON_COMPAT=( python3_{7..10} pypy3 )
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..11} pypy3 )
inherit distutils-r1
DESCRIPTION="Python Documentation Utilities"
HOMEPAGE="https://docutils.sourceforge.io/ https://pypi.org/project/docutils/"
#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
DESCRIPTION="Python Documentation Utilities (reference reStructuredText impl.)"
HOMEPAGE="
https://docutils.sourceforge.io/
https://pypi.org/project/docutils/
"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD-2 GPL-3 public-domain"
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"
IUSE=""
RDEPEND="dev-python/pygments[${PYTHON_USEDEP}]"
BDEPEND="${RDEPEND}"
RDEPEND="
dev-python/pygments[${PYTHON_USEDEP}]
"
BDEPEND="
${RDEPEND}
"
PATCHES=(
"${FILESDIR}"/${PN}-0.19-pygments-2.14.patch
)
python_compile_all() {
# Generate html docs from reStructured text sources.

View File

@ -1,66 +0,0 @@
Index: docutils/test/test_parsers/test_rst/test_directives/test_code.py
===================================================================
--- docutils/test/test_parsers/test_rst/test_directives/test_code.py (revision 8494)
+++ docutils/test/test_parsers/test_rst/test_directives/test_code.py (working copy)
@@ -107,7 +107,7 @@
<document source="test data">
<literal_block classes="code python testclass" xml:space="preserve">
\n\
- <inline classes="keyword">
+ <inline classes="name builtin">
print
<inline classes="punctuation">
(
@@ -167,7 +167,7 @@
<inline classes="ln">
12 \n\
\n\
- <inline classes="keyword">
+ <inline classes="name builtin">
print
<inline classes="punctuation">
(
Index: docutils/test/test_parsers/test_rst/test_directives/test_code_long.py
===================================================================
--- docutils/test/test_parsers/test_rst/test_directives/test_code_long.py (revision 8494)
+++ docutils/test/test_parsers/test_rst/test_directives/test_code_long.py (working copy)
@@ -69,7 +69,7 @@
<inline classes="ln">
12 \n\
\n\
- <inline classes="keyword">
+ <inline classes="name builtin">
print
<inline classes="punctuation">
(
Index: docutils/test/test_parsers/test_rst/test_directives/test_tables.py
===================================================================
--- docutils/test/test_parsers/test_rst/test_directives/test_tables.py (revision 8494)
+++ docutils/test/test_parsers/test_rst/test_directives/test_tables.py (working copy)
@@ -45,10 +45,11 @@
# some error messages changed in Python 3.3, CPython has backported to 2.7.4,
# PyPy has not
csv_eod_error_str = 'unexpected end of data'
-if sys.version_info < (2,7,4) or platform.python_implementation() == 'PyPy':
+if sys.version_info < (2,7,4) or (platform.python_implementation() == 'PyPy'
+ and sys.version_info < (3,0)):
csv_eod_error_str = 'newline inside string'
# pypy adds a line number
-if sys.version_info >= (3, 0) and platform.python_implementation() == 'PyPy':
+if platform.python_implementation() == 'PyPy':
csv_eod_error_str = 'line 1: ' + csv_eod_error_str
csv_unknown_url = "'bogus.csv'"
if sys.version_info < (3, 0):
Index: docutils/test/test_parsers/test_rst/test_interpreted.py
===================================================================
--- docutils/test/test_parsers/test_rst/test_interpreted.py (revision 8494)
+++ docutils/test/test_parsers/test_rst/test_interpreted.py (working copy)
@@ -283,7 +283,7 @@
<paragraph>
Python code \n\
<literal classes="code testclass python">
- <inline classes="keyword">
+ <inline classes="name builtin">
print
<inline classes="punctuation">
(

View File

@ -0,0 +1,135 @@
Combination of:
http://svn.code.sf.net/p/docutils/code/trunk@8910
http://svn.code.sf.net/p/docutils/code/trunk@8909
diff --git a/test/DocutilsTestSupport.py b/test/DocutilsTestSupport.py
index 592d3f9df..e1f33aa7a 100644
--- a/test/DocutilsTestSupport.py
+++ b/test/DocutilsTestSupport.py
@@ -819,6 +819,7 @@ def exception_data(func, *args, **kwds):
except Exception as detail:
return (detail, detail.args,
'%s: %s' % (detail.__class__.__name__, detail))
+ return None, [], "No exception"
def _format_str(*args):
diff --git a/test/test_parsers/test_rst/test_directives/test_tables.py b/test/test_parsers/test_rst/test_directives/test_tables.py
index 07be0122f..73724ed7e 100755
--- a/test/test_parsers/test_rst/test_directives/test_tables.py
+++ b/test/test_parsers/test_rst/test_directives/test_tables.py
@@ -65,6 +65,92 @@ def null_bytes():
next(reader)
null_bytes_exception = DocutilsTestSupport.exception_data(null_bytes)[0]
+# Null bytes are valid in Python 3.11+:
+if null_bytes_exception is None:
+ bad_encoding_result = """\
+<document source="test data">
+ <table>
+ <title>
+ bad encoding
+ <tgroup cols="4">
+ <colspec colwidth="25">
+ <colspec colwidth="25">
+ <colspec colwidth="25">
+ <colspec colwidth="25">
+ <tbody>
+ <row>
+ <entry>
+ <paragraph>
+ \xfe\xff"Treat"
+ <entry>
+ <paragraph>
+ "Quantity"
+ <entry>
+ <paragraph>
+ "Description"
+ <entry>
+ <row>
+ <entry>
+ <paragraph>
+ "Albatr\u00b0\u00df"
+ <entry>
+ <paragraph>
+ 2.99
+ <entry>
+ <paragraph>
+ "\u00a1Ona\x03\xc3\x03\xc4\x03\xb9\x03\xba!"
+ <entry>
+ <row>
+ <entry>
+ <paragraph>
+ "CrunchyFrog"
+ <entry>
+ <paragraph>
+ 1.49
+ <entry>
+ <paragraph>
+ "Ifwetooktheb\u00f6nesout
+ <entry>
+ <paragraph>
+ itwouldn\x20\x19tbe
+ <row>
+ <entry>
+ <paragraph>
+ crunchy
+ <entry>
+ <paragraph>
+ nowwouldit?"
+ <entry>
+ <entry>
+ <row>
+ <entry>
+ <paragraph>
+ "GannetRipple"
+ <entry>
+ <paragraph>
+ 1.99
+ <entry>
+ <paragraph>
+ "\xbfOna\x03\xc3\x03\xc4\x03\xb9\x03\xba?"
+ <entry>
+ <paragraph>
+ (7- and 8-bit text encoded as UTF-16 has lots of null/zero bytes.)
+"""
+else:
+ bad_encoding_result = """\
+<document source="test data">
+ <system_message level="3" line="1" source="test data" type="ERROR">
+ <paragraph>
+ Error with CSV data in "csv-table" directive:
+ %s
+ <literal_block xml:space="preserve">
+ .. csv-table:: bad encoding
+ :file: %s
+ :encoding: latin-1
+ <paragraph>
+ (7- and 8-bit text encoded as UTF-16 has lots of null/zero bytes.)
+""" % (null_bytes_exception, utf_16_csv)
+
totest = {}
@@ -1031,19 +1117,8 @@ u"""\
(7- and 8-bit text encoded as UTF-16 has lots of null/zero bytes.)
""" % utf_16_csv,
-"""\
-<document source="test data">
- <system_message level="3" line="1" source="test data" type="ERROR">
- <paragraph>
- Error with CSV data in "csv-table" directive:
- %s
- <literal_block xml:space="preserve">
- .. csv-table:: bad encoding
- :file: %s
- :encoding: latin-1
- <paragraph>
- (7- and 8-bit text encoded as UTF-16 has lots of null/zero bytes.)
-""" % (null_bytes_exception, utf_16_csv)],
+bad_encoding_result
+],
["""\
.. csv-table:: good encoding
:file: %s

View File

@ -0,0 +1,672 @@
https://bugs.gentoo.org/892213
https://sourceforge.net/p/docutils/patches/201/
--- a/test/test_parsers/test_rst/test_directives/test_code.py
+++ b/test/test_parsers/test_rst/test_directives/test_code.py
@@ -10,14 +10,20 @@ Test the 'code' directive in parsers/rst
if __name__ == '__main__':
import __init__ # noqa: F401
+from packaging.version import Version
from test_parsers import DocutilsTestSupport
-from docutils.utils.code_analyzer import with_pygments
+from docutils.utils.code_analyzer import with_pygments, pygments_version
def suite():
s = DocutilsTestSupport.ParserTestSuite()
if not with_pygments:
del(totest['code-parsing'])
+ del(totest['code-parsing-2-14'])
+ elif pygments_version >= Version('2.14.0'):
+ del(totest['code-parsing'])
+ else:
+ del(totest['code-parsing-2-14'])
s.generateTests(totest)
return s
@@ -170,6 +176,165 @@ totest['code-parsing'] = [
\n\
<inline classes="name builtin">
print
+ <inline classes="punctuation">
+ (
+ <inline classes="literal number integer">
+ 8
+ <inline classes="operator">
+ /
+ <inline classes="literal number integer">
+ 2
+ <inline classes="punctuation">
+ )
+"""],
+["""\
+.. code:: latex
+ :class: testclass
+
+ hello \\emph{world} % emphasize
+""",
+"""\
+<document source="test data">
+ <literal_block classes="code latex testclass" xml:space="preserve">
+ hello \n\
+ <inline classes="keyword">
+ \\emph
+ <inline classes="name builtin">
+ {
+ world
+ <inline classes="name builtin">
+ }
+ \n\
+ <inline classes="comment">
+ % emphasize"""],
+["""\
+.. code:: rst
+ :number-lines:
+
+ This is a code block with text.
+""",
+"""\
+<document source="test data">
+ <literal_block classes="code rst" xml:space="preserve">
+ <inline classes="ln">
+ 1 \n\
+ This is a code block with text.
+"""],
+["""\
+Code not parsed but warning silenced in ParserTestCase.
+
+.. code:: s-lang
+
+ % abc.sl
+ autoload("abc_mode", "abc");
+""",
+"""\
+<document source="test data">
+ <paragraph>
+ Code not parsed but warning silenced in ParserTestCase.
+ <literal_block classes="code s-lang" xml:space="preserve">
+ % abc.sl
+ autoload("abc_mode", "abc");
+"""],
+["""\
+Place the language name in a class argument to avoid the no-lexer warning:
+
+.. code::
+ :class: s-lang
+
+ % abc.sl
+ autoload("abc_mode", "abc");
+""",
+"""\
+<document source="test data">
+ <paragraph>
+ Place the language name in a class argument to avoid the no-lexer warning:
+ <literal_block classes="code s-lang" xml:space="preserve">
+ % abc.sl
+ autoload("abc_mode", "abc");
+"""],
+]
+
+totest['code-parsing-2-14'] = [
+["""\
+.. code:: python3
+ :class: testclass
+
+ print('hello world') # to stdout
+""",
+"""\
+<document source="test data">
+ <literal_block classes="code python3 testclass" xml:space="preserve">
+ \n\
+ <inline classes="name builtin">
+ print
+ <inline classes="punctuation">
+ (
+ <inline classes="literal string single">
+ 'hello world'
+ <inline classes="punctuation">
+ )
+ \n\
+ <inline classes="comment single">
+ # to stdout
+"""],
+["""\
+.. code:: python3
+ :class: testclass
+ :name: my_function
+ :number-lines: 7
+
+ def my_function():
+ '''Test the lexer.
+ '''
+
+ # and now for something completely different
+ print(8/2)
+""",
+"""\
+<document source="test data">
+ <literal_block classes="code python3 testclass" ids="my-function" names="my_function" xml:space="preserve">
+ <inline classes="ln">
+ 7 \n\
+ <inline classes="keyword">
+ def
+ \n\
+ <inline classes="name function">
+ my_function
+ <inline classes="punctuation">
+ ():
+ <inline classes="whitespace">
+ \n\
+ <inline classes="ln">
+ 8 \n\
+ <inline classes="whitespace">
+ \n\
+ <inline classes="literal string doc">
+ \'\'\'Test the lexer.
+ <inline classes="ln">
+ 9 \n\
+ <inline classes="literal string doc">
+ \'\'\'
+ <inline classes="whitespace">
+ \n\
+ <inline classes="ln">
+ 10 \n\
+ <inline classes="whitespace">
+ \n\
+ <inline classes="ln">
+ 11 \n\
+ <inline classes="whitespace">
+ \n\
+ <inline classes="comment single">
+ # and now for something completely different
+ <inline classes="whitespace">
+ \n\
+ <inline classes="ln">
+ 12 \n\
+ <inline classes="whitespace">
+ \n\
+ <inline classes="name builtin">
+ print
<inline classes="punctuation">
(
<inline classes="literal number integer">
--- a/test/test_parsers/test_rst/test_directives/test_code_long.py
+++ b/test/test_parsers/test_rst/test_directives/test_code_long.py
@@ -10,15 +10,22 @@ Test the 'code' directive in body.py wit
if __name__ == '__main__':
import __init__ # noqa: F401
+from packaging.version import Version
from test_parsers import DocutilsTestSupport
-from docutils.utils.code_analyzer import with_pygments
+from docutils.utils.code_analyzer import with_pygments, pygments_version
def suite():
settings = {'syntax_highlight': 'long'}
s = DocutilsTestSupport.ParserTestSuite(suite_settings=settings)
if with_pygments:
+ if pygments_version >= Version('2.14.0'):
+ del(totest['code-parsing-long'])
+ else:
+ del(totest['code-parsing-long-2-14'])
+
s.generateTests(totest)
+
return s
@@ -73,6 +80,94 @@ totest['code-parsing-long'] = [
\n\
<inline classes="name builtin">
print
+ <inline classes="punctuation">
+ (
+ <inline classes="literal number integer">
+ 8
+ <inline classes="operator">
+ /
+ <inline classes="literal number integer">
+ 2
+ <inline classes="punctuation">
+ )
+"""],
+["""\
+.. code:: latex
+
+ hello \\emph{world} % emphasize
+""",
+"""\
+<document source="test data">
+ <literal_block classes="code latex" xml:space="preserve">
+ hello \n\
+ <inline classes="keyword">
+ \\emph
+ <inline classes="name builtin">
+ {
+ world
+ <inline classes="name builtin">
+ }
+ \n\
+ <inline classes="comment">
+ % emphasize"""],
+]
+
+totest['code-parsing-long-2-14'] = [
+["""\
+.. code:: python3
+ :number-lines: 7
+
+ def my_function():
+ '''Test the lexer.
+ '''
+
+ # and now for something completely different
+ print(8/2)
+""",
+"""\
+<document source="test data">
+ <literal_block classes="code python3" xml:space="preserve">
+ <inline classes="ln">
+ 7 \n\
+ <inline classes="keyword">
+ def
+ \n\
+ <inline classes="name function">
+ my_function
+ <inline classes="punctuation">
+ ():
+ <inline classes="whitespace">
+ \n\
+ <inline classes="ln">
+ 8 \n\
+ <inline classes="whitespace">
+ \n\
+ <inline classes="literal string doc">
+ \'\'\'Test the lexer.
+ <inline classes="ln">
+ 9 \n\
+ <inline classes="literal string doc">
+ \'\'\'
+ <inline classes="whitespace">
+ \n\
+ <inline classes="ln">
+ 10 \n\
+ <inline classes="whitespace">
+ \n\
+ <inline classes="ln">
+ 11 \n\
+ <inline classes="whitespace">
+ \n\
+ <inline classes="comment single">
+ # and now for something completely different
+ <inline classes="whitespace">
+ \n\
+ <inline classes="ln">
+ 12 \n\
+ <inline classes="whitespace">
+ \n\
+ <inline classes="name builtin">
+ print
<inline classes="punctuation">
(
<inline classes="literal number integer">
--- a/test/test_parsers/test_rst/test_directives/test_include.py
+++ b/test/test_parsers/test_rst/test_directives/test_include.py
@@ -10,9 +10,10 @@ Tests for misc.py "include" directive.
import os.path
if __name__ == '__main__':
import __init__ # noqa: F401
+from packaging.version import Version
from test_parsers import DocutilsTestSupport
from docutils import parsers
-from docutils.utils.code_analyzer import with_pygments
+from docutils.utils.code_analyzer import with_pygments, pygments_version
# optional 3rd-party markdown parser
md_parser_name = 'recommonmark'
@@ -27,6 +28,11 @@ def suite():
# eventually skip optional parts:
if not with_pygments:
del(totest['include-code'])
+ del(totest['include-code-2-14'])
+ elif pygments_version >= Version('2.14.0'):
+ del(totest['include-code'])
+ else:
+ del(totest['include-code-2-14'])
if not md_parser_class:
del(totest['include-markdown'])
s.generateTests(totest)
@@ -1191,6 +1197,313 @@ Including includes/include14.txt
<inline classes="punctuation">
..
\n\
+ <inline classes="operator word">
+ include
+ <inline classes="punctuation">
+ ::
+ ../sibling/include7.txt
+""" % reldir(include6)],
+["""\
+Circular inclusion
+
+.. include:: %s
+""" % include15,
+"""\
+<document source="test data">
+ <paragraph>
+ Circular inclusion
+ <paragraph>
+ File "include15.txt": example of rekursive inclusion.
+ <paragraph>
+ File "include16.txt": example of rekursive inclusion.
+ <system_message level="2" line="3" source="%s" type="WARNING">
+ <paragraph>
+ circular inclusion in "include" directive:
+ %s
+ > %s
+ > %s
+ > test data
+ <literal_block xml:space="preserve">
+ .. include:: include15.txt
+ <paragraph>
+ No loop when clipping before the "include" directive:
+ <paragraph>
+ File "include15.txt": example of rekursive inclusion.
+""" % (reldir(include16), reldir(include15),
+ reldir(include16), reldir(include15))],
+["""\
+Circular inclusion with clipping.
+
+.. include:: %s
+ :start-line: 2
+""" % include16,
+"""\
+<document source="test data">
+ <paragraph>
+ Circular inclusion with clipping.
+ <paragraph>
+ File "include15.txt": example of rekursive inclusion.
+ <paragraph>
+ File "include16.txt": example of rekursive inclusion.
+ <system_message level="2" line="3" source="%s" type="WARNING">
+ <paragraph>
+ circular inclusion in "include" directive:
+ %s
+ > %s
+ > %s
+ > %s
+ > test data
+ <literal_block xml:space="preserve">
+ .. include:: include15.txt
+ <paragraph>
+ No loop when clipping before the "include" directive:
+ <paragraph>
+ File "include15.txt": example of rekursive inclusion.
+ <paragraph>
+ No loop when clipping before the "include" directive:
+ <paragraph>
+ File "include15.txt": example of rekursive inclusion.
+""" % (reldir(include16), reldir(include15), reldir(include16),
+ reldir(include15), reldir(include16))],
+["""\
+Circular inclusion with specified parser.
+
+.. include:: %s
+ :parser: rst
+""" % include15,
+"""\
+<document source="test data">
+ <paragraph>
+ Circular inclusion with specified parser.
+ <paragraph>
+ File "include15.txt": example of rekursive inclusion.
+ <paragraph>
+ File "include16.txt": example of rekursive inclusion.
+ <system_message level="2" line="3" source="%s" type="WARNING">
+ <paragraph>
+ circular inclusion in "include" directive:
+ %s
+ > %s
+ > %s
+ > test data
+ <literal_block xml:space="preserve">
+ .. include:: include15.txt
+ <paragraph>
+ No loop when clipping before the "include" directive:
+ <paragraph>
+ File "include15.txt": example of rekursive inclusion.
+""" % (reldir(include16), reldir(include15),
+ reldir(include16), reldir(include15))],
+["""\
+No circular inclusion.
+
+============================= =============================
+.. include:: data/include.txt .. include:: data/include.txt
+============================= =============================
+""",
+"""\
+<document source="test data">
+ <paragraph>
+ No circular inclusion.
+ <table>
+ <tgroup cols="2">
+ <colspec colwidth="29">
+ <colspec colwidth="29">
+ <tbody>
+ <row>
+ <entry>
+ <paragraph>
+ Some include text.
+ <entry>
+ <paragraph>
+ Some include text."""],
+]
+
+totest['include-code-2-14'] = [
+["""\
+Included code
+
+.. include:: %s
+ :code: rst
+""" % include1,
+"""\
+<document source="test data">
+ <paragraph>
+ Included code
+ <literal_block classes="code rst" source="%s" xml:space="preserve">
+ <inline classes="generic heading">
+ Inclusion 1
+ \n\
+ <inline classes="generic heading">
+ -----------
+ \n\
+ <inline classes="whitespace">
+ \n\
+ This file is used by \n\
+ <inline classes="literal string">
+ ``test_include.py``
+ .
+""" % reldir(include1)],
+["""\
+Included code
+
+.. include:: %s
+ :code: rst
+ :number-lines:
+""" % include1,
+"""\
+<document source="test data">
+ <paragraph>
+ Included code
+ <literal_block classes="code rst" source="%s" xml:space="preserve">
+ <inline classes="ln">
+ 1 \n\
+ <inline classes="generic heading">
+ Inclusion 1
+ \n\
+ <inline classes="ln">
+ 2 \n\
+ <inline classes="generic heading">
+ -----------
+ \n\
+ <inline classes="ln">
+ 3 \n\
+ <inline classes="whitespace">
+ \n\
+ <inline classes="ln">
+ 4 \n\
+ <inline classes="whitespace">
+ This file is used by \n\
+ <inline classes="literal string">
+ ``test_include.py``
+ .
+""" % reldir(include1)],
+["""\
+TAB expansion with included code:
+
+.. include:: %s
+ :code: rst
+""" % include_literal,
+"""\
+<document source="test data">
+ <paragraph>
+ TAB expansion with included code:
+ <literal_block classes="code rst" source="%s" xml:space="preserve">
+ Literal included this should \n\
+ <inline classes="generic strong">
+ **not**
+ be \n\
+ <inline classes="generic emph">
+ *marked*
+ \n\
+ <inline classes="name variable">
+ `up`
+ .
+ <inline classes="whitespace">
+ \n\
+ <- leading raw tab.
+ <inline classes="whitespace">
+ \n\
+ \n\
+ Newlines
+ <inline classes="whitespace">
+ \n\
+ are
+ <inline classes="whitespace">
+ \n\
+ normalized.
+""" % include_literal],
+["""\
+Custom TAB expansion with included code:
+
+.. include:: %s
+ :code: rst
+ :tab-width: 2
+""" % include_literal,
+"""\
+<document source="test data">
+ <paragraph>
+ Custom TAB expansion with included code:
+ <literal_block classes="code rst" source="%s" xml:space="preserve">
+ Literal included this should \n\
+ <inline classes="generic strong">
+ **not**
+ be \n\
+ <inline classes="generic emph">
+ *marked*
+ \n\
+ <inline classes="name variable">
+ `up`
+ .
+ <inline classes="whitespace">
+ \n\
+ <- leading raw tab.
+ <inline classes="whitespace">
+ \n\
+ \n\
+ Newlines
+ <inline classes="whitespace">
+ \n\
+ are
+ <inline classes="whitespace">
+ \n\
+ normalized.
+""" % include_literal],
+["""\
+Custom TAB expansion with included code:
+
+.. include:: %s
+ :code: rst
+ :tab-width: -1
+""" % include_literal,
+"""\
+<document source="test data">
+ <paragraph>
+ Custom TAB expansion with included code:
+ <literal_block classes="code rst" source="%s" xml:space="preserve">
+ Literal included this should \n\
+ <inline classes="generic strong">
+ **not**
+ be \n\
+ <inline classes="generic emph">
+ *marked*
+ \n\
+ <inline classes="name variable">
+ `up`
+ .
+ <inline classes="whitespace">
+ \n\
+ \t<- leading raw tab.
+ <inline classes="whitespace">
+ \n\
+ \n\
+ Newlines
+ <inline classes="whitespace">
+ \n\
+ are
+ <inline classes="whitespace">
+ \n\
+ normalized.
+""" % include_literal],
+["""\
+Including includes/include14.txt
+
+.. include:: %s
+""" % include14,
+"""\
+<document source="test data">
+ <paragraph>
+ Including includes/include14.txt
+ <paragraph>
+ Including more/include6.txt as rst-code from includes/include14.txt:
+ <literal_block classes="code rst" source="%s" xml:space="preserve">
+ In includes/more/include6.txt
+ <inline classes="whitespace">
+ \n\
+ \n\
+ <inline classes="punctuation">
+ ..
+ \n\
<inline classes="operator word">
include
<inline classes="punctuation">
--- a/docutils/utils/code_analyzer.py
+++ b/docutils/utils/code_analyzer.py
@@ -9,11 +9,14 @@
from docutils import ApplicationError
try:
import pygments
+ from packaging.version import Version
from pygments.lexers import get_lexer_by_name
from pygments.formatters.html import _get_ttype_class
with_pygments = True
+ pygments_version = Version(pygments.__version__)
except ImportError:
with_pygments = False
+ pygments_version = '0'
# Filter the following token types from the list of class arguments:
unstyled_tokens = ['token', # Token (base token type)

View File

@ -1 +1 @@
DIST flit_core-3.7.1.tar.gz 40330 BLAKE2B 67a938ef576a70ce1bfe1f1bf996f1d2e468ea46f76ed2a363b278cebc42602b38fbf44a6bc45294996549d673d3145e2db2293780b8d157fd4f3b3876dc88cd SHA512 8c477bcd2924a93b51e6f3d8bbc3599929663c8d5addf16062e8e1b6c5acd740a4e4905b144092efb6e38e9700479525013831a53e055438f94c1e53ff5c6f8d
DIST flit_core-3.8.0.tar.gz 41224 BLAKE2B 20d0b1e245280938b1edfa83531907775af9da30cc6e1446d578eafc7e14184d3c8fb80f446d265456ea5ea587c51edfdb706793a8894916525b3ebba322b3b0 SHA512 914804e3f2040762381afe039272d9d6fdbcd3f3cf8b9eea854f2f1d95edcb01718fd6685476bc1cdc251dfc46ef80b40f087df881d8b963dcc3f3332fd32a46

View File

@ -1,18 +1,19 @@
# Copyright 2019-2022 Gentoo Authors
# Copyright 2019-2023 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=standalone
PYTHON_COMPAT=( python3_{8..11} pypy3 )
PYTHON_COMPAT=( python3_{9..11} pypy3 )
inherit distutils-r1
DESCRIPTION="Simplified packaging of Python modules (core module)"
HOMEPAGE="
https://pypi.org/project/flit_core/
https://github.com/pypa/flit/"
https://pypi.org/project/flit-core/
https://github.com/pypa/flit/
"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="BSD"

View File

@ -11,7 +11,7 @@
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">flit_core</remote-id>
<remote-id type="pypi">flit-core</remote-id>
<remote-id type="github">pypa/flit</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,37 @@
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DESCRIPTION="Common files shared by Python implementations in Gentoo"
HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Python"
S=${WORKDIR}
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
src_install() {
insinto /usr/lib/python
# https://peps.python.org/pep-0668/
newins - EXTERNALLY-MANAGED <<-EOF
[externally-managed]
Error=
The system-wide Python installation in Gentoo should be maintained
using the system package manager (e.g. emerge).
If the package in question is not packaged for Gentoo, please
consider installing it inside a virtual environment, e.g.:
python -m venv /path/to/venv
. /path/to/venv/bin/activate
pip install mypackage
To exit the virtual environment, run:
deactivate
The virtual environment is not deleted, and can be re-entered by
re-sourcing the activate file.
EOF
}

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>python@gentoo.org</email>
</maintainer>
<stabilize-allarches/>
</pkgmetadata>

View File

@ -1,3 +1 @@
DIST gpep517-3.gh.tar.gz 7074 BLAKE2B 99a499ae13b6aac41e86d11735f0e49a5dc921881a1efa94bee19bfd779af6827707d05d6407ed15e4a3a6b518c8c0b3f50901e3b12df41081930f83b288e461 SHA512 90f756f5a1d783e9d402e098162a70b363a0a81e331e810e5c89c3302bb5839032603252bad1c98c176a7828b70adfac967e39ba455dcd3a20097e74923980c8
DIST gpep517-5.gh.tar.gz 9568 BLAKE2B 7641ae7792a15be7241d9c02622b589a796a96c76894c29f37733e33820532042f6d5b8018ef021b487c299f3a28adf37949e96c38148d88c140ed6926e95f2b SHA512 3618f3d17cc367716c4813d75814ef295896f210ff32c13f1ef8ad8cde2120a30ba69705e14dbb1e5528bf5a348f9f8c5f5de8b416608cd496733e94afbeb2c6
DIST gpep517-6.gh.tar.gz 9757 BLAKE2B f1b39f30b7d775330bddfd353610de7c26e34c5572cdaedbb078cc61c711e90e1c520b5e6e5532b0879ccc1eb7025a793c6f8d9745d93967eabbdd9edef69c6a SHA512 681108dab418d0d2d5b017f19bf8802479655f22eb6b72e9d78c6bbd2d08583751a465377c2006c507f0ea258d2d46bf9300865896af4458a763b56a86abe329
DIST gpep517-13.gh.tar.gz 17197 BLAKE2B eb2f1061c0d762ec5cedf042c41a04eb1ddfbb146b5d81727f7e09d55e76323ee4ffb00e8a8c17a8d423b863bd46dc79a03048da1998cf50fee45bc75c64f38e SHA512 23219a3f7369def01e41fe6bbf96400cc85bb6f5efae3924451a5f3dbed0c9a5e7bb69aa1810897597aa248aa64fc6445fb32ed5bf314d0265c5339893ea58e3

View File

@ -1,21 +1,21 @@
# Copyright 2022 Gentoo Authors
# Copyright 2022-2023 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_SETUPTOOLS=manual
PYTHON_COMPAT=( pypy3 python3_{8..10} )
DISTUTILS_USE_PEP517=no
PYTHON_COMPAT=( pypy3 python3_{9..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/
https://github.com/projg2/gpep517/
"
SRC_URI="
https://github.com/mgorny/gpep517/archive/v${PV}.tar.gz
https://github.com/projg2/gpep517/archive/v${PV}.tar.gz
-> ${P}.gh.tar.gz
"
@ -30,9 +30,6 @@ RDEPEND="
distutils_enable_tests pytest
# do not use any build system to avoid circular deps
python_compile() { :; }
python_install() {
python_domodule gpep517
python_newscript - gpep517 <<-EOF

View File

@ -1,44 +0,0 @@
# 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_SETUPTOOLS=manual
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
# do not use any build system to avoid circular deps
python_compile() { :; }
python_install() {
python_domodule gpep517
python_newscript - gpep517 <<-EOF
#!${EPREFIX}/usr/bin/python
import sys
from gpep517.__main__ import main
sys.exit(main())
EOF
}

View File

@ -1,44 +0,0 @@
# 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_SETUPTOOLS=manual
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
# do not use any build system to avoid circular deps
python_compile() { :; }
python_install() {
python_domodule gpep517
python_newscript - gpep517 <<-EOF
#!${EPREFIX}/usr/bin/python
import sys
from gpep517.__main__ import main
sys.exit(main())
EOF
}

View File

@ -7,7 +7,7 @@
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="github">mgorny/gpep517</remote-id>
<remote-id type="github">projg2/gpep517</remote-id>
<remote-id type="pypi">gpep517</remote-id>
</upstream>
</pkgmetadata>

View File

@ -1 +0,0 @@
DIST importlib_metadata-4.11.3.tar.gz 43607 BLAKE2B 661f8ce68869540995dbee39c6be07d7b88e8339267d4d49744691f2347ab2bcc9ac33c4cafd6caed5fa9ce3d4a3640a816e4659eee9a59b5ccc1df2edd2f6aa SHA512 d33efa2abba5f6f770615f133c940a61948ce5091d59526ee2c7e3866aebd74d79ac464f72602404c2b56fe284a93a9cd1b0cac251ceea53666019485bdddf23

View File

@ -1,52 +0,0 @@
# Copyright 1999-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=flit
# NB: this package extends beyond built-in importlib stuff in py3.8+
# new entry_point API not yet included in cpython release
PYTHON_COMPAT=( pypy3 python3_{8..10} )
inherit distutils-r1
DESCRIPTION="Read metadata from Python packages"
HOMEPAGE="https://github.com/python/importlib_metadata"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="Apache-2.0"
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/zipp[${PYTHON_USEDEP}]
"
BDEPEND="
test? (
dev-python/packaging[${PYTHON_USEDEP}]
dev-python/pyfakefs[${PYTHON_USEDEP}]
$(python_gen_cond_dep '
dev-python/importlib_resources[${PYTHON_USEDEP}]
' 3.8)
)
"
distutils_enable_sphinx docs dev-python/jaraco-packaging dev-python/rst-linker
distutils_enable_tests unittest
src_configure() {
grep -q 'build-backend = "setuptools' pyproject.toml ||
die "Upstream changed build-backend, recheck"
# write a custom pyproject.toml to ease setuptools bootstrap
cat > pyproject.toml <<-EOF || die
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "importlib_metadata"
version = "${PV}"
description = "Read metadata from Python packages"
EOF
}

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>sbraz@gentoo.org</email>
<name>Louis Sautier</name>
</maintainer>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">importlib-metadata</remote-id>
<remote-id type="github">python/importlib_metadata</remote-id>
<bugs-to>https://github.com/python/importlib_metadata/issues</bugs-to>
<doc>https://importlib-metadata.readthedocs.io/</doc>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1 @@
DIST inflect-6.0.2.tar.gz 70830 BLAKE2B 8faa09c53f836429b6e1a2965da3c4315260e1cb3ae7dc40fe226d7f4595e9bd54498167c044f67fed5f79e2997af5425cc13680b9c2b722ffd702095f60b038 SHA512 ddb0439eeffbd21b3293208eb7e89f97fe556a3ba1e88de7e15d1c6bc5a59cdb25a224d7cfec5a010dd384728b15317c1dc752e3a8d4d95dd6eea8224a4f2877

View File

@ -0,0 +1,28 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( pypy3 python3_{9..11} )
inherit distutils-r1 pypi
DESCRIPTION="Correctly inflect words and numbers"
HOMEPAGE="
https://pypi.org/project/inflect/
https://github.com/jaraco/inflect/
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos"
RDEPEND="
>=dev-python/pydantic-1.9.1[${PYTHON_USEDEP}]
"
BDEPEND="
>=dev-python/setuptools_scm-3.4.1[${PYTHON_USEDEP}]
"
distutils_enable_tests pytest

View File

@ -11,8 +11,8 @@
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">zipp</remote-id>
<remote-id type="github">jaraco/zipp</remote-id>
<bugs-to>https://github.com/jaraco/zipp/issues</bugs-to>
<remote-id type="pypi">inflect</remote-id>
<remote-id type="github">jaraco/inflect</remote-id>
<bugs-to>https://github.com/jaraco/inflect/issues</bugs-to>
</upstream>
</pkgmetadata>

View File

@ -1,4 +1,2 @@
DIST installer-0.5.0-py3-none-any.whl.zip 452177 BLAKE2B 41bb5929c1bc42afa1e09f366356aa441eb92d258da40421d7f46ceb466ee4604ed96fef0969dcd2fe28e8f4b06c741ac3108000f69ea42b6bb194890102ad71 SHA512 470c4fec8888114af6769db8b8cefa09a376bfcdf0d78320f884a7453a4991765cdf0b9122c74d8e147d193e75ab3e12cc24c3b93c0668956c17f52443833c4e
DIST installer-0.5.0.gh.tar.gz 468351 BLAKE2B 6c258bdaae3351e87a88675fb813bb70611d9188ba16a09ba03de4caa3d79fe32544e229f880338304d00343c2b3121b1948bbef2e27c7255d231a3d5665aa5f SHA512 8731bbf8a51b1094dc87f84575eec07a650988bdeddf205d04cf80a5088eac0d8b2927022864f4011a9562fcaae9f511747e5672f94ec3cce1dccdfa833c4fce
DIST installer-0.5.1-py3-none-any.whl.zip 452220 BLAKE2B df2d2b351c3ca1e7d5991cebc77035bd8da980d0cd739b11532dac3e1fca4bcf58ebb746b4a3468978f765515ca22d3f777b279174715aaa2838231d4204028b SHA512 50f4778352393ad4d56ce5ccce2f5691df2114ef133b1a614e1c4ec2802261dd4de162fd359f47a51b4195b9b5594f5448591ee80356fd2ddb3221a2e602c797
DIST installer-0.5.1.gh.tar.gz 468433 BLAKE2B 5ba76eb2a576209c2bdf80adfcbd8ea22b55394652640085cf8dd39ded06a0a33ab75f3e4ff73d5de2db028b8c4dac652d631c94e2c9401a825ee75e7b143c01 SHA512 0320c1795c98a593b5da46775465e26bdf8736f59835970517cb02f2756030a3744b9385a9342e8062362d0769d585ff6cce504fdf105e99d27d6ba40281842b
DIST installer-0.6.0-py3-none-any.whl.zip 452554 BLAKE2B 58a38d07256ed4fde3ab9495d47c117966155067fb6e903e2c1979272055b252e81f514cc67f5d0cda12e870f0a4f68f4c44bbfd6af38628e64726bdbcb17b50 SHA512 eca4f06e078c920085090a24c6083fceba2d52e433b21e1f2fb4d4e2e457f0dcca0e0307fb3239ab6018a92a3cb2e797499f050264ca2918bd268699357140b7
DIST installer-0.6.0.gh.tar.gz 469015 BLAKE2B c7e297724a634377d312ef408627e40c8a8aa7f67824331b657d13aa2908df2a59b935d7774437aa56b4b41bc7418f6f2e575c1e0fb6b282a124cf0440f74b89 SHA512 0952bbf245359d6f660f98e59096ed3d57facb5bad0e9715fe525bd52f50cce198b481811d2ba4d204776f7ae9bec9c3431ae044d6ef9a8db8d873c170cf13fb

View File

@ -1,44 +0,0 @@
# 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_SETUPTOOLS=manual
PYTHON_COMPAT=( python3_{8..10} pypy3 )
inherit distutils-r1
DESCRIPTION="A library for installing Python wheels"
HOMEPAGE="
https://pypi.org/project/installer/
https://github.com/pradyunsg/installer/
https://installer.readthedocs.io/en/latest/
"
SRC_URI="
https://github.com/pradyunsg/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 ~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
# do not use any build system to avoid circular deps
python_compile() { :; }
python_test() {
local -x PYTHONPATH=src
epytest
}
python_install() {
python_domodule src/installer "${WORKDIR}"/*.dist-info
}

View File

@ -1,44 +0,0 @@
# 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_SETUPTOOLS=manual
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
# do not use any build system to avoid circular deps
python_compile() { :; }
python_test() {
local -x PYTHONPATH=src
epytest
}
python_install() {
python_domodule src/installer "${WORKDIR}"/*.dist-info
}

View File

@ -0,0 +1,41 @@
# Copyright 2022-2023 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_{9..11} pypy3 )
inherit distutils-r1 pypi
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
$(pypi_wheel_url --unpack)
"
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
}
python_install() {
distutils-r1_python_install
python_optimize
}

View File

@ -1 +1,3 @@
DIST jaraco.context-4.1.1.tar.gz 7615 BLAKE2B 5734da1c55420c45520aea57398e66a3d880a555c76650bcaf3427911a7814be92f4a879219c8ccf3c808fdf00d3a77b76e68a93ef3fdad4ea50550188118317 SHA512 e01d3bd7b4eb712d00aba3fc40a78a5484141fcacf5bc772287a35ac81eca4c9744963679daadf6a170cf2ec26234243e602c89f71833fe84175ac39fb401453
DIST jaraco.context-4.2.0.tar.gz 9308 BLAKE2B 047474e325846a5e01407cd5c6c64da4f7185d3a26b3664f06e3ca76bdb5989fd741a62ab32a667d56a80a4280824e8614cc64a27aa45f97f81d93c344f06f31 SHA512 829284682ead392ae7620c1881e89b7091e7ddc7c1d293c05792f7ce4276a5745554598a222a52ed93a7b2b401d20f3d066cfd32de65ad2f0f3c8c5f5cd2c75a
DIST jaraco.context-4.2.1.tar.gz 9526 BLAKE2B f4543528ac24ed0005955cee49b1e4723b6d6240125eda3b6f58307a22180df41ed90069328e8e0efe460040dbadd2948d3728ccf2c01953b7e5d6bfb43e378d SHA512 34b4a051e4a50c24313bee4b80106cc5b3bb71cafc4b2eb4e8cf061b270f5ccf0ff550b58d7b05d7407f2cd7aa8ec4baf113de6dcd064d91e3f2619c5e0ce284
DIST jaraco.context-4.3.0.tar.gz 9764 BLAKE2B 2905723ec54c6ae63b2088d677cd486dcdc06dfea06bb058eeb512da508b2ae74990894cb62f3751321cb4c813b66ffe9a3084b21eb0cb4236a9515969432dfc SHA512 8882229fa1a68f2733ec4103fbeaf47625b19790f4461ab18df4c1f1a99d4d26d10d7381ab68ba5df48616a1fdb2d5e4a767496a0e40658fd011ed9cd39255de

View File

@ -1,17 +1,20 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 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=flit
PYTHON_COMPAT=( python3_{8..11} pypy3 )
PYTHON_COMPAT=( python3_{9..11} pypy3 )
inherit distutils-r1
MY_P=${P/-/.}
DESCRIPTION="Context managers by jaraco"
HOMEPAGE="https://github.com/jaraco/jaraco.context"
HOMEPAGE="
https://github.com/jaraco/jaraco.context/
https://pypi.org/project/jaraco.context/
"
SRC_URI="mirror://pypi/${PN:0:1}/${PN/-/.}/${MY_P}.tar.gz"
S="${WORKDIR}/${MY_P}"

View File

@ -0,0 +1,48 @@
# Copyright 1999-2023 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=flit
PYTHON_COMPAT=( python3_{9..11} pypy3 )
inherit distutils-r1
MY_P=${P/-/.}
DESCRIPTION="Context managers by jaraco"
HOMEPAGE="
https://github.com/jaraco/jaraco.context/
https://pypi.org/project/jaraco.context/
"
SRC_URI="mirror://pypi/${PN:0:1}/${PN/-/.}/${MY_P}.tar.gz"
S="${WORKDIR}/${MY_P}"
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"
distutils_enable_tests pytest
src_configure() {
grep -q 'build-backend = "setuptools' pyproject.toml ||
die "Upstream changed build-backend, recheck"
# write a custom pyproject.toml to ease setuptools bootstrap
cat > pyproject.toml <<-EOF || die
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "jaraco.context"
version = "${PV}"
description = "Context managers by jaraco"
EOF
}
python_install() {
distutils-r1_python_install
# rename to workaround a bug in pkg_resources
# https://bugs.gentoo.org/834522
mv "${D}$(python_get_sitedir)"/jaraco{_,.}context-${PV}.dist-info || die
}

View File

@ -0,0 +1,47 @@
# Copyright 1999-2023 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=flit
PYTHON_COMPAT=( python3_{9..11} pypy3 )
inherit distutils-r1 pypi
DESCRIPTION="Context managers by jaraco"
HOMEPAGE="
https://github.com/jaraco/jaraco.context/
https://pypi.org/project/jaraco.context/
"
SRC_URI="$(pypi_sdist_url --no-normalize "${PN/-/.}")"
S=${WORKDIR}/${P/-/.}
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"
distutils_enable_tests pytest
src_configure() {
grep -q 'build-backend = "setuptools' pyproject.toml ||
die "Upstream changed build-backend, recheck"
# write a custom pyproject.toml to ease setuptools bootstrap
cat > pyproject.toml <<-EOF || die
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "jaraco.context"
version = "${PV}"
description = "Context managers by jaraco"
EOF
}
python_install() {
distutils-r1_python_install
# rename to workaround a bug in pkg_resources
# https://bugs.gentoo.org/834522
mv "${D}$(python_get_sitedir)"/jaraco{_,.}context-${PV}.dist-info || die
}

Some files were not shown because too many files have changed in this diff Show More