|
|
aad1e4 |
# Not building for EPEL 6 or 7 at present due to issues building
|
|
|
aad1e4 |
# python-httpbin; see that package's spec for details
|
|
|
aad1e4 |
|
|
|
aad1e4 |
# Disable Python 2 builds for Fedora > 29, EPEL > 7
|
|
|
aad1e4 |
%if 0%{?fedora} > 29 || 0%{?rhel} > 7
|
|
|
aad1e4 |
%bcond_with python2
|
|
|
aad1e4 |
%global obsolete2 1
|
|
|
aad1e4 |
%else
|
|
|
aad1e4 |
%bcond_without python2
|
|
|
aad1e4 |
%global obsolete2 0
|
|
|
aad1e4 |
%endif
|
|
|
aad1e4 |
|
|
|
aad1e4 |
%global github_owner kevin1024
|
|
|
aad1e4 |
%global github_name pytest-httpbin
|
|
|
aad1e4 |
%global modname pytest_httpbin
|
|
|
aad1e4 |
|
|
|
aad1e4 |
%global desc Pytest-httpbin creates a pytest fixture that is dependency-injected into your \
|
|
|
aad1e4 |
tests. It automatically starts up a HTTP server in a separate thread running \
|
|
|
aad1e4 |
a local instance of httpbin (a web service for testing HTTP libraries) and \
|
|
|
aad1e4 |
provides your test with the URL in the fixture.
|
|
|
aad1e4 |
|
|
|
aad1e4 |
%global sum Fixture providing local instance of httpbin test service
|
|
|
aad1e4 |
|
|
|
aad1e4 |
%global t_requires python2-httpbin python2-six python2-pytest
|
|
|
aad1e4 |
%global t3_requires python3-httpbin python3-six python3-pytest
|
|
|
aad1e4 |
|
|
|
aad1e4 |
Name: python-%{github_name}
|
|
|
aad1e4 |
Version: 1.0.0
|
|
|
aad1e4 |
Release: 5%{?dist}
|
|
|
aad1e4 |
Summary: %{sum}
|
|
|
aad1e4 |
|
|
|
aad1e4 |
# License is included in-line in README.md
|
|
|
aad1e4 |
License: MIT
|
|
|
aad1e4 |
URL: https://github.com/%{github_owner}/%{github_name}
|
|
|
aad1e4 |
# NOTE: the source includes a CA trust bundle (certs/cacert.pem). We
|
|
|
aad1e4 |
# don't replace it with the system-wide trust bundle because it's only
|
|
|
aad1e4 |
# used for httpbin itself and contains only the self-signed cert,
|
|
|
aad1e4 |
# valid only for 127.0.0.1, that the test server uses. We can't
|
|
|
aad1e4 |
# replace it because we can't actually securely have the test server
|
|
|
aad1e4 |
# use a cert that would be trusted by the system-wide trust bundle.
|
|
|
aad1e4 |
Source0: https://github.com/%{github_owner}/%{github_name}/archive/v%{version}.tar.gz
|
|
|
aad1e4 |
|
|
|
aad1e4 |
BuildArch: noarch
|
|
|
aad1e4 |
|
|
|
aad1e4 |
%description
|
|
|
aad1e4 |
%{desc}
|
|
|
aad1e4 |
|
|
|
aad1e4 |
#################################################################################
|
|
|
aad1e4 |
%if %{with python2}
|
|
|
aad1e4 |
%package -n python2-%{github_name}
|
|
|
aad1e4 |
Summary: %{sum}
|
|
|
aad1e4 |
|
|
|
aad1e4 |
BuildRequires: python2-setuptools
|
|
|
aad1e4 |
BuildRequires: python2-devel
|
|
|
aad1e4 |
# For tests
|
|
|
aad1e4 |
BuildRequires: python2-requests
|
|
|
aad1e4 |
BuildRequires: %{t_requires}
|
|
|
aad1e4 |
|
|
|
aad1e4 |
%{?python_provide:%python_provide python2-%{github_name}}
|
|
|
aad1e4 |
Requires: %{t_requires}
|
|
|
aad1e4 |
|
|
|
aad1e4 |
%description -n python2-%{github_name}
|
|
|
aad1e4 |
%{desc}
|
|
|
aad1e4 |
|
|
|
aad1e4 |
This package provides the Python 2 implementation.
|
|
|
aad1e4 |
%endif # with python2
|
|
|
aad1e4 |
|
|
|
aad1e4 |
%package -n python3-%{github_name}
|
|
|
aad1e4 |
Summary: %{sum}
|
|
|
aad1e4 |
|
|
|
aad1e4 |
BuildRequires: python3-setuptools
|
|
|
aad1e4 |
BuildRequires: python3-devel
|
|
|
aad1e4 |
# For tests
|
|
|
aad1e4 |
BuildRequires: python3-requests
|
|
|
aad1e4 |
BuildRequires: %{t3_requires}
|
|
|
aad1e4 |
|
|
|
aad1e4 |
%{?python_provide:%python_provide python3-%{github_name}}
|
|
|
aad1e4 |
%if 0%{?rhel} && 0%{?rhel} < 9
|
|
|
aad1e4 |
# manual requires are only needed on EL < 9
|
|
|
aad1e4 |
Requires: %{t3_requires}
|
|
|
aad1e4 |
%endif
|
|
|
aad1e4 |
%if 0%{?obsolete2}
|
|
|
aad1e4 |
Obsoletes: python2-%{github_name} < %{version}-%{release}
|
|
|
aad1e4 |
%endif # obsolete2
|
|
|
aad1e4 |
|
|
|
aad1e4 |
%description -n python3-%{github_name}
|
|
|
aad1e4 |
%{desc}
|
|
|
aad1e4 |
|
|
|
aad1e4 |
This package provides the Python 3 implementation.
|
|
|
aad1e4 |
|
|
|
aad1e4 |
#################################################################################
|
|
|
aad1e4 |
%prep
|
|
|
aad1e4 |
%autosetup -n %{github_name}-%{version} -p1
|
|
|
aad1e4 |
|
|
|
aad1e4 |
|
|
|
aad1e4 |
%build
|
|
|
aad1e4 |
%if %{with python2}
|
|
|
aad1e4 |
%py2_build
|
|
|
aad1e4 |
%endif # with python2
|
|
|
aad1e4 |
%py3_build
|
|
|
aad1e4 |
|
|
|
aad1e4 |
%install
|
|
|
aad1e4 |
%if %{with python2}
|
|
|
aad1e4 |
%py2_install
|
|
|
aad1e4 |
%endif # with python2
|
|
|
aad1e4 |
%py3_install
|
|
|
aad1e4 |
|
|
|
aad1e4 |
#################################################################################
|
|
|
aad1e4 |
%check
|
|
|
aad1e4 |
%if %{with python2}
|
|
|
aad1e4 |
PYTHONPATH=./ py.test-2
|
|
|
aad1e4 |
%endif # with python2
|
|
|
aad1e4 |
PYTHONPATH=./ py.test-3
|
|
|
aad1e4 |
|
|
|
aad1e4 |
#################################################################################
|
|
|
aad1e4 |
%if %{with python2}
|
|
|
aad1e4 |
%files -n python2-%{github_name}
|
|
|
aad1e4 |
%{python2_sitelib}/%{modname}*
|
|
|
aad1e4 |
%doc DESCRIPTION.rst README.md
|
|
|
aad1e4 |
%endif # with python2
|
|
|
aad1e4 |
|
|
|
aad1e4 |
%files -n python3-%{github_name}
|
|
|
aad1e4 |
%{python3_sitelib}/%{modname}*
|
|
|
aad1e4 |
%doc DESCRIPTION.rst README.md
|
|
|
aad1e4 |
|
|
|
aad1e4 |
#################################################################################
|
|
|
aad1e4 |
%changelog
|
|
|
aad1e4 |
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-5
|
|
|
aad1e4 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.0.0-4
|
|
|
aad1e4 |
- Rebuilt for Python 3.10
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-3
|
|
|
aad1e4 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-2
|
|
|
aad1e4 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Fri Jul 10 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-1
|
|
|
aad1e4 |
- Update to 1.0.0
|
|
|
aad1e4 |
- Resolves rhbz#1676023
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Sat May 30 2020 Miro Hrončok <mhroncok@redhat.com> - 0.3.0-13
|
|
|
aad1e4 |
- Drop manual requires to support usage with pytest4
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 0.3.0-12
|
|
|
aad1e4 |
- Rebuilt for Python 3.9
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-11
|
|
|
aad1e4 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.3.0-10
|
|
|
aad1e4 |
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Sat Aug 17 2019 Miro Hrončok <mhroncok@redhat.com> - 0.3.0-9
|
|
|
aad1e4 |
- Rebuilt for Python 3.8
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-8
|
|
|
aad1e4 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-7
|
|
|
aad1e4 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Fri Nov 23 2018 Adam Williamson <awilliam@redhat.com> - 0.3.0-6
|
|
|
aad1e4 |
- Disable Python 2 build on F30+
|
|
|
aad1e4 |
- Drop all EPEL compat bits for now as we can't build on EPEL
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-5
|
|
|
aad1e4 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 0.3.0-4
|
|
|
aad1e4 |
- Make sure not to autouse fixtures from the API
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 0.3.0-3
|
|
|
aad1e4 |
- Rebuilt for Python 3.7
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-2
|
|
|
aad1e4 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Thu Nov 16 2017 Adam Williamson <awilliam@redhat.com> - 0.3.0-1
|
|
|
aad1e4 |
- New release 0.3.0
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.3-7
|
|
|
aad1e4 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Wed May 31 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.2.3-6
|
|
|
aad1e4 |
- Remove useless (and broken) requires on python3-pkgversion-macros
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.3-5
|
|
|
aad1e4 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Thu Dec 29 2016 Adam Williamson <awilliam@redhat.com> - 0.2.3-4
|
|
|
aad1e4 |
- Drop some unnecessary requirements
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Thu Dec 29 2016 Adam Williamson <awilliam@redhat.com> - 0.2.3-3
|
|
|
aad1e4 |
- Ensure we own all packaged dirs
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Thu Dec 29 2016 Adam Williamson <awilliam@redhat.com> - 0.2.3-2
|
|
|
aad1e4 |
- Fix subpackage names
|
|
|
aad1e4 |
|
|
|
aad1e4 |
* Thu Dec 29 2016 Adam Williamson <awilliam@redhat.com> - 0.2.3-1
|
|
|
aad1e4 |
- Initial package
|