a3f05d8
%global srcname requests-ftp
a3f05d8
bf1bf08
# Disable python3 by default on RHEL < 7
bf1bf08
%if 0%{?rhel} && 0%{?rhel} <= 7
bf1bf08
%bcond_with python3
bf1bf08
%else
bf1bf08
%bcond_without python3
bf1bf08
%endif
bf1bf08
bf1bf08
# Diable python2 by default on RHEL > 7 or Fedora > 28
bf1bf08
%if 0%{?rhel} > 7 || 0%{?fedora} > 28
bf1bf08
%bcond_with python2
bf1bf08
%else
bf1bf08
%bcond_without python2
bf1bf08
%endif
bf1bf08
a3f05d8
Name:           python-%{srcname}
a3f05d8
Version:        0.3.1
02ec2c2
Release:        33%{?dist}
3f76005
Summary:        FTP transport adapter for python-requests
3f76005
02ec2c2
License:        Apache-2.0
3f76005
URL:            https://github.com/Lukasa/requests-ftp
a3f05d8
Source0:        https://pypi.python.org/packages/source/r/%{srcname}/%{srcname}-%{version}.tar.gz
3f76005
3f76005
BuildArch:      noarch
3f76005
c743752
# from https://github.com/Lukasa/requests-ftp/pull/28, handle multi-line responses
c743752
# from 4090846
c743752
Patch1:         PR28-01-Adding-2-tests-and-updated-statud_code-build.patch
c743752
# from 4f6a9f5
c743752
Patch2:         PR28-02-Adding-code-3-to-retr4ieve-status_code.patch
c743752
# from 3fb2700
c743752
Patch3:         PR28-03-fix-warning-in-interpreting-ftp-status-codes-minor-d.patch
c743752
# 2caa427 is only test updates, tests not in pypi tarball
c743752
# from 7321ab3
30024fb
Patch5:         PR28-05-Improve-logging-in-status-code-extraction.patch
c743752
30024fb
# Remove use of the cgi module, which is only used to implement STOR
30024fb
Patch6:         0001-Remove-use-of-the-cgi-module.patch
c743752
a3f05d8
%description
a3f05d8
Requests-FTP is an implementation of a very stupid FTP transport adapter for
a3f05d8
use with the awesome Requests Python library.
a3f05d8
bf1bf08
%if %{with python2}
a3f05d8
%package -n python2-%{srcname}
a3f05d8
Summary:        FTP transport adapter for python-requests
a3f05d8
%{?python_provide:%python_provide python2-%{srcname}}
a3f05d8
3f76005
BuildRequires:  python2-devel
04df00e
BuildRequires:  python2-setuptools
3f76005
04df00e
Requires:       python2-requests
3f76005
a3f05d8
%description -n python2-%{srcname}
3f76005
Requests-FTP is an implementation of a very stupid FTP transport adapter for
3f76005
use with the awesome Requests Python library.
3f76005
a3f05d8
This is the Python 2 version of the transport adapter module.
bf1bf08
%endif
a3f05d8
bf1bf08
%if %{with python3}
a3f05d8
%package -n python3-%{srcname}
3f76005
Summary:        FTP transport adapter for python3-requests
a3f05d8
%{?python_provide:%python_provide python3-%{srcname}}
3f76005
3f76005
BuildRequires:  python3-devel
3f76005
BuildRequires:  python3-setuptools
3f76005
3f76005
Requires:       python3-requests
3f76005
3f76005
%description -n python3-requests-ftp
3f76005
Requests-FTP is an implementation of a very stupid FTP transport adapter for
3f76005
use with the awesome Requests Python library.
3f76005
3f76005
This is the Python 3 version of the transport adapter module.
bf1bf08
%endif
3f76005
3f76005
%prep
c743752
%autosetup -n %{srcname}-%{version} -p1
3f76005
rm -rf requests_ftp.egg-info
3f76005
3f76005
%build
bf1bf08
%if %{with python2}
a3f05d8
%py2_build
bf1bf08
%endif
bf1bf08
bf1bf08
%if %{with python3}
a3f05d8
%py3_build
bf1bf08
%endif
3f76005
3f76005
%install
bf1bf08
%if %{with python2}
a3f05d8
%py2_install
bf1bf08
%endif
bf1bf08
bf1bf08
%if %{with python3}
a3f05d8
%py3_install
bf1bf08
%endif
3f76005
bf1bf08
%if %{with python2}
a3f05d8
%files -n python2-%{srcname}
3f76005
%doc README.rst
3f76005
%license LICENSE
3f76005
%{python2_sitelib}/requests_ftp/
3f76005
%{python2_sitelib}/requests_ftp*.egg-info*
bf1bf08
%endif
3f76005
bf1bf08
%if %{with python3}
a3f05d8
%files -n python3-%{srcname}
3f76005
%doc README.rst
3f76005
%license LICENSE
3f76005
%{python3_sitelib}/requests_ftp/
3f76005
%{python3_sitelib}/requests_ftp*.egg-info*
bf1bf08
%endif
3f76005
3f76005
%changelog
02ec2c2
* Mon Jan 29 2024 David Shea <reallylongword@gmail.com> - 0.3.1-33
02ec2c2
- Migrate to SPDX license
02ec2c2
9672554
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-32
9672554
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
9672554
33cf633
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-31
33cf633
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
33cf633
30024fb
* Mon Oct  2 2023 David Shea <reallylongword@gmail.com> - 0.3.1-30
30024fb
- Remove use of the cgi module
30024fb
bebea99
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-29
bebea99
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
bebea99
eca08e4
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 0.3.1-28
eca08e4
- Rebuilt for Python 3.12
eca08e4
b918e05
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-27
b918e05
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
b918e05
2674e18
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-26
2674e18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
2674e18
289fb2c
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.3.1-25
289fb2c
- Rebuilt for Python 3.11
289fb2c
d7fa031
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-24
d7fa031
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
d7fa031
7437d23
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-23
7437d23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
7437d23
ab85da8
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 0.3.1-22
ab85da8
- Rebuilt for Python 3.10
ab85da8
cc454fb
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-21
cc454fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
cc454fb
9445ae7
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-20
9445ae7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
9445ae7
ec0d923
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 0.3.1-19
ec0d923
- Rebuilt for Python 3.9
ec0d923
ae07193
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-18
ae07193
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
ae07193
66e293b
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.3.1-17
66e293b
- Rebuilt for Python 3.8.0rc1 (#1748018)
66e293b
1ecb322
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 0.3.1-16
1ecb322
- Rebuilt for Python 3.8
1ecb322
c112122
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-15
c112122
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
c112122
5282afc
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-14
5282afc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
5282afc
c743752
* Thu Aug 2  2018 David Shea <dshea@redhat.com> - 0.3.1-13
c743752
- Fix handling of multi-line FTP responses
c743752
1ea8cbf
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-12
1ea8cbf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
1ea8cbf
3e060ad
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 0.3.1-11
3e060ad
- Rebuilt for Python 3.7
3e060ad
bf1bf08
* Tue Apr 24 2018 David Shea <dshea@redhat.com> - 0.3.1-10
bf1bf08
- Conditionalize the python2 and python3 builds
bf1bf08
d0527b7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-9
d0527b7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d0527b7
04df00e
* Sat Jan 27 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.3.1-8
04df00e
- Update Python 2 dependency declarations to new packaging standards
04df00e
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
04df00e
50dd08f
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-7
50dd08f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
50dd08f
6536642
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-6
6536642
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
6536642
aba79d2
* Tue Dec 13 2016 Stratakis Charalampos <cstratak@redhat.com> - 0.3.1-5
aba79d2
- Rebuild for Python 3.6
aba79d2
f3b7c61
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-4
f3b7c61
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
f3b7c61
5b894af
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.1-3
5b894af
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
5b894af
Robert Kuska a2a1568
* Tue Nov 03 2015 Robert Kuska <rkuska@redhat.com> - 0.3.1-2
Robert Kuska a2a1568
- Rebuilt for Python3.5 rebuild
Robert Kuska a2a1568
a3f05d8
* Mon Sep 14 2015 David Shea <dshea@redhat.com> - 0.3.1-1
a3f05d8
- Update to requests-ftp-0.3.1, which fixes the LIST command
a3f05d8
- Switch to the new python packaging guidelines, which renames python-requests-ftp to python2-requests-ftp
a3f05d8
c7c4c92
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-2
c7c4c92
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
c7c4c92
3f76005
* Fri Apr 10 2015 David Shea <dshea@redhat.com> - 0.3.0-1
3f76005
- New upstream version 0.3.0
3f76005
- Adds proxy support and improves compatibility with HTTP requests
3f76005
3f76005
* Thu Mar 12 2015 David Shea <dshea@redhat.com> - 0.2.0-1
3f76005
- Initial package