14
0

Accepting request 891405 from home:bnavigator:branches:devel:languages:python

- Skip masquerade tests failung because the newest Pythons don't
  allow invalid addresses gh#giampaolo/pyftpdlib#550, bpo-43285
- Remove script interpreter lines for test files and _compyt.py
  (fix rpmlint warnings)

OBS-URL: https://build.opensuse.org/request/show/891405
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyftpdlib?expand=0&rev=29
This commit is contained in:
2021-05-08 20:45:16 +00:00
committed by Git OBS Bridge
parent 4c952ba5ff
commit 49cdd14ee4
2 changed files with 15 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pyftpdlib
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2016 LISA GmbH, Bingen, Germany.
#
# All modifications and additions to the file contributed by third parties
@@ -36,7 +36,7 @@ BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-pyOpenSSL
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires(postun):update-alternatives
Recommends: python-pysendfile
BuildArch: noarch
%if %{with python2}
@@ -54,6 +54,7 @@ write very asynchronous FTP servers with Python.
%prep
%setup -q -n pyftpdlib-%{version}
sed -i '1 {/env python/ d}' pyftpdlib/test/*.py pyftpdlib/_compat.py
%build
%python_build
@@ -71,6 +72,8 @@ write very asynchronous FTP servers with Python.
# and disable only related tests.
donttest="(TestFtpStoreDataTLSMixin and test_rest_on_stor)"
donttest+=" or (TestFtpStoreDataTLSMixin and test_stor_ascii)"
# https://github.com/giampaolo/pyftpdlib/issues/550
donttest+=" or test_masquerade_address"
ignorebuild="--ignore build"
%{python_expand # expand to python flavor, not to the binary name, then strip the trailing _
builddir=_build.$python_
@@ -78,8 +81,8 @@ ignorebuild+=" --ignore ${builddir%_}"
}
cat > pytest.ini <<EOF
[pytest]
addopts =
-rs -v
addopts =
-rs -v
-k "not ($donttest)"
$ignorebuild
EOF