File python-bento.spec of Package python-bento
#
# spec file for package python-bento
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
Name: python-bento
Version: 0.1.1
Release: 0
License: BSD-3-Clause
Summary: A tool to nicely packages your python sotftware
Url: http://github.com/cournape/Bento
Group: Development/Languages/Python
Source: http://pypi.python.org/packages/source/b/bento/bento-%{version}.tar.gz
BuildRequires: python-devel
Requires: python-ply
Requires: python-six
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
Requires: python-simplejson
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%description
Bento is a distribution tool for python packages, The goal are
extensibility, flexibility, and easy interoperation with external tools.
%prep
%setup -q -n bento-%{version}
python bootstrap.py
%build
%install
./bentomaker configure --prefix=%{_prefix} --destdir=%{buildroot} --bundle=False
./bentomaker install
# Remove $RPM_BUILD_ROOT from config files again:
sed -i -r "s|(DESTDIR\s+= )'.*'|\1'/'|" %{buildroot}%{python_sitelib}/bento/__config_py.py
# Drop Windows files:
find %{buildroot}%{_datadir}/bento/commands -name "*.exe" -exec rm {} \;
%files
%defattr(-,root,root,-)
%doc LICENSE.txt README.rst
%{_bindir}/bentomaker
%{python_sitelib}/bento
%{python_sitelib}/bentomakerlib
%dir %{_datadir}/bento/
%{_datadir}/bento/parsetab
%changelog