Blob Blame History Raw
Name:           nox
Version:        2022.11.21
Release:        4%{?dist}
Summary:        Flexible test automation

License:        ASL 2.0
URL:            https://github.com/wntrblm/nox
# Using github source files since PyPI doesn't contain "tests" folder anymore
Source0:        %{url}/archive/refs/tags/%{version}.tar.gz
Patch0:         %{url}/commit/53c8d7c2a06bd460bb0377b06c316431516d5744.patch
# Slightly modified patch to apply here. Proposed upstream.
Patch1:         %{url}/pull/687.patch
BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  python3-flask
BuildRequires:  python3-myst-parser
BuildRequires:  python3-pytest

%description
Nox is a command-line tool that automates testing in multiple Python
environments, similar to tox. Unlike tox, Nox uses a standard Python
file for configuration.

%prep
%autosetup -p1 -n nox-%{version}

# Backport from https://github.com/wntrblm/nox/commit/da3651953cb1016adf42f2e38a8a66835cdb1a73
sed -i "/py._path.local.LocalPath/d" tests/test_virtualenv.py

# Use current Python version instead of Python 2 in tests
sed -i "s/2\.7/%python3_version/;s/27/%python3_version_nodots/" tests/test_tox_to_nox.py

%generate_buildrequires
%pyproject_buildrequires -r -x tox_to_nox

%build
%pyproject_wheel

%install
%pyproject_install
%pyproject_save_files nox

%check
# test__resolved_interpreter_not_found has broken fixture, see %%prep
%pytest -k "not test__resolved_interpreter_not_found"

%files -f %{pyproject_files}
%{_bindir}/nox
%pycached %exclude %{python3_sitelib}/nox/tox_to_nox.py
%exclude %{python3_sitelib}/nox/tox_to_nox.jinja2
%exclude %{_bindir}/tox-to-nox

%pyproject_extras_subpkg -n nox tox_to_nox
%pycached %{python3_sitelib}/nox/tox_to_nox.py
%{python3_sitelib}/nox/tox_to_nox.jinja2
%{_bindir}/tox-to-nox

%changelog
* Thu Feb 16 2023 Lumír Balhar <lbalhar@redhat.com> - 2022.11.21-4
- Fix tox_to_nox for tox 4

* Tue Jan 24 2023 Lumír Balhar <lbalhar@redhat.com> - 2022.11.21-3
- Fix FTBFS

* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2022.11.21-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

* Thu Dec 01 2022 ondaaak <ondaaak@gmail.com> - 2022.11.21-1
- Update to 2022.11.21

* Mon Aug 22 2022 ondaaak <ondaaak@gmail.com> - 2022.8.7-1
- Update to 2022.8.7

* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2022.1.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

* Wed Jun 15 2022 Python Maint <python-maint@redhat.com> - 2022.1.7-2
- Rebuilt for Python 3.11

* Wed Mar 23 2022 ondaaak <ondaaak@gmail.com> - 2022.1.7-1
- Initial package for Fedora