summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-07-08 17:06:46 +0200
committerMichał Górny <mgorny@gentoo.org>2023-07-08 17:22:54 +0200
commit57b1556d0e495b36d91439bb3e770bda9dac41de (patch)
tree173063d9126a65e1f69e4b3d04fb251286fae3a4
parentdev-libs/libintl: donot -fvisibility=hidden on macOS. (diff)
downloadgentoo-57b1556d0e495b36d91439bb3e770bda9dac41de.tar.gz
gentoo-57b1556d0e495b36d91439bb3e770bda9dac41de.tar.bz2
gentoo-57b1556d0e495b36d91439bb3e770bda9dac41de.zip
dev-python/pyftpdlib: EAPI 8, PEP517, fix tests
Closes: https://bugs.gentoo.org/909940 Signed-off-by: Michał Górny <mgorny@gentoo.org>
-rw-r--r--dev-python/pyftpdlib/pyftpdlib-1.5.7-r1.ebuild61
1 files changed, 61 insertions, 0 deletions
diff --git a/dev-python/pyftpdlib/pyftpdlib-1.5.7-r1.ebuild b/dev-python/pyftpdlib/pyftpdlib-1.5.7-r1.ebuild
new file mode 100644
index 000000000000..c5dcd0b8478b
--- /dev/null
+++ b/dev-python/pyftpdlib/pyftpdlib-1.5.7-r1.ebuild
@@ -0,0 +1,61 @@
+# 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_{10..11} )
+PYTHON_REQ_USE="ssl(+)"
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Python FTP server library"
+HOMEPAGE="
+ https://github.com/giampaolo/pyftpdlib/
+ https://pypi.org/project/pyftpdlib/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
+IUSE="examples ssl"
+
+RDEPEND="
+ ssl? ( dev-python/pyopenssl[${PYTHON_USEDEP}] )
+"
+BDEPEND="
+ test? (
+ dev-python/psutil[${PYTHON_USEDEP}]
+ dev-python/pyopenssl[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+distutils_enable_sphinx docs dev-python/sphinx-rtd-theme
+
+python_test() {
+ rm -rf pyftpdlib || die
+ # Some of these tests tend to fail
+ local EPYTEST_DESELECT=(
+ # fail because they process sys.argv and expect program args
+ # rather than pytest args, sigh
+ test/test_misc.py
+ # TODO
+ test/test_functional_ssl.py::TestFtpListingCmdsTLSMixin::test_nlst
+ )
+ # Tests fail with TZ=GMT, see https://bugs.gentoo.org/666623
+ local -x TZ=UTC+1
+ # Skips some shoddy tests plus increases timeouts
+ local -x TRAVIS=1
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest --pyargs pyftpdlib
+}
+
+python_install_all() {
+ if use examples; then
+ docinto examples
+ dodoc -r demo/.
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+ distutils-r1_python_install_all
+}