%global pypi_name XStatic-Angular Name: python-%{pypi_name} Version: 1.3.7.0 Release: 4%{?dist} Epoch: 1 Summary: Angular (XStatic packaging standard) License: MIT URL: http://angularjs.org 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 Obsoletes: python-XStatic-Angular-Cookies < 1.3.0.0-1 Provides: python-XStatic-Angular-Cookies = %{version}-%{release} %description Angular 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. You MAY use some minimal support code from the XStatic base package, if you like. %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}/angular'|" xstatic/pkg/angular/__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} # move angular.js to appropriate _jsdir mkdir -p %{buildroot}/%{_jsdir}/angular mv %{buildroot}/%{python2_sitelib}/xstatic/pkg/angular/data/angular* %{buildroot}/%{_jsdir}/angular %files %doc README.txt %{python2_sitelib}/xstatic/pkg/angular %{python2_sitelib}/XStatic_Angular-%{version}-py%{python_version}.egg-info %{python2_sitelib}/XStatic_Angular-%{version}-py%{python_version}-nspkg.pth %{_jsdir}/angular %changelog * Fri Apr 10 2015 Matthias Runge - 1:1.3.7.0-4 - provide obsoleted python-XStatic-Angular-Cookies (rhbz#1210692) * Thu Feb 12 2015 Matthias Runge - 1:1.3.7.0-3 - introduce epoch due to bump in f22 * Thu Jan 15 2015 Matthias Runge - 1.3.7.0-2 - include the rest of additional angular files - obsolete python-XStatic-Angular-Cookies * Mon Jan 12 2015 Matthias Runge - 1.3.7.0-1 - update to 1.3.7.0 * Wed Aug 27 2014 Matthias Runge - 1.2.1.1-1 - Initial package.