Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
7db221ee5e
!16 更新license为Apache-2.0
From: @tong_1001 
Reviewed-by: @gaoruoshu, @xiezhipeng1 
Signed-off-by: @xiezhipeng1
2022-08-05 03:08:42 +00:00
shixuantong
931f68acf1 Modify the license 2022-08-04 14:39:20 +08:00
openeuler-ci-bot
00af2aed91
!12 移除对python-six的安装依赖
From: @tong_1001 
Reviewed-by: @xiezhipeng1, @gaoruoshu 
Signed-off-by: @xiezhipeng1
2022-08-04 06:23:57 +00:00
shixuantong
ae61db7b74 Remove installation dependency on six 2022-08-04 11:39:57 +08:00
openeuler-ci-bot
e4bfb7b3e5
!10 【轻量级 PR】:fix bogus date in %changelog
From: @loong-C 
Reviewed-by: @gaoruoshu 
Signed-off-by: @gaoruoshu
2022-08-04 03:30:01 +00:00
loong-C
57c4f05ead
fix bogus date in %changelog 2022-06-17 08:14:00 +00:00
openeuler-ci-bot
9869ad73d1 !9 delete python2 dependency
From: @weiwei_150212
Reviewed-by: @hanxinke
Signed-off-by: @hanxinke
2020-11-02 16:15:27 +08:00
19909236985
81d5f214f5 remove python2 2020-10-30 16:25:18 +08:00
openeuler-ci-bot
0310b68f44 !5 update Source0
Merge pull request !5 from 桐小哥/master
2020-09-09 11:11:22 +08:00
桐小哥
32d23fc82e update Source0 2020-09-08 16:48:38 +08:00
3 changed files with 54 additions and 24 deletions

View File

@ -0,0 +1,35 @@
From f3d5f8f724767075854d3d657875e658bbff9a74 Mon Sep 17 00:00:00 2001
From: shixuantong <shixuantong@huawei.com>
Date: Sat, 9 Apr 2022 23:15:27 +0800
Subject: [PATCH] Remove installation dependency on six
The python2 life cycle is over and we can give up support for python2. Therefore, we no longer need to rely on the six module.
---
requests_file.py | 6 ++++--
requirements.txt | 1 -
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/requests_file.py b/requests_file.py
index 7464e55..d9bf5b8 100644
--- a/requests_file.py
+++ b/requests_file.py
@@ -6,8 +6,10 @@
import stat
import locale
import io
-
-from six import BytesIO
+try:
+ from io import BytesIO
+except ImportError:
+ from StringIO import StringIO as BytesIO
class FileAdapter(BaseAdapter):
diff --git a/requirements.txt b/requirements.txt
index 0f255c9..5a687fa 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,2 +1 @@
requests>=1.0.0
-six

View File

@ -2,11 +2,13 @@
Name: python-%{_name} Name: python-%{_name}
Version: 1.5.1 Version: 1.5.1
Release: 1 Release: 5
Summary: A transport adapter for use with the Requests Python library Summary: A transport adapter for use with the Requests Python library
License: ASL 2.0 License: Apache-2.0
URL: https://github.com/dashea/requests-file URL: https://github.com/dashea/requests-file
Source0: https://github.com/dashea/%{_name}/archive/%{_name}-%{version}.tar.gz Source0: https://github.com/dashea/%{_name}/archive/%{version}.tar.gz
Patch6000: backport-Remove-installation-dependency-on-six.patch
BuildArch: noarch BuildArch: noarch
@ -14,21 +16,11 @@ BuildArch: noarch
Requests-File is a transport adapter for use with the Requests Python library Requests-File is a transport adapter for use with the Requests Python library
to allow local filesystem access via file:// URLs. to allow local filesystem access via file:// URLs.
%package -n python2-%{_name}
Summary: python2 version of %{summary}
BuildRequires: python2-devel python2-setuptools python2-pytest
BuildRequires: python2-requests python2-six
Requires: python2-requests python2-six
%{?python_provide:%python_provide python2-%{_name}}
%description -n python2-%{_name}
python2 binds of python-%{_name}.
%package -n python3-%{_name} %package -n python3-%{_name}
Summary: python3 version of %{summary} Summary: python3 version of %{summary}
BuildRequires: python3-devel python3-setuptools python3-pytest BuildRequires: python3-devel python3-setuptools python3-pytest
BuildRequires: python3-requests python3-six BuildRequires: python3-requests python3-six
Requires: python3-requests python3-six Requires: python3-requests
%{?python_provide:%python_provide python3-%{_name}} %{?python_provide:%python_provide python3-%{_name}}
%description -n python3-%{_name} %description -n python3-%{_name}
@ -38,24 +30,15 @@ python3 binds of python-%{_name}.
%autosetup -n %{_name}-%{version} -p1 %autosetup -n %{_name}-%{version} -p1
%build %build
%py2_build
%py3_build %py3_build
%install %install
%py2_install
%py3_install %py3_install
%check %check
export PYTHONPATH=%{buildroot}%{python3_sitelib} export PYTHONPATH=%{buildroot}%{python3_sitelib}
%{__python2} tests/test_requests_file.py
%{__python3} tests/test_requests_file.py %{__python3} tests/test_requests_file.py
%files -n python2-%{_name}
%doc README.rst
%license LICENSE
%{python2_sitelib}/*.py*
%{python2_sitelib}/*info*
%files -n python3-%{_name} %files -n python3-%{_name}
%doc README.rst %doc README.rst
%license LICENSE %license LICENSE
@ -64,7 +47,19 @@ export PYTHONPATH=%{buildroot}%{python3_sitelib}
%{python3_sitelib}/*info* %{python3_sitelib}/*info*
%changelog %changelog
* Thu Jul 28 2020 tianwei <tianwei12@huawei.com> - 1.5.1-1 * Thu Aug 04 2022 shixuantong <shixuantong@h-partners.com> - 1.5.1-5
- Modify the license
* Thu Aug 04 2022 shixuantong <shixuantong@h-partners.com> - 1.5.1-4
- Remove installation dependency on six
* Fri Oct 30 2020 tianwei <tianwei12@huawei.com> - 1.5.1-3
- remove python2
* Tue Sep 8 2020 shixuantong <shixuantong@huawei.com> - 1.5.1-2
- update Source0
* Wed Jul 29 2020 tianwei <tianwei12@huawei.com> - 1.5.1-1
- Package update to 1.5.1 - Package update to 1.5.1
* Fri Oct 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.4.3-9 * Fri Oct 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.4.3-9