Group :: Development/Python3
RPM: python3-module-tox
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
%define _unpackaged_files_terminate_build 1
%define pypi_name tox
%define tomli %(%__python3 -c 'import sys;print(int(sys.version_info < (3, 11)))')
%def_with check
Name: python3-module-%pypi_name
Version: 3.27.0
Release: alt1
Summary: virtualenv-based automation of test activities
License: MIT
Group: Development/Python3
Url: https://pypi.python.org/pypi/tox/
VCS: https://github.com/tox-dev/tox
Source: %name-%version.tar
Patch: %name-%version-alt.patch
BuildRequires(pre): rpm-build-python3
# build backend and its deps
BuildRequires: python3(setuptools)
BuildRequires: python3(wheel)
BuildRequires: python3(setuptools_scm)
%if_with check
BuildRequires: /proc
# install_requires
BuildRequires: python3(filelock)
BuildRequires: python3(packaging)
BuildRequires: python3(pluggy)
BuildRequires: python3(py)
BuildRequires: python3(six)
BuildRequires: python3(virtualenv)
%if %tomli
BuildRequires: python3(tomli)
%endif
# testing
BuildRequires: python3(flaky)
BuildRequires: python3(freezegun)
BuildRequires: python3(psutil)
BuildRequires: python3(pytest)
BuildRequires: python3(pytest_mock)
BuildRequires: python3(pytest_randomly)
%endif
BuildArch: noarch
%py3_requires virtualenv
%if %tomli
# rebuild against Python 3.11 is required to get rid of old dependency
%py3_requires tomli
%endif
%description
Tox as is a generic virtualenv management and test command line tool you
can use for:
* checking your package installs correctly with different Python
versions and interpreters
* running your tests in each of the environments, configuring your test
tool of choice
* acting as a frontend to Continuous Integration servers, greatly
reducing boilerplate and merging CI and shell-based testing.
%prep
%setup
%patch -p1
# setuptools_scm implements a file_finders entry point which returns all files
# tracked by SCM.
if [ ! -d .git ]; then
git init
git config user.email author at example.com
git config user.name author
git add .
git commit -m 'release'
git tag '%version'
fi
%build
%pyproject_build
%install
%pyproject_install
pushd %buildroot%_bindir
for i in $(ls); do
mv $i $i.py3
done
popd
%check
# NOTE: don't use regular %%tox_check_* RPM macros here due to circular
# dependency on tox. These macros automatically pull tox and its plugins into
# build env. Anyway, we want to test tox being packaged with the same tox, not
# a repo's one.
%global tox_buildrequires %{?tox_buildrequires:%nil}
%global _tox_bin %{?_tox_bin:%buildroot%_bindir/tox.py3}
%global tox_check %{?tox_check:%{tox:} --sitepackages -vvr -s false}
export TOX_TESTENV_PASSENV='PIP_NO_INDEX \
PIP_NO_BUILD_ISOLATION TOX_LIMITED_SHEBANG'
export TOX_LIMITED_SHEBANG=1
export PYTHONPATH=%buildroot%python3_sitelibdir_noarch
%tox_check_pyproject -- -m "not internet"
%files
%_bindir/tox.py3
%_bindir/tox-quickstart.py3
%python3_sitelibdir/tox/
%python3_sitelibdir/%{pyproject_distinfo %pypi_name}/
%changelog
…
Todas as alterações você pod ver aqui
%define pypi_name tox
%define tomli %(%__python3 -c 'import sys;print(int(sys.version_info < (3, 11)))')
%def_with check
Name: python3-module-%pypi_name
Version: 3.27.0
Release: alt1
Summary: virtualenv-based automation of test activities
License: MIT
Group: Development/Python3
Url: https://pypi.python.org/pypi/tox/
VCS: https://github.com/tox-dev/tox
Source: %name-%version.tar
Patch: %name-%version-alt.patch
BuildRequires(pre): rpm-build-python3
# build backend and its deps
BuildRequires: python3(setuptools)
BuildRequires: python3(wheel)
BuildRequires: python3(setuptools_scm)
%if_with check
BuildRequires: /proc
# install_requires
BuildRequires: python3(filelock)
BuildRequires: python3(packaging)
BuildRequires: python3(pluggy)
BuildRequires: python3(py)
BuildRequires: python3(six)
BuildRequires: python3(virtualenv)
%if %tomli
BuildRequires: python3(tomli)
%endif
# testing
BuildRequires: python3(flaky)
BuildRequires: python3(freezegun)
BuildRequires: python3(psutil)
BuildRequires: python3(pytest)
BuildRequires: python3(pytest_mock)
BuildRequires: python3(pytest_randomly)
%endif
BuildArch: noarch
%py3_requires virtualenv
%if %tomli
# rebuild against Python 3.11 is required to get rid of old dependency
%py3_requires tomli
%endif
%description
Tox as is a generic virtualenv management and test command line tool you
can use for:
* checking your package installs correctly with different Python
versions and interpreters
* running your tests in each of the environments, configuring your test
tool of choice
* acting as a frontend to Continuous Integration servers, greatly
reducing boilerplate and merging CI and shell-based testing.
%prep
%setup
%patch -p1
# setuptools_scm implements a file_finders entry point which returns all files
# tracked by SCM.
if [ ! -d .git ]; then
git init
git config user.email author at example.com
git config user.name author
git add .
git commit -m 'release'
git tag '%version'
fi
%build
%pyproject_build
%install
%pyproject_install
pushd %buildroot%_bindir
for i in $(ls); do
mv $i $i.py3
done
popd
%check
# NOTE: don't use regular %%tox_check_* RPM macros here due to circular
# dependency on tox. These macros automatically pull tox and its plugins into
# build env. Anyway, we want to test tox being packaged with the same tox, not
# a repo's one.
%global tox_buildrequires %{?tox_buildrequires:%nil}
%global _tox_bin %{?_tox_bin:%buildroot%_bindir/tox.py3}
%global tox_check %{?tox_check:%{tox:} --sitepackages -vvr -s false}
export TOX_TESTENV_PASSENV='PIP_NO_INDEX \
PIP_NO_BUILD_ISOLATION TOX_LIMITED_SHEBANG'
export TOX_LIMITED_SHEBANG=1
export PYTHONPATH=%buildroot%python3_sitelibdir_noarch
%tox_check_pyproject -- -m "not internet"
%files
%_bindir/tox.py3
%_bindir/tox-quickstart.py3
%python3_sitelibdir/tox/
%python3_sitelibdir/%{pyproject_distinfo %pypi_name}/
%changelog
…
Todas as alterações você pod ver aqui