## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 22; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global github_owner gabrielfalcao %global github_name HTTPretty %global srcname httpretty %if 0%{?fedora} %global run_tests 1 %else # missing deps in epel9 %global run_tests 0 %endif Name: python-httpretty Version: 1.1.4 Release: %autorelease Summary: HTTP request mock tool for Python License: MIT URL: https://github.com/%{github_owner}/%{github_name} Source0: %{pypi_source} # Avoid unnecessary remote access requirement (note: test only actually # does a remote connection after PR #313) Patch1: python-httpretty-fakesock_getpeercert_noconnect.patch # Remote access (these tests were skipped upstream in <= 0.9.7) Patch2: skip-test_passthrough.patch # Remove timeout, which causes some tests to fail in Koji # # Fixes RHBZ#2046877 Patch3: test_response-no-within.patch # https://github.com/gabrielfalcao/HTTPretty/issues/457 Patch4: test_handle_slashes.patch # https://github.com/gabrielfalcao/HTTPretty/pull/479/files # Fixes RHBZ#2261569 Patch5: chunked_requests_handled_by_urllib3.patch BuildArch: noarch %global _description\ Once upon a time a python developer wanted to use a RESTful API, everything was\ fine but until the day he needed to test the code that hits the RESTful API:\ what if the API server is down? What if its content has changed?\ Don't worry, HTTPretty is here for you. %description %_description %package -n python3-httpretty Summary: HTTP request mock tool for Python 3 Requires: python3-six BuildRequires: python3-devel BuildRequires: python3-setuptools %if %{run_tests} BuildRequires: python3-httplib2 BuildRequires: python3-mock BuildRequires: python3-nose BuildRequires: python3-requests BuildRequires: python3-sure BuildRequires: python3-urllib3 BuildRequires: python3-tornado BuildRequires: python3-eventlet BuildRequires: python3-freezegun BuildRequires: python3-redis %endif %description -n python3-httpretty Once upon a time a python developer wanted to use a RESTful API, everything was fine but until the day he needed to test the code that hits the RESTful API: what if the API server is down? What if its content has changed? Don't worry, HTTPretty is here for you. %prep %autosetup -n httpretty-%{version} -p1 # Alternative for building from commit tarball #autosetup -n %%{github_name}-%%{github_commit} -p1 # nose plugins we don't have yet sed -i 's/^with-randomly = 1$//' setup.cfg sed -i 's/^rednose = 1$//' setup.cfg %build %py3_build %install %py3_install %check %if %{run_tests} %{__python3} -m nose -v %endif %files -n python3-httpretty %doc README.rst %license COPYING %{python3_sitelib}/httpretty %{python3_sitelib}/httpretty-%{version}-py%{python3_version}.egg-info %changelog ## START: Generated by rpmautospec * Tue Jul 16 2024 Python Maint - 1.1.4-22 - Finish Python 3.13 bootstrap * Fri Jun 07 2024 Python Maint - 1.1.4-21 - Bootstrap for Python 3.13 * Thu Feb 08 2024 Maja Massarini - 1.1.4-20 - Fix test, now chunked requests are handled by urrlib3 * Fri Jan 26 2024 Fedora Release Engineering - 1.1.4-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 1.1.4-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 1.1.4-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Sun Jul 02 2023 Python Maint - 1.1.4-16 - Rebuilt for Python 3.12 * Tue Jun 13 2023 Python Maint - 1.1.4-15 - Bootstrap for Python 3.12 * Wed Mar 15 2023 Jiri Popelka - 1.1.4-14 - python3_pkgversion is optional * Fri Jan 20 2023 Fedora Release Engineering - 1.1.4-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Wed Aug 03 2022 Jiri Popelka - 1.1.4-12 - Remove accidentally added file * Wed Aug 03 2022 Jiri Popelka - 1.1.4-11 - Update a test * Wed Aug 03 2022 Jiri Popelka - 1.1.4-10 - %%autorelease * Fri Jul 22 2022 Fedora Release Engineering - 1.1.4-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Thu Jun 16 2022 Python Maint - 1.1.4-8 - Rebuilt for Python 3.11 * Wed Apr 27 2022 Jiri Popelka - 1.1.4-7 - Don't install (missing) test deps on epel9 * Mon Feb 07 2022 Jiri Popelka - 1.1.4-6 - Bump Release to be in sync with autochangelog * Fri Feb 04 2022 Jiri Popelka - 1.1.4-5 - Remove timeout, which causes some tests to fail in Koji (F36) * Fri Feb 04 2022 Jiri Popelka - 1.1.4-4 - Drop Python 2 * Fri Jan 21 2022 Fedora Release Engineering - 1.1.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Aug 19 2021 Jiri Popelka - 1.1.4-1 - 1.1.4 * Fri Jul 23 2021 Fedora Release Engineering - 1.1.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Mon Jun 07 2021 Miro Hrončok - Fallback to WARNING when logging.getLogger().level is None * Fri Jun 04 2021 Python Maint - 1.1.3-2 - Rebuilt for Python 3.10 * Tue May 25 2021 Jiri Popelka - 1.1.3-1 - 1.1.3 * Mon May 24 2021 Jiri Popelka - 1.1.2-1 - 1.1.2 * Thu May 13 2021 Jiri Popelka - 1.1.0-1 - 1.1.0 * Wed Jan 27 2021 Fedora Release Engineering - 1.0.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jan 6 2021 Jiri Popelka - 1.0.5-1 - 1.0.5 - Enable tests for F34 (#1896191 has been resolved) * Tue Oct 13 2020 Jiri Popelka - 1.0.2-4 - Temporarily run tests on Fedora < 34 only * Wed Jul 29 2020 Fedora Release Engineering - 1.0.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Sun May 24 2020 Miro Hrončok - 1.0.2-2 - Rebuilt for Python 3.9 * Fri Mar 27 2020 Jiri Popelka - 1.0.2-1 - 1.0.2 * Thu Jan 30 2020 Fedora Release Engineering - 0.9.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Wed Jan 08 2020 Charalampos Stratakis - 0.9.7-1 - Update to 0.9.7 (rhbz#1759992) * Thu Oct 03 2019 Miro Hrončok - 0.9.6-4 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok - 0.9.6-3 - Rebuilt for Python 3.8 * Tue Aug 06 2019 Jiri Popelka - 0.9.6-2 - Escape macro in comment * Tue Jul 30 2019 Jiri Popelka - 0.9.6-1 - Update to 0.9.6 - Disable python2 subpackage on F30+ * Fri Jul 26 2019 Fedora Release Engineering - 0.9.5-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sat Feb 02 2019 Fedora Release Engineering - 0.9.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sun Nov 18 2018 Zbigniew Jędrzejewski-Szmek - 0.9.5-4 - Drop explicit locale setting for python3, use C.UTF-8 for python2 See https://fedoraproject.org/wiki/Changes/Remove_glibc-langpacks-all_from_buildroot * Sat Jul 14 2018 Fedora Release Engineering - 0.9.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Mon Jun 18 2018 Miro Hrončok - 0.9.5-2 - Rebuilt for Python 3.7 * Wed Jun 06 2018 Miro Hrončok - 0.9.5-1 - Update to 0.9.5, fix for Python 3.7 (#1580060) * Sat May 19 2018 Miro Hrončok - 0.9.4-1 - Update to 0.9.4 (#1572888) * Wed Feb 21 2018 Iryna Shcherbina - 0.8.14-8.20161011git70af1f8 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) * Fri Feb 09 2018 Fedora Release Engineering - 0.8.14-7.20161011git70af1f8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Fri Sep 29 2017 Troy Dawson - 0.8.14-6.20161011git70af1f8 - Cleanup spec file conditionals * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 0.8.14-5.20161011git70af1f8 - Python 2 binary package renamed to python2-httpretty See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 * Thu Jul 27 2017 Fedora Release Engineering - 0.8.14-4.20161011git70af1f8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.8.14-3.20161011git70af1f8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Fri Jan 27 2017 Adam Williamson - 0.8.14-2.20161011git70af1f8 - Backport PR #317 (call reset from setUp / tearDown) - thanks gholms * Fri Jan 06 2017 Adam Williamson - 0.8.14-1.20161011git70af1f8 - Update to current git master (as a 0.8.14 post-release snapshot) - Backport PR #313 (fix with recent OpenSSL, requests and urllib3) - Backport PR #314 (fix a test with Python 3) - Backport PR #315 (fix some issues with urllib 1.10, as found in RHEL 6) - Avoid an unnecessary remote roundtrip in one of the tests - Replace dependency 'un-pinning' patch with some sed commands in the spec - Replace ASCII patch by running setup.py with a UTF-8 LANG - Enable the tests, with necessary buildrequires * Tue Dec 13 2016 Charalampos Stratakis - 0.8.3-8 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 0.8.3-7 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 0.8.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Nov 10 2015 Fedora Release Engineering - 0.8.3-5 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Thu Jun 18 2015 Fedora Release Engineering - 0.8.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Mon Mar 02 2015 Jamie Lennox - 0.8.3-3 - Added conditional __python2 macros for building on RHEL 6. * Tue Feb 24 2015 Jamie Lennox - 0.8.3-2 - Added with_python3 build flags to enable building on EPEL. * Mon Jul 28 2014 Jamie Lennox - 0.8.3-1 - Updated to new version. - Removed check, there are simply too many problems upstream. * Mon Mar 10 2014 Jamie Lennox - 0.8.0-1 - Initial package. ## END: Generated by rpmautospec