2010-12-11 17:13:00 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-py2pack
|
|
|
|
#
|
2015-08-13 11:48:06 +00:00
|
|
|
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2010-12-11 17:13:00 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2012-04-13 12:22:11 +00:00
|
|
|
|
2010-12-11 17:13:00 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2014-02-10 10:13:31 +00:00
|
|
|
|
2011-05-31 08:03:37 +00:00
|
|
|
Name: python-py2pack
|
2015-08-13 11:48:06 +00:00
|
|
|
Version: 0.5.0
|
2011-01-25 14:19:00 +00:00
|
|
|
Release: 0
|
2010-12-11 17:13:00 +00:00
|
|
|
Url: http://github.com/saschpe/py2pack
|
|
|
|
Summary: Generate distribution packages from Python packages on PyPI
|
2015-08-13 11:48:06 +00:00
|
|
|
License: GPL-2.0
|
2010-12-11 17:13:00 +00:00
|
|
|
Group: Development/Languages/Python
|
2011-06-22 10:35:32 +00:00
|
|
|
Source: http://pypi.python.org/packages/source/p/py2pack/py2pack-%{version}.tar.gz
|
2010-12-11 17:13:00 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2015-08-13 11:48:06 +00:00
|
|
|
BuildRequires: python-setuptools
|
2014-02-10 10:13:31 +00:00
|
|
|
BuildRequires: python-Jinja2
|
2011-04-27 09:49:16 +00:00
|
|
|
BuildRequires: python-argparse
|
2015-08-13 11:48:06 +00:00
|
|
|
BuildRequires: python-cssselect
|
|
|
|
BuildRequires: python-lxml
|
|
|
|
BuildRequires: python-requests
|
2010-12-11 17:13:00 +00:00
|
|
|
BuildRequires: python-devel
|
2011-09-20 14:58:36 +00:00
|
|
|
Requires: python-Jinja2
|
2013-06-17 12:15:59 +00:00
|
|
|
Requires: python-argparse
|
2015-08-13 11:48:06 +00:00
|
|
|
Requires: python-cssselect
|
|
|
|
Requires: python-lxml
|
|
|
|
Requires: python-requests
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
2012-04-13 12:22:11 +00:00
|
|
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
|
%else
|
2010-12-11 17:13:00 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
This script allows to generate RPM spec or DEB dsc files from Python modules.
|
|
|
|
It allows to list Python modules or search for them on the Python Package Index
|
|
|
|
(PyPI). Conveniently, it can fetch tarballs and changelogs making it an
|
|
|
|
universal tool to package Python modules.
|
|
|
|
|
|
|
|
%prep
|
2011-05-31 08:03:37 +00:00
|
|
|
%setup -q -n py2pack-%{version}
|
2014-02-10 10:13:31 +00:00
|
|
|
#sed -i "1d" py2pack/py2pack.py # Fix non-executable script
|
2010-12-11 17:13:00 +00:00
|
|
|
|
|
|
|
%build
|
2010-12-16 10:41:58 +00:00
|
|
|
python setup.py build
|
2010-12-11 17:13:00 +00:00
|
|
|
|
|
|
|
%install
|
2011-01-26 17:37:00 +00:00
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
2011-03-09 09:41:06 +00:00
|
|
|
# The setup script installs stuff into '/usr/local', move stuff around accordingly
|
|
|
|
install -d %{buildroot}%{_mandir}/man1
|
|
|
|
install -d %{buildroot}%{_docdir}/%{name}
|
2015-08-13 11:48:06 +00:00
|
|
|
|
2011-05-31 08:03:37 +00:00
|
|
|
mv %{buildroot}/usr/share/doc/py2pack/* %{buildroot}%{_docdir}/%{name}
|
2015-08-13 11:48:06 +00:00
|
|
|
mv %{buildroot}/usr/man/man1/py2pack.1 %{buildroot}%{_mandir}/man1/py2pack-%{py_ver}.1
|
|
|
|
ln -s -f %{_sysconfdir}/alternatives/py2pack.1.gz %{buildroot}%{_mandir}/man1/py2pack.1.gz
|
|
|
|
|
|
|
|
# Prepare for update-alternatives usage
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
|
|
|
mv %{buildroot}%{_bindir}/py2pack %{buildroot}%{_bindir}/py2pack-%{py_ver}
|
|
|
|
ln -s -f %{_sysconfdir}/alternatives/py2pack %{buildroot}%{_bindir}/py2pack
|
|
|
|
|
|
|
|
# create dummy targets
|
|
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/py2pack
|
|
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/py2pack.1.gz
|
|
|
|
|
|
|
|
%post
|
|
|
|
%_sbindir/update-alternatives \
|
|
|
|
--install %{_bindir}/py2pack py2pack %{_bindir}/py2pack-%{py_ver} 30 \
|
|
|
|
--slave %{_mandir}/man1/py2pack.1.gz py2pack.1.gz %{_mandir}/man1/py2pack-%{py_ver}.1.gz
|
|
|
|
|
|
|
|
%postun
|
|
|
|
if [ $1 -eq 0 ] ; then
|
|
|
|
%_sbindir/update-alternatives --remove py2pack %{_bindir}/py2pack-%{py_ver}
|
|
|
|
fi
|
2010-12-11 17:13:00 +00:00
|
|
|
|
2011-01-26 17:37:00 +00:00
|
|
|
%files
|
2010-12-11 17:13:00 +00:00
|
|
|
%defattr(-,root,root,-)
|
2015-08-13 11:48:06 +00:00
|
|
|
%doc AUTHORS LICENSE README.rst
|
2011-05-31 08:03:37 +00:00
|
|
|
%{_bindir}/py2pack
|
2015-08-13 11:48:06 +00:00
|
|
|
%{_bindir}/py2pack-%{py_ver}
|
|
|
|
%{_mandir}/man1/py2pack.1.gz
|
|
|
|
%{_mandir}/man1/py2pack-%{py_ver}.1.gz
|
|
|
|
%ghost %{_sysconfdir}/alternatives/py2pack
|
|
|
|
%ghost %{_sysconfdir}/alternatives/py2pack.1.gz
|
2014-02-10 10:13:31 +00:00
|
|
|
%{_docdir}/%{name}
|
2015-08-13 11:48:06 +00:00
|
|
|
%{python_sitelib}/py2pack-%{version}-py*.egg-info
|
2014-02-10 10:13:31 +00:00
|
|
|
%{python_sitelib}/py2pack
|
2010-12-11 17:13:00 +00:00
|
|
|
|
|
|
|
%changelog
|