Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
8e6397508f
!16 Update to version 0.18.3
From: @wang--ge 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2023-07-07 06:25:27 +00:00
wang--ge
1ccf648d44 update to version 0.18.3 2023-07-07 11:37:39 +08:00
openeuler-ci-bot
9f86b03e85
!9 Fix CVE-2022-40899
From: @starlet-dx 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2023-03-13 01:09:55 +00:00
starlet-dx
6fbcd802e7 Fix CVE-2022-40899 2023-03-10 15:03:58 +08:00
openeuler-ci-bot
d3849fc4ff !5 update future package for openstack wallaby
From: @liksh
Reviewed-by: 
Signed-off-by:
2021-08-16 11:44:56 +00:00
liksh
3cee103957 update from 0.16.0 to 0.18.2 2021-08-10 17:00:51 +08:00
openeuler-ci-bot
694d45dc21 !4 remove python2 subpackage
From: @lei_ju
Reviewed-by: @xiezhipeng1
Signed-off-by: @xiezhipeng1
2020-10-29 19:43:55 +08:00
lei_ju
2a902f0463 remove python2 subpackage 2020-10-29 10:32:46 +08:00
openeuler-ci-bot
1724b04de7 !3 add yaml file
Merge pull request !3 from Captain.Wei/master
2020-05-19 16:13:48 +08:00
Captain Wei
c68ae64da3 add yaml file 2020-05-11 15:56:50 +08:00
4 changed files with 25 additions and 72 deletions

BIN
future-0.18.3.tar.gz Normal file

Binary file not shown.

View File

@ -3,35 +3,25 @@
This package intends to provides a compatibility layer for Python between its \
two version release. The future and past packages are both provides for backports \
and forwards, in which you are able to use a single, clean codebase to run under \
Python2/3 environmets easily. With also providing futurize and pasteurize scripts, \
Python3 environmets easily. With also providing futurize and pasteurize scripts, \
you can convert you Python code to support both version.
%{!?python2_shortver: %global python2_shortver %(%{__python2} -c 'import sys; print(str(sys.version_info.major) + "." + str(sys.version_info.minor))')}
%{!?python3_shortver: %global python3_shortver %(%{__python3} -c 'import sys; print(str(sys.version_info.major) + "." + str(sys.version_info.minor))')}
Name: future
Version: 0.16.0
Release: 11
Summary: Missing compatibility layer between Python 2 and Python 3
Version: 0.18.3
Release: 1
Summary: Missing compatibility layer on Python 3
License: MIT
URL: http://python-future.org/
Source0: https://github.com/PythonCharmers/python-future/archive/v%{version}.tar.gz#/python-future-%{version}.tar.gz
Source0: %{pypi_source future}
BuildArch: noarch
%description
%{desc}
%package -n python2-future
Summary: Missing compatibility layer between Python 2 and Python 3
%{?python_provide:%python_provide python2-future}
BuildRequires: python2-devel python2-setuptools python2-numpy python2-requests python2-pytest
Provides: future = 0:%{version}-%{release}
%description -n python2-future
%{desc}
%package -n python3-future
Summary: Missing compatibility layer between Python 2 and Python 3
Summary: Missing compatibility layer on Python 3
%{?python_provide:%python_provide python3-future}
BuildRequires: python3-devel python3-setuptools python3-numpy python3-requests python3-pytest
@ -39,28 +29,12 @@ BuildRequires: python3-devel python3-setuptools python3-numpy python3-requests
%{desc}
%prep
%autosetup -c -p1
mv python-future-%{version} python2
cd python2
find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|'
cd ..
cp -a python2 python3
find python3 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
%autosetup -p1
%build
cd python2
CFLAGS="%{optflags}" %{__python2} setup.py build --executable="%{__python2} -s"
cd ..
cd python3
CFLAGS="%{optflags}" %{__python3} setup.py build --executable="%{__python3} -s"
cd ..
%install
cd python3
CFLAGS="%{optflags}" %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
mv $RPM_BUILD_ROOT%{_bindir}/futurize $RPM_BUILD_ROOT%{_bindir}/python3-futurize
mv $RPM_BUILD_ROOT%{_bindir}/pasteurize $RPM_BUILD_ROOT%{_bindir}/python3-pasteurize
@ -75,53 +49,16 @@ touch pasteurize-3 pasteurize-%{?python3_shortver}
install -p pasteurize-3 pasteurize-%{?python3_shortver} $RPM_BUILD_ROOT%{_bindir}
ln -sf %{_bindir}/python3-pasteurize $RPM_BUILD_ROOT%{_bindir}/pasteurize-3
ln -sf %{_bindir}/python3-pasteurize $RPM_BUILD_ROOT%{_bindir}/pasteurize-%{?python3_shortver}
cd ..
cd python2
CFLAGS="%{optflags}" %{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
cp -p $RPM_BUILD_ROOT%{_bindir}/futurize $RPM_BUILD_ROOT%{_bindir}/python%{python2_version}-futurize
cp -p $RPM_BUILD_ROOT%{_bindir}/pasteurize $RPM_BUILD_ROOT%{_bindir}/python%{python2_version}-pasteurize
touch futurize futurize-2 futurize-%{python2_version}
install -p futurize futurize-2 futurize-%{python2_version} $RPM_BUILD_ROOT%{_bindir}
ln -sf %{_bindir}/python%{python2_version}-futurize $RPM_BUILD_ROOT%{_bindir}/futurize
ln -sf %{_bindir}/python%{python2_version}-futurize $RPM_BUILD_ROOT%{_bindir}/futurize-2
ln -sf %{_bindir}/python%{python2_version}-futurize $RPM_BUILD_ROOT%{_bindir}/futurize-%{python2_version}
touch pasteurize pasteurize-2 pasteurize-%{python2_version}
install -p pasteurize pasteurize-2 pasteurize-%{python2_version} $RPM_BUILD_ROOT%{_bindir}
ln -sf %{_bindir}/python%{python2_version}-pasteurize $RPM_BUILD_ROOT%{_bindir}/pasteurize
ln -sf %{_bindir}/python%{python2_version}-pasteurize $RPM_BUILD_ROOT%{_bindir}/pasteurize-2
ln -sf %{_bindir}/python%{python2_version}-pasteurize $RPM_BUILD_ROOT%{_bindir}/pasteurize-%{python2_version}
sed -i -e '/^#!\//, 1d' $RPM_BUILD_ROOT%{python2_sitelib}/future/backports/test/pystone.py
cd ..
%check
%if %{with_tests}
cd python2
PYTHONPATH=$PWD/build/lib py.test -v
cd ..
cd python3
PYTHONPATH=$PWD/build/lib py.test-3 -v
cd ..
%endif
%files -n python2-future
%{!?_licensedir:%global license %doc}
%doc python2/README.rst
%license python2/LICENSE.txt
%{_bindir}/futurize
%{_bindir}/futurize-2*
%{_bindir}/pasteurize
%{_bindir}/pasteurize-2*
%{_bindir}/python%{python2_version}-futurize
%{_bindir}/python%{python2_version}-pasteurize
%{python2_sitelib}/*
%files -n python3-future
%{!?_licensedir:%global license %doc}
%license python3/LICENSE.txt
%doc python3/README.rst
%license LICENSE.txt
%doc README.rst
%{_bindir}/futurize-3
%{_bindir}/futurize-%{?python3_shortver}
%{_bindir}/pasteurize-3
@ -131,6 +68,18 @@ cd ..
%{python3_sitelib}/*
%changelog
* Fri Jul 07 2023 Ge Wang <wang__ge@126.com> - 0.18.3-1
- Update to version 0.18.3
* Fri Mar 10 2023 yaoxin <yaoxin30@h-partners.com> - 0.18.2-2
- Fix CVE-2022-40899
* Wed Jul 14 2021 liksh <liks11@chinaunicom.cn> - 0.18.2-1
- update package from 0.16.0 to 0.18.2
* Wed Oct 21 2020 leiju <leiju4@huawei.com> - 0.16.0-12
- remove python2 subpackage
* Thu Jan 09 2020 lihao <lihao129@huawei.com> - 0.16.0-11
- Package Init

4
future.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: PythonCharmers/python-future
tag_prefix: ^v
seperator: .

Binary file not shown.