From 721639e9faf1a0eca04c9f492bb0bd84dd882d76 Mon Sep 17 00:00:00 2001 From: "Liguros - Gitlab CI/CD [develop]" Date: Thu, 15 Dec 2022 18:50:06 +0000 Subject: Adding metadata --- dev-python/autopep8/Manifest | 1 - dev-python/autopep8/autopep8-1.7.1.ebuild | 36 -------------- dev-python/autopep8/autopep8-2.0.0.ebuild | 56 ++++++++++++---------- dev-python/autopep8/autopep8-9999.ebuild | 42 ++++++++++++++++ ...autopep8-1.6.0-lib2to3-deprecation-pytest.patch | 28 +++++++++++ dev-python/autopep8/metadata.xml | 8 ++-- 6 files changed, 105 insertions(+), 66 deletions(-) delete mode 100644 dev-python/autopep8/autopep8-1.7.1.ebuild create mode 100644 dev-python/autopep8/autopep8-9999.ebuild create mode 100644 dev-python/autopep8/files/autopep8-1.6.0-lib2to3-deprecation-pytest.patch (limited to 'dev-python') diff --git a/dev-python/autopep8/Manifest b/dev-python/autopep8/Manifest index 5751bc12e9d1..552e26e681d5 100644 --- a/dev-python/autopep8/Manifest +++ b/dev-python/autopep8/Manifest @@ -1,2 +1 @@ -DIST autopep8-1.7.1.tar.gz 117449 BLAKE2B 27bfdc58f647f3f2a7c3945f7faee152667e1dffc13c2b4a5af1f74e7d544c21d1472dc34c797818ca45fccae9f53e7a333c71b52b825b0fb97b50f12567889b SHA512 7a4a8ebf0bacd781fdf7ae32a34bd64f5b6ba9e8ccef5709799cefe5e5bc24da47f36ea49092e26a7c3e254bbea5d6feaeca38f64ffc3fe440307b1331be4766 DIST autopep8-2.0.0.tar.gz 117507 BLAKE2B 8722b19454f47d0b960e3cc0e18ff3d6150ead009630047ecd1ce9001ea6f6d68595f80d7ad1087bddd2993e95d0634d63495b1d43dee095d114535bf632d1bf SHA512 883b79f7011a374a2ef88073a45748268a20449a3bc8da519c036c71700352dd8c4accc60fcb592f1a53ceac06984fcbe6ede8a272bc718c2b79873be5f35dd8 diff --git a/dev-python/autopep8/autopep8-1.7.1.ebuild b/dev-python/autopep8/autopep8-1.7.1.ebuild deleted file mode 100644 index 2788c50132ad..000000000000 --- a/dev-python/autopep8/autopep8-1.7.1.ebuild +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2020-2022 Liguros Authors -# Distributed under the terms of the GNU General Public License v2 -EAPI=8 - -PYTHON_COMPAT=( python3_{7,8,9,10,11} ) -PYTHON_REQ_USE="threads(+)" - -inherit distutils-r1 - -DESCRIPTION="Automatically formats Python code to conform to the PEP 8 style guide" -HOMEPAGE="https://github.com/hhatto/autopep8 https://pypi.org/project/autopep8/" -KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -IUSE="test" - -RDEPEND=">=dev-python/pycodestyle-2.7.0[${PYTHON_USEDEP}]" - -DEPEND=" - dev-python/setuptools[${PYTHON_USEDEP}] - test? ( - ${RDEPEND} - >=dev-python/pydiff-0.2.0[${PYTHON_USEDEP}] - )" - -python_prepare_all() { - # Prevent UnicodeDecodeError with LANG=C - sed -e "/é/d" -i MANIFEST.in || die - distutils-r1_python_prepare_all -} - -python_test() { - esetup.py test -} diff --git a/dev-python/autopep8/autopep8-2.0.0.ebuild b/dev-python/autopep8/autopep8-2.0.0.ebuild index 2788c50132ad..b72eb206c94c 100644 --- a/dev-python/autopep8/autopep8-2.0.0.ebuild +++ b/dev-python/autopep8/autopep8-2.0.0.ebuild @@ -1,36 +1,42 @@ -# Copyright 2020-2022 Liguros Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 + EAPI=8 -PYTHON_COMPAT=( python3_{7,8,9,10,11} ) +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{7,8,9,10,11} pypy3 ) PYTHON_REQ_USE="threads(+)" inherit distutils-r1 DESCRIPTION="Automatically formats Python code to conform to the PEP 8 style guide" -HOMEPAGE="https://github.com/hhatto/autopep8 https://pypi.org/project/autopep8/" -KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" +HOMEPAGE=" + https://github.com/hhatto/autopep8/ + https://pypi.org/project/autopep8/ +" +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="https://github.com/hhatto/${PN}.git" + inherit git-r3 +else + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + KEYWORDS="~alpha amd64 ~arm64 ~ia64 ppc sparc x86 ~amd64-linux ~x86-linux" +fi LICENSE="MIT" SLOT="0" -IUSE="test" - -RDEPEND=">=dev-python/pycodestyle-2.7.0[${PYTHON_USEDEP}]" - -DEPEND=" - dev-python/setuptools[${PYTHON_USEDEP}] - test? ( - ${RDEPEND} - >=dev-python/pydiff-0.2.0[${PYTHON_USEDEP}] - )" - -python_prepare_all() { - # Prevent UnicodeDecodeError with LANG=C - sed -e "/é/d" -i MANIFEST.in || die - distutils-r1_python_prepare_all -} - -python_test() { - esetup.py test -} + +RDEPEND=" + >=dev-python/pycodestyle-2.9.1[${PYTHON_USEDEP}] + dev-python/tomli[${PYTHON_USEDEP}] +" + +distutils_enable_tests pytest + +EPYTEST_DESELECT=( + # test require in source build + test/test_autopep8.py::SystemTests::test_e101_skip_innocuous +) + +PATCHES=( + "${FILESDIR}"/autopep8-1.6.0-lib2to3-deprecation-pytest.patch +) diff --git a/dev-python/autopep8/autopep8-9999.ebuild b/dev-python/autopep8/autopep8-9999.ebuild new file mode 100644 index 000000000000..c2dafd25ca30 --- /dev/null +++ b/dev-python/autopep8/autopep8-9999.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{7,8,9,10,11} pypy3 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 + +DESCRIPTION="Automatically formats Python code to conform to the PEP 8 style guide" +HOMEPAGE=" + https://github.com/hhatto/autopep8/ + https://pypi.org/project/autopep8/ +" +if [[ ${PV} == *9999* ]]; then + EGIT_REPO_URI="https://github.com/hhatto/${PN}.git" + inherit git-r3 +else + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm64 ~ia64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +LICENSE="MIT" +SLOT="0" + +RDEPEND=" + >=dev-python/pycodestyle-2.9.1[${PYTHON_USEDEP}] + dev-python/tomli[${PYTHON_USEDEP}] +" + +distutils_enable_tests pytest + +EPYTEST_DESELECT=( + # test require in source build + test/test_autopep8.py::SystemTests::test_e101_skip_innocuous +) + +PATCHES=( + "${FILESDIR}"/autopep8-1.6.0-lib2to3-deprecation-pytest.patch +) diff --git a/dev-python/autopep8/files/autopep8-1.6.0-lib2to3-deprecation-pytest.patch b/dev-python/autopep8/files/autopep8-1.6.0-lib2to3-deprecation-pytest.patch new file mode 100644 index 000000000000..9aadf2758c0c --- /dev/null +++ b/dev-python/autopep8/files/autopep8-1.6.0-lib2to3-deprecation-pytest.patch @@ -0,0 +1,28 @@ +--- a/test/test_autopep8.py 2022-07-01 16:53:14.197393816 +0300 ++++ b/test/test_autopep8.py 2022-07-01 17:26:07.740358186 +0300 +@@ -5729,7 +5729,11 @@ + list(AUTOPEP8_CMD_TUPLE) + [filename, '--in-place'], + stderr=PIPE, + ) +- _, err = p.communicate() ++ _, error = p.communicate() ++ if b'DeprecationWarning: lib2to3 package is deprecated' in error: ++ err = bytes() ++ else: ++ err = error + self.assertEqual(err, b'') + self.assertEqual(p.returncode, autopep8.EXIT_CODE_OK) + +@@ -5741,7 +5745,11 @@ + list(AUTOPEP8_CMD_TUPLE) + [filename, '--in-place'], + stderr=PIPE, + ) +- _, err = p.communicate() ++ _, error = p.communicate() ++ if b'DeprecationWarning: lib2to3 package is deprecated' in error: ++ err = bytes() ++ else: ++ err = error + self.assertEqual(err, b'') + self.assertEqual(p.returncode, autopep8.EXIT_CODE_OK) + diff --git a/dev-python/autopep8/metadata.xml b/dev-python/autopep8/metadata.xml index 05b98fd0fdb2..ea8988e8af6a 100644 --- a/dev-python/autopep8/metadata.xml +++ b/dev-python/autopep8/metadata.xml @@ -2,10 +2,10 @@ - dev@liguros.net - Development + python@gentoo.org + Python - autopep8 formats Python code based on the output of the pep8 utility - ports + gentoo-staging + \ No newline at end of file -- cgit v1.3