Accepting request 486204 from devel:languages:python
1 OBS-URL: https://build.opensuse.org/request/show/486204 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-future?expand=0&rev=4
This commit is contained in:
commit
51bfe22434
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 6 16:24:20 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Implement single-spec version
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Nov 25 08:26:47 UTC 2016 - mimi.vx@gmail.com
|
Fri Nov 25 08:26:47 UTC 2016 - mimi.vx@gmail.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-future
|
# spec file for package python-future
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,6 +16,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-future
|
Name: python-future
|
||||||
Version: 0.16.0
|
Version: 0.16.0
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -23,59 +24,55 @@ Summary: Clean single-source support for Python 3 and 2
|
|||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Url: https://python-future.org
|
Url: https://python-future.org
|
||||||
Source: https://pypi.python.org/packages/00/2b/8d082ddfed935f3608cc61140df6dcbf0edea1bc3ab52fb6c29ae3e81e85/future-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/f/future/future-%{version}.tar.gz
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-devel
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: %{python_module devel}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(preun): update-alternatives
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%python_subpackages
|
||||||
future: Easy, safe support for Python 2/3 compatibility
|
|
||||||
|
|
||||||
``future`` is the missing compatibility layer between Python 2 and Python
|
%description
|
||||||
|
Easy, safe support for Python 2/3 compatibility
|
||||||
|
|
||||||
|
future is the missing compatibility layer between Python 2 and Python
|
||||||
3. It allows you to use a single, clean Python 3.x-compatible codebase to
|
3. It allows you to use a single, clean Python 3.x-compatible codebase to
|
||||||
support both Python 2 and Python 3 with minimal overhead.
|
support both Python 2 and Python 3 with minimal overhead.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n future-%{version}
|
%setup -q -n future-%{version}
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
python setup.py build
|
%python_build
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
%python_install
|
||||||
|
|
||||||
# Prepare for update-alternatives usage
|
%python_clone -a %{buildroot}%{_bindir}/futurize
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
%python_clone -a %{buildroot}%{_bindir}/pasteurize
|
||||||
for p in futurize pasteurize ; do
|
|
||||||
mv %{buildroot}%{_bindir}/$p %{buildroot}%{_bindir}/$p-%{py_ver}
|
%{python_expand %fdupes %{buildroot}%{$python_sitearch} }
|
||||||
ln -s -f %{_sysconfdir}/alternatives/$p %{buildroot}%{_bindir}/$p
|
|
||||||
done
|
|
||||||
|
|
||||||
%fdupes %{buildroot}/%{python_sitelib}/*
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%_sbindir/update-alternatives \
|
%{python_install_alternative futurize pasteurize}
|
||||||
--install %{_bindir}/futurize futurize %{_bindir}/futurize-%{py_ver} 30 \
|
|
||||||
--slave %{_bindir}/pasteurize pasteurize %{_bindir}/pasteurize-%{py_ver}
|
|
||||||
|
|
||||||
%postun
|
%preun
|
||||||
if [ "$1" = 0 ] ; then
|
%python_uninstall_alternative futurize
|
||||||
%_sbindir/update-alternatives --remove futurize %{_bindir}/futurize-%{py_ver}
|
|
||||||
fi
|
|
||||||
|
|
||||||
%files
|
|
||||||
|
%files %{python_files}
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc LICENSE.txt README.rst
|
%doc LICENSE.txt README.rst
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
%{_bindir}/futurize
|
%python_alternative %{_bindir}/futurize
|
||||||
%{_bindir}/pasteurize
|
%python_alternative %{_bindir}/pasteurize
|
||||||
%{_bindir}/futurize-%{py_ver}
|
|
||||||
%{_bindir}/pasteurize-%{py_ver}
|
|
||||||
%ghost %{_sysconfdir}/alternatives/futurize
|
|
||||||
%ghost %{_sysconfdir}/alternatives/pasteurize
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user