%global pypi_name XStatic-Rickshaw
Name: python-%{pypi_name}
Version: 1.5.0.0
Release: 6%{?dist}
Summary: Rickshaw (XStatic packaging standard)
License: MIT
URL: http://code.shutterstock.com/rickshaw/
Source0: https://pypi.python.org/packages/source/X/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: web-assets-devel
Requires: python-XStatic
Requires: web-assets-filesystem
%description
Rickshaw JavaScript library packaged for
setuptools (easy_install) / pip.
This package is intended to be used by any project that needs these files.
It intentionally does not provide any extra code except some metadata
nor has any extra requirements.
%prep
%setup -q -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
# patch to use webassets dir
sed -i "s|^BASE_DIR = .*|BASE_DIR = '%{_jsdir}/rickshaw'|" xstatic/pkg/rickshaw/__init__.py
%build
# due
# https://bitbucket.org/thomaswaldmann/xstatic/issue/2/
# this package can not be built with python-XStatic installed.
%{__python2} setup.py build
%install
%{__python2} setup.py install --skip-build --root %{buildroot}
mkdir -p %{buildroot}/%{_jsdir}/rickshaw
mv %{buildroot}/%{python2_sitelib}/xstatic/pkg/rickshaw/data/rickshaw.* %{buildroot}/%{_jsdir}/rickshaw
%files
%doc README.txt
%{python2_sitelib}/xstatic/pkg/rickshaw
%{python2_sitelib}/XStatic_Rickshaw-%{version}-py%{python_version}.egg-info
%{python2_sitelib}/XStatic_Rickshaw-%{version}-py%{python_version}-nspkg.pth
%{_jsdir}/rickshaw
%changelog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Apr 15 2015 Matthias Runge <mrunge@redhat.com> - 1.5.0.0-4
- add rickshaw.css
* Fri Sep 05 2014 Matthias Runge <mrunge@redhat.com> - 1.5.0.0-3
- Fix License: MIT (rhbz#1135457)
* Thu Sep 04 2014 Matthias Runge <mrunge@redhat.com> - 1.5.0.0-2
- change BR to python2-devel
* Fri Aug 29 2014 Matthias Runge <mrunge@redhat.com> - 1.5.0.0-1
- Initial package.