%global pypi_name XStatic-Rickshaw Name: python-%{pypi_name} Version: 1.5.0.0 Release: 3%{?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.js %{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 * Fri Sep 05 2014 Matthias Runge - 1.5.0.0-3 - Fix License: MIT (rhbz#1135457) * Thu Sep 04 2014 Matthias Runge - 1.5.0.0-2 - change BR to python2-devel * Fri Aug 29 2014 Matthias Runge - 1.5.0.0-1 - Initial package.