forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app-text/pytextile: Bump to 4.0.1 and support python3_9
Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Nils Freydank <[email protected]> Signed-off-by: Joonas Niilola <[email protected]>
- Loading branch information
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DIST pytextile-3.0.3.tar.gz 48560 BLAKE2B f8d3077e2b8e4de7157dcd9ed17f7889301946c2d3034dbbb0171b4930bd7268c65ce1f950552db2b783aa48acae639d5f4ccfcbca96807562b4a6377c3dd220 SHA512 142fe77c8858b0444428f9ca0f24d1a054a1566f85f00fd5cf860bb705a19666249cd03420d258d5acfc9f45052dd25e52767492a60a10d986d86b711b54612f | ||
DIST pytextile-4.0.1.tar.gz 49282 BLAKE2B b51220ff33fe43b83d0aefee840b5170747015073fbe88934798c2505c3455e9805eee8815ec8068521c88a44a309bd0eb32e84757d088536f1c12a1f9bc0ca0 SHA512 e299663fd71b935e9c948649baba80584b1339dd3393a3f37b39475fe1d6a4addaaa2adcd16ba57b4c5db43ab9f8de6e9332871915b1fff7b7882ad5e8d64580 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Copyright 1999-2020 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
PYTHON_COMPAT=( python3_{7,8,9} ) | ||
|
||
inherit distutils-r1 | ||
DISTUTILS_USE_SETUPTOOLS=rdepend | ||
|
||
MY_PN="python-textile" | ||
MY_P="${MY_PN}-${PV}" | ||
|
||
DESCRIPTION="A Python port of Textile, A humane web text generator" | ||
HOMEPAGE="https://github.com/textile/python-textile" | ||
SRC_URI="https://github.com/textile/python-textile/archive/${PV}.tar.gz -> ${P}.tar.gz" | ||
|
||
LICENSE="BSD" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" | ||
IUSE="test" | ||
RESTRICT="!test? ( test )" | ||
|
||
RDEPEND=" | ||
dev-python/html5lib[${PYTHON_USEDEP}] | ||
dev-python/regex[${PYTHON_USEDEP}] | ||
dev-python/six[${PYTHON_USEDEP}]" | ||
DEPEND=" | ||
dev-python/setuptools[${PYTHON_USEDEP}] | ||
test? ( | ||
${RDEPEND} | ||
dev-python/pytest[${PYTHON_USEDEP}] | ||
)" | ||
|
||
S="${WORKDIR}/${MY_P}" | ||
|
||
src_prepare() { | ||
default | ||
# remove useless --cov arg injection | ||
rm pytest.ini || die | ||
# remove useless pytest-runner dep | ||
sed -e "s/pytest-runner//g" -i setup.py || die | ||
|
||
# remove tests that need network access | ||
local my_drop_tests=( | ||
test_getimagesize.py | ||
test_imagesize.py | ||
test_textile.py | ||
) | ||
for test in ${my_drop_tests[@]}; | ||
do rm "tests/$test" || die | ||
done | ||
} | ||
|
||
python_test() { | ||
pytest || die "Testsuite failed under ${EPYTHON}" | ||
} |