Sisyphus repositório
Última atualização: 21 agosto 2019 | SRPMs: 17343 | Visitas: 14692096
en ru br
ALT Linux repositórios
S:2.7.1-alt2

Group :: Desenvolvimento/Python
RPM: python-module-pytest-cov

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

%define _unpackaged_files_terminate_build 1
%define oname pytest-cov

%def_with check

Name: python-module-%oname
Version: 2.6.1
Release: alt2

Summary: pytest plugin for coverage reporting with support for centralised and distributed testing
License: MIT
Group: Development/Python
# Source-git: https://github.com/pytest-dev/pytest-cov.git
Url: https://pypi.org/project/pytest-cov/

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

BuildRequires(pre): rpm-build-python3

%if_with check
BuildRequires: python-module-coverage
BuildRequires: python-module-fields
BuildRequires: python-module-process-tests
BuildRequires: python-module-pytest-xdist
BuildRequires: python-module-virtualenv
BuildRequires: python3-module-coverage
BuildRequires: python3-module-fields
BuildRequires: python3-module-process-tests
BuildRequires: python3-module-pytest-xdist
BuildRequires: python3-module-tox
%endif

BuildArch: noarch

%description
This plugin produces coverage reports. It supports centralised testing
and distributed testing in both load and each modes. It also supports
coverage of subprocesses.

All features offered by the coverage package should be available, either
through pytest-cov or through coverage's config file.

%package -n python3-module-%oname
Summary: pytest plugin for coverage reporting with support for centralised and distributed testing
Group: Development/Python3

%description -n python3-module-%oname
This plugin produces coverage reports. It supports centralised testing
and distributed testing in both load and each modes. It also supports
coverage of subprocesses.

All features offered by the coverage package should be available, either
through pytest-cov or through coverage's config file.

%prep
%setup
%patch -p1

rm -rf ../python3
cp -a . ../python3

%build
%python_build

pushd ../python3
%python3_build
popd

%install
%python_install

pushd ../python3
%python3_install
popd

%check
# to read a custom pth-file one should add a such path to site-dir
# this only needs for tests at RPM build time
echo "import site;site.addsitedir(\"$(pwd)/src\")" > tests/sitecustomize.py
sed -i '/\[testenv\]/a whitelist_externals =\
   \/bin\/cp\
   \/bin\/sed\
commands_pre =\
   cp %_bindir\/py.test3 \{envbindir\}\/pytest\
   sed -i \x271c \#!\{envpython\}\x27 \{envbindir\}\/pytest' tox.ini

grep -qs '[[:space:]]*hunter[[:space:]]*$' tox.ini || exit 1
sed -i '/[[:space:]]*hunter[[:space:]]*$/d' tox.ini
# don't use a specific version
sed -i 's/==/>=/g' tox.ini

export PIP_NO_INDEX=YES
export TOX_TESTENV_PASSENV='RPM_BUILD_DIR'
export TOXENV=py%{python_version_nodots python},py%{python_version_nodots python3}
tox.py3 --sitepackages -p auto -o -v

%files
%doc README.rst CHANGELOG.rst
%python_sitelibdir/pytest-cov.pth
%python_sitelibdir/pytest_cov/
%python_sitelibdir/pytest_cov-*.egg-info/

%files -n python3-module-%oname
%doc README.rst CHANGELOG.rst
%python3_sitelibdir/pytest-cov.pth
%python3_sitelibdir/pytest_cov/
%python3_sitelibdir/pytest_cov-*.egg-info/

%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