1 |
commit: 7180ba70c31d019e8abe507f7565c0421db8c584 |
2 |
Author: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 27 23:26:59 2020 +0000 |
4 |
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 27 23:26:59 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7180ba70 |
7 |
|
8 |
dev-python/pyftpdlib: bump to 1.5.6, drop Py2 |
9 |
|
10 |
Package-Manager: Portage-2.3.89, Repoman-2.3.20 |
11 |
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org> |
12 |
|
13 |
dev-python/pyftpdlib/Manifest | 1 + |
14 |
dev-python/pyftpdlib/pyftpdlib-1.5.6.ebuild | 86 +++++++++++++++++++++++++++++ |
15 |
2 files changed, 87 insertions(+) |
16 |
|
17 |
diff --git a/dev-python/pyftpdlib/Manifest b/dev-python/pyftpdlib/Manifest |
18 |
index 6f3cd9abcf6..6b886a65530 100644 |
19 |
--- a/dev-python/pyftpdlib/Manifest |
20 |
+++ b/dev-python/pyftpdlib/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST pyftpdlib-1.5.5.tar.gz 184314 BLAKE2B 2d02839c6809674c7b7c4dfd610610a9231799802cc53ad0a05bfabc8985e77c64d9b239628f13bdc22942460b3e923067f084c3c5ac2b7be7671279a08e0351 SHA512 27427154f893812f689adf3a9ceb4ec2d8f0ea7a4bf7b08671dc146c95f09ddd596a27c85e009d8d6647277def48c0bf0a8b76fb3fba5818eda3dfdc6c10795e |
23 |
+DIST pyftpdlib-1.5.6.tar.gz 188099 BLAKE2B 508e94da6b27b4b1f15306df2916c176f07ca31944398e9ac580fca8d2cdc72ca0ee8e7db282de6745e2e401b23b1fa8cb8de400dc2ba998b93ac45772c78157 SHA512 a3c3c1cac221a8a3c090ee208c03134bb1b8de58099a23ca6ee422f06fb97a0ed561c96e62c62b21fa112dd0b3458651b9fc0c55d72dc0bed79d0583b319a50d |
24 |
|
25 |
diff --git a/dev-python/pyftpdlib/pyftpdlib-1.5.6.ebuild b/dev-python/pyftpdlib/pyftpdlib-1.5.6.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..a73ad6bcc5e |
28 |
--- /dev/null |
29 |
+++ b/dev-python/pyftpdlib/pyftpdlib-1.5.6.ebuild |
30 |
@@ -0,0 +1,86 @@ |
31 |
+# Copyright 1999-2020 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+PYTHON_COMPAT=( python3_{6,7,8} ) |
36 |
+PYTHON_REQ_USE="ssl(+)" |
37 |
+ |
38 |
+inherit distutils-r1 |
39 |
+ |
40 |
+DESCRIPTION="Python FTP server library" |
41 |
+HOMEPAGE="https://github.com/giampaolo/pyftpdlib https://pypi.org/project/pyftpdlib/" |
42 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
43 |
+ |
44 |
+LICENSE="MIT" |
45 |
+SLOT="0" |
46 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris" |
47 |
+IUSE="examples ssl test" |
48 |
+RESTRICT="!test? ( test )" |
49 |
+ |
50 |
+RDEPEND=" |
51 |
+ ssl? ( dev-python/pyopenssl[${PYTHON_USEDEP}] ) |
52 |
+ dev-python/pysendfile[${PYTHON_USEDEP}] |
53 |
+" |
54 |
+DEPEND=" |
55 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
56 |
+ test? ( |
57 |
+ ${RDEPEND} |
58 |
+ dev-python/mock[${PYTHON_USEDEP}] |
59 |
+ dev-python/psutil[${PYTHON_USEDEP}] |
60 |
+ dev-python/pyopenssl[${PYTHON_USEDEP}] |
61 |
+ dev-python/pytest[${PYTHON_USEDEP}] |
62 |
+ ) |
63 |
+" |
64 |
+ |
65 |
+distutils_enable_sphinx docs dev-python/sphinx_rtd_theme |
66 |
+ |
67 |
+python_test() { |
68 |
+ # These tests fail when passing additional options to pytest |
69 |
+ # so we need to run them separately and not pass any args to pytest |
70 |
+ pytest ${PN}/test/test_misc.py || die "Tests failed with ${EPYTHON}" |
71 |
+ # Some of these tests tend to fail |
72 |
+ local skipped_tests=( |
73 |
+ # https://github.com/giampaolo/pyftpdlib/issues/470 |
74 |
+ # https://bugs.gentoo.org/659108 |
75 |
+ pyftpdlib/test/test_functional_ssl.py::TestTimeouts::test_idle_data_timeout2 |
76 |
+ pyftpdlib/test/test_functional_ssl.py::TestTimeoutsTLSMixin::test_idle_data_timeout2 |
77 |
+ # https://github.com/giampaolo/pyftpdlib/issues/471 |
78 |
+ # https://bugs.gentoo.org/636410 |
79 |
+ pyftpdlib/test/test_functional.py::TestCallbacks::test_on_incomplete_file_received |
80 |
+ # https://github.com/giampaolo/pyftpdlib/issues/466 |
81 |
+ # https://bugs.gentoo.org/659786 |
82 |
+ pyftpdlib/test/test_functional_ssl.py::TestFtpListingCmdsTLSMixin::test_nlst |
83 |
+ # https://github.com/giampaolo/pyftpdlib/issues/512 |
84 |
+ # https://bugs.gentoo.org/701146 |
85 |
+ pyftpdlib/test/test_functional_ssl.py::TestFtpStoreDataTLSMixin::test_rest_on_stor |
86 |
+ pyftpdlib/test/test_functional_ssl.py::TestFtpStoreDataTLSMixin::test_stor_ascii |
87 |
+ # https://github.com/giampaolo/pyftpdlib/issues/513 |
88 |
+ # https://bugs.gentoo.org/676232 |
89 |
+ pyftpdlib/test/test_servers.py::TestFtpAuthentication::test_anon_auth |
90 |
+ # https://github.com/giampaolo/pyftpdlib/issues/513 |
91 |
+ # https://bugs.gentoo.org/702578 |
92 |
+ pyftpdlib/test/test_servers.py::TestFtpAuthentication::test_auth_failed |
93 |
+ ) |
94 |
+ # Tests fail with TZ=GMT, see https://bugs.gentoo.org/666623 |
95 |
+ TZ=UTC+1 pytest -vv \ |
96 |
+ --ignore ${PN}/test/test_misc.py ${skipped_tests[@]/#/--deselect } \ |
97 |
+ || die "Tests failed with ${EPYTHON}" |
98 |
+} |
99 |
+ |
100 |
+python_install_all() { |
101 |
+ if use examples; then |
102 |
+ docinto examples |
103 |
+ dodoc -r demo/. |
104 |
+ docompress -x /usr/share/doc/${PF}/examples |
105 |
+ fi |
106 |
+ distutils-r1_python_install_all |
107 |
+} |
108 |
+ |
109 |
+pkg_postinst() { |
110 |
+ if [[ -z ${REPLACING_VERSIONS} ]] && \ |
111 |
+ [[ ${PYTHON_TARGETS} == *python2_7* ]] && \ |
112 |
+ ! has_version dev-python/pysendfile ; then |
113 |
+ elog "dev-python/pysendfile is not installed" |
114 |
+ elog "It can considerably speed up file transfers for Python 2" |
115 |
+ fi |
116 |
+} |