Sisyphus repositório
Última atualização: 7 dezembro 2019 | SRPMs: 17495 | Visitas: 16006114
en ru br
ALT Linux repositórios
S:5.2.4-alt1

Group :: Development/Python3
RPM: python3-module-pytest

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

%define _unpackaged_files_terminate_build 1
%define oname pytest

%def_with check

Name: python3-module-%oname
Version: 5.2.1
Release: alt1

Summary: Python test framework
License: MIT
Group: Development/Python3
# Source-git: https://github.com/pytest-dev/pytest.git
Url: https://pypi.python.org/pypi/pytest

Source: %name-%version.tar
Patch: %name-%version-alt.patch

BuildRequires(pre): rpm-build-python3
BuildRequires: python3(setuptools_scm)

%if_with check
BuildRequires: /dev/pts
BuildRequires: /dev/shm
BuildRequires: python3(tox)

BuildRequires: python3(argcomplete)
BuildRequires: python3(atomicwrites)
BuildRequires: python3(attr)
BuildRequires: python3(decorator)
BuildRequires: python3(funcsigs)
BuildRequires: python3(hypothesis)
BuildRequires: python3(jinja2)
BuildRequires: python3(mock)
BuildRequires: python3(more_itertools)
BuildRequires: python3(nose)
BuildRequires: python3(numpy)
BuildRequires: python3(py)
BuildRequires: python3(packaging)
BuildRequires: python3(pathlib2)
BuildRequires: python3(pexpect)
BuildRequires: python3(pluggy)
BuildRequires: python3(requests)
BuildRequires: python3(wcwidth)
BuildRequires: python3(xmlschema)
%endif

BuildArch: noarch

%py3_requires py
%py3_requires wcwidth

%description
The pytest framework makes it easy to write small tests, yet
scales to support complex functional testing for applications and libraries.

%package -n pytest3
Summary: Additional executable for pytest
Group: Development/Python3
Requires: python3-module-%oname = %EVR
# It simply has executables with the same filename:
Conflicts: python3-module-logilab-common < 1.0.2-alt2.hg20150708

%description -n pytest3
The pytest framework makes it easy to write small tests, yet
scales to support complex functional testing for applications and libraries.

%prep
%setup
%patch -p1

# adjust timeouts for testing on aarch64/beehive

grep -qs 'child\.expect(.*)' \
testing/{test_pdb.py,test_terminal.py,test_unittest.py} || exit 1
grep -qs 'child\.expect_exact([[:space:]]*$' \
testing/{test_pdb.py,test_terminal.py,test_unittest.py} || exit 1
grep -qs 'testdir\.spawn_pytest([[:space:]]*$' \
testing/{test_pdb.py,test_terminal.py,test_unittest.py} || exit 1

sed -i -e '/child\.expect(.*)/s/)[[:space:]]*$/, timeout=60)/g;' \
-e '/child\.expect_exact([[:space:]]*$/{$!N;s/\n\([[:space:]]*\)\(.*\)/\n\1\2,\n\1timeout=60,/g}' \
-e '/testdir\.spawn_pytest(.*)/s/)[[:space:]]*$/, expect_timeout=30)/g;' \
-e '/testdir\.spawn_pytest([[:space:]]*$/{$!N;s/\n\([[:space:]]*\)\(.*\)/\n\1\2,\n\1expect_timeout=30,/g}' \
-e 's/\([[:space:]]*\)child\.sendline(\x22p .*)$/&\n\1import time; time.sleep(child.delaybeforesend)/g' \
testing/{test_pdb.py,test_terminal.py,test_unittest.py}

%build
# SETUPTOOLS_SCM_PRETEND_VERSION: when defined and not empty,
# its used as the primary source for the version number in which
# case it will be a unparsed string
export SETUPTOOLS_SCM_PRETEND_VERSION=%version

%python3_build

%install
export SETUPTOOLS_SCM_PRETEND_VERSION=%version

%python3_install
mv %buildroot%_bindir/py.test -T %buildroot%_bindir/py.test3
mv %buildroot%_bindir/pytest -T %buildroot%_bindir/pytest3

%check
export SETUPTOOLS_SCM_PRETEND_VERSION=%version
export PIP_NO_INDEX=YES
export TOXENV=py%{python_version_nodots python3}
tox.py3 --sitepackages -v

%files
%doc AUTHORS LICENSE *.rst
%_bindir/py.test3
%python3_sitelibdir/pytest.py
%python3_sitelibdir/_pytest/
%python3_sitelibdir/__pycache__/
%python3_sitelibdir/pytest-*.egg-info/

%files -n pytest3
%_bindir/pytest3

%changelog

Todas as alterações você pod ver aqui

 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009