Compare commits
10 Commits
abe1df67f0
...
8e6397508f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e6397508f | ||
|
|
1ccf648d44 | ||
|
|
9f86b03e85 | ||
|
|
6fbcd802e7 | ||
|
|
d3849fc4ff | ||
|
|
3cee103957 | ||
|
|
694d45dc21 | ||
|
|
2a902f0463 | ||
|
|
1724b04de7 | ||
|
|
c68ae64da3 |
BIN
future-0.18.3.tar.gz
Normal file
BIN
future-0.18.3.tar.gz
Normal file
Binary file not shown.
93
future.spec
93
future.spec
@ -3,35 +3,25 @@
|
|||||||
This package intends to provides a compatibility layer for Python between its \
|
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 \
|
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 \
|
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.
|
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))')}
|
%{!?python3_shortver: %global python3_shortver %(%{__python3} -c 'import sys; print(str(sys.version_info.major) + "." + str(sys.version_info.minor))')}
|
||||||
|
|
||||||
Name: future
|
Name: future
|
||||||
Version: 0.16.0
|
Version: 0.18.3
|
||||||
Release: 11
|
Release: 1
|
||||||
Summary: Missing compatibility layer between Python 2 and Python 3
|
Summary: Missing compatibility layer on Python 3
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: http://python-future.org/
|
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
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
%{desc}
|
%{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
|
%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}
|
%{?python_provide:%python_provide python3-future}
|
||||||
BuildRequires: python3-devel python3-setuptools python3-numpy python3-requests python3-pytest
|
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}
|
%{desc}
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -c -p1
|
%autosetup -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}|'
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
cd python2
|
|
||||||
CFLAGS="%{optflags}" %{__python2} setup.py build --executable="%{__python2} -s"
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
cd python3
|
|
||||||
CFLAGS="%{optflags}" %{__python3} setup.py build --executable="%{__python3} -s"
|
CFLAGS="%{optflags}" %{__python3} setup.py build --executable="%{__python3} -s"
|
||||||
cd ..
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
|
||||||
cd python3
|
|
||||||
CFLAGS="%{optflags}" %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
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}/futurize $RPM_BUILD_ROOT%{_bindir}/python3-futurize
|
||||||
mv $RPM_BUILD_ROOT%{_bindir}/pasteurize $RPM_BUILD_ROOT%{_bindir}/python3-pasteurize
|
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}
|
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-3
|
||||||
ln -sf %{_bindir}/python3-pasteurize $RPM_BUILD_ROOT%{_bindir}/pasteurize-%{?python3_shortver}
|
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
|
%check
|
||||||
%if %{with_tests}
|
%if %{with_tests}
|
||||||
cd python2
|
|
||||||
PYTHONPATH=$PWD/build/lib py.test -v
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
cd python3
|
|
||||||
PYTHONPATH=$PWD/build/lib py.test-3 -v
|
PYTHONPATH=$PWD/build/lib py.test-3 -v
|
||||||
cd ..
|
|
||||||
%endif
|
%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
|
%files -n python3-future
|
||||||
%{!?_licensedir:%global license %doc}
|
%{!?_licensedir:%global license %doc}
|
||||||
%license python3/LICENSE.txt
|
%license LICENSE.txt
|
||||||
%doc python3/README.rst
|
%doc README.rst
|
||||||
%{_bindir}/futurize-3
|
%{_bindir}/futurize-3
|
||||||
%{_bindir}/futurize-%{?python3_shortver}
|
%{_bindir}/futurize-%{?python3_shortver}
|
||||||
%{_bindir}/pasteurize-3
|
%{_bindir}/pasteurize-3
|
||||||
@ -131,6 +68,18 @@ cd ..
|
|||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%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
|
* Thu Jan 09 2020 lihao <lihao129@huawei.com> - 0.16.0-11
|
||||||
- Package Init
|
- Package Init
|
||||||
|
|
||||||
|
|||||||
4
future.yaml
Normal file
4
future.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: PythonCharmers/python-future
|
||||||
|
tag_prefix: ^v
|
||||||
|
seperator: .
|
||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user