File python-propane.spec of Package python-propane
#
# spec file for package python-propane
#
# Copyright (c) 2014 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/
#
%define modname propane
Name: python-%{modname}
Version: 0.1.2
Release: 0
Summary: Random, helpful utility functions, data structures, etc. for Python
License: MIT
Group: Development/Languages/Python
Url: http://github.com/tylerbutler/propane
Source: http://pypi.python.org/packages/source/p/%{modname}/%{modname}-%{version}.zip
# PATCH-FIX-OPENSUSE python-propane-setup.diff toms@opensuse.org -- Remove any dependencies to distribute
Patch0: %{name}-setup.patch
BuildRequires: fdupes
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: unzip
# Taken from requirements.txt
Requires: python-path.py
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%py_requires
%else
Requires: python(abi) = %{py_ver}
BuildArch: noarch
%endif
%description
A collection of somewhat random, helpful utility functions, data
structures, Django fields, and other miscellany.
%prep
%setup -q -n %{modname}-%{version}
%patch0
# rm distribute_setup.py
%build
CFLAGS="%{optflags}" python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
chmod a+x %{buildroot}%{python_sitelib}/%{modname}_tests/django_project/manage.py
%fdupes -s %{buildroot}%{python_sitelib}
%files
%defattr(-,root,root,-)
%doc LICENSE.txt README.md
%{python_sitelib}/%{modname}/
%{python_sitelib}/%{modname}_tests/
%{python_sitelib}/%{modname}-%{version}-py*.egg-info/
%changelog