%global pypi_name XStatic-Angular-lrdragndrop Name: python-XStatic-Angular-lrdragndrop Version: 1.0.2.2 Release: 1%{?dist} Summary: Angular-lrdragndrop (XStatic packaging standard) License: MIT URL: https://github.com/lorenzofox3/lrDragNDrop 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 lrDragNDrop javascript library packaged for setuptools (easy_install) / pip. This package is intended to be used by any project that needs these files. %prep %setup -q -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf XStatic_Angular_lrdragndrop.egg-info # patch to use webassets dir sed -i "s|^BASE_DIR = .*|BASE_DIR = '%{_jsdir}/angular_lrdragndrop'|" xstatic/pkg/angular_lrdragndrop/__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}/angular_lrdragndrop mv %{buildroot}/%{python2_sitelib}/xstatic/pkg/angular_lrdragndrop/data/lrdragndrop.js %{buildroot}/%{_jsdir}/angular_lrdragndrop %files %doc README.txt %{python2_sitelib}/xstatic/pkg/angular_lrdragndrop %{python2_sitelib}/XStatic_Angular_lrdragndrop-%{version}-py?.?.egg-info %{python2_sitelib}/XStatic_Angular_lrdragndrop-%{version}-py?.?-nspkg.pth %{_jsdir}/angular_lrdragndrop %changelog * Thu Feb 26 2015 Matthias Runge - 1.0.2.2-1 - Initial package (rhbz#1196957)