|
|
@ -1,17 +1,17 @@
|
|
|
|
# Tests requiring Internet connections are disabled by default
|
|
|
|
# Tests requiring Internet connections are disabled by default
|
|
|
|
# pass --with internet to run them (e.g. when doing a local rebuild
|
|
|
|
# pass --with internet to run them (e.g. when doing a local rebuild
|
|
|
|
# for sanity checks before committing)
|
|
|
|
# for sanity checks before committing). Example:
|
|
|
|
|
|
|
|
# $ mock --enable-network --with internet <SRPM>
|
|
|
|
%bcond_with internet
|
|
|
|
%bcond_with internet
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global pypiname tox
|
|
|
|
%global pypiname tox
|
|
|
|
Name: python-%{pypiname}
|
|
|
|
Name: python-%{pypiname}
|
|
|
|
Version: 3.5.3
|
|
|
|
Version: 3.9.0
|
|
|
|
Release: 3%{?dist}
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: Virtualenv-based automation of test activities
|
|
|
|
Summary: Virtualenv-based automation of test activities
|
|
|
|
|
|
|
|
|
|
|
|
# file toxbootstrap.py is licensed under MIT License
|
|
|
|
License: MIT
|
|
|
|
License: GPLv2+ and MIT
|
|
|
|
|
|
|
|
URL: http://tox.testrun.org/
|
|
|
|
URL: http://tox.testrun.org/
|
|
|
|
Source0: https://files.pythonhosted.org/packages/source/t/%{pypiname}/%{pypiname}-%{version}.tar.gz
|
|
|
|
Source0: https://files.pythonhosted.org/packages/source/t/%{pypiname}/%{pypiname}-%{version}.tar.gz
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildArch: noarch
|
|
|
@ -50,7 +50,7 @@ Recommends: python35
|
|
|
|
Recommends: python36
|
|
|
|
Recommends: python36
|
|
|
|
Recommends: python37
|
|
|
|
Recommends: python37
|
|
|
|
Recommends: python38
|
|
|
|
Recommends: python38
|
|
|
|
Recommends: pypy-devel
|
|
|
|
Recommends: pypy2-devel
|
|
|
|
Recommends: pypy3-devel
|
|
|
|
Recommends: pypy3-devel
|
|
|
|
Recommends: python2-devel
|
|
|
|
Recommends: python2-devel
|
|
|
|
Recommends: python3-devel
|
|
|
|
Recommends: python3-devel
|
|
|
@ -58,11 +58,25 @@ Recommends: python3-devel
|
|
|
|
# Replace the python2 version
|
|
|
|
# Replace the python2 version
|
|
|
|
Obsoletes: python2-tox < 2.9.1-4
|
|
|
|
Obsoletes: python2-tox < 2.9.1-4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Replace detox (no longer supported, functionality is now in tox)
|
|
|
|
|
|
|
|
Obsoletes: python3-detox < 0.19-5
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with internet}
|
|
|
|
%if %{with internet}
|
|
|
|
# for tests
|
|
|
|
# for tests
|
|
|
|
|
|
|
|
BuildRequires: python3-filelock
|
|
|
|
|
|
|
|
BuildRequires: python3-flaky
|
|
|
|
|
|
|
|
BuildRequires: python3-freezegun
|
|
|
|
|
|
|
|
BuildRequires: python3-pathlib2
|
|
|
|
|
|
|
|
BuildRequires: python3-pip
|
|
|
|
|
|
|
|
BuildRequires: python3-psutil
|
|
|
|
BuildRequires: python3-py
|
|
|
|
BuildRequires: python3-py
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
|
|
|
BuildRequires: python3-pytest-mock
|
|
|
|
|
|
|
|
#BuildRequires: python3-pytest-randomly -- not packaged
|
|
|
|
|
|
|
|
BuildRequires: python3-pytest-xdist
|
|
|
|
|
|
|
|
BuildRequires: python3-toml
|
|
|
|
BuildRequires: python3-virtualenv
|
|
|
|
BuildRequires: python3-virtualenv
|
|
|
|
|
|
|
|
BuildRequires: /usr/bin/git
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%?python_enable_dependency_generator
|
|
|
|
%?python_enable_dependency_generator
|
|
|
@ -94,7 +108,26 @@ rm -rf %{pypiname}.egg-info
|
|
|
|
# if internet connection available, run tests
|
|
|
|
# if internet connection available, run tests
|
|
|
|
%if %{with internet}
|
|
|
|
%if %{with internet}
|
|
|
|
%check
|
|
|
|
%check
|
|
|
|
TOXENV=py%{python3_version_nodots} %{__python3} setup.py test
|
|
|
|
# there will be failures like
|
|
|
|
|
|
|
|
# ModuleNotFoundError: tox
|
|
|
|
|
|
|
|
# or InterpreterNotFound: python
|
|
|
|
|
|
|
|
# We juggle the environment variables as much as we can, but it's not perfect.
|
|
|
|
|
|
|
|
# To workaround this:
|
|
|
|
|
|
|
|
# 1. build --without internet
|
|
|
|
|
|
|
|
# 2. install the new python3-tox
|
|
|
|
|
|
|
|
# 3. build --with internet
|
|
|
|
|
|
|
|
mkdir .path
|
|
|
|
|
|
|
|
ln -s %{__python3} .path/python
|
|
|
|
|
|
|
|
ln -s /usr/bin/easy_install-%{python3_version} .path/easy_install
|
|
|
|
|
|
|
|
ln -s /usr/bin/pytest-%{python3_version} .path/pytest
|
|
|
|
|
|
|
|
ln -s /usr/bin/pip3 .path/pip
|
|
|
|
|
|
|
|
export PATH=$(pwd)/.path:%{buildroot}%{_bindir}:$PATH
|
|
|
|
|
|
|
|
export PYTHONPATH=%{buildroot}%{python3_sitelib}
|
|
|
|
|
|
|
|
export TOXENV=py%{python3_version_nodots}
|
|
|
|
|
|
|
|
export TOX_TESTENV_PASSENV="PATH TOX_TESTENV_PASSENV"
|
|
|
|
|
|
|
|
# TODO figure out why PEP517/518 tests and test_tox_parallel_build_safe won't pass
|
|
|
|
|
|
|
|
pytest-3 -n auto -k "not test_verbose_isolated_build and not test_tox_parallel_build_safe and not test_dist_exists_version_change"
|
|
|
|
|
|
|
|
rm -rf .path
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python3-%{pypiname}
|
|
|
|
%files -n python3-%{pypiname}
|
|
|
@ -104,6 +137,11 @@ TOXENV=py%{python3_version_nodots} %{__python3} setup.py test
|
|
|
|
%{python3_sitelib}/%{pypiname}-%{version}-py%{python3_version}.egg-info
|
|
|
|
%{python3_sitelib}/%{pypiname}-%{version}-py%{python3_version}.egg-info
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
|
|
|
|
* Tue Apr 30 2019 Miro Hrončok <mhroncok@redhat.com> - 3.9.0-1
|
|
|
|
|
|
|
|
- Update to 3.9.0
|
|
|
|
|
|
|
|
- Obsolete detox
|
|
|
|
|
|
|
|
- License is MIT
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Feb 15 2019 Lumír Balhar <lbalhar@redhat.com> - 3.5.3-3
|
|
|
|
* Fri Feb 15 2019 Lumír Balhar <lbalhar@redhat.com> - 3.5.3-3
|
|
|
|
- Recommend Python 3.8
|
|
|
|
- Recommend Python 3.8
|
|
|
|
|
|
|
|
|
|
|
|