Blob Blame History Raw
%global pypi_name XStatic-Spin

Name:           python-%{pypi_name}
Version:        1.2.5.2
Release:        5%{?dist}
Summary:        Spin (XStatic packaging standard)

License:        MIT
URL:            http://fgnass.github.io/spin.js/
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
Spin 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}/spin'|" xstatic/pkg/spin/__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}/spin
mv %{buildroot}/%{python2_sitelib}/xstatic/pkg/spin/data/* %{buildroot}/%{_jsdir}/spin



%files
%doc README.txt
%{python2_sitelib}/xstatic/pkg/spin
%{python2_sitelib}/XStatic_Spin-%{version}-py%{python_version}.egg-info
%{python2_sitelib}/XStatic_Spin-%{version}-py%{python_version}-nspkg.pth
%{_jsdir}/spin

%changelog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.5.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.5.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Mon Nov 10 2014 Matthias Runge <mrunge@redhat.com> - 1.2.5.2-3
- bump release

* Wed Sep 03 2014 Matthias Runge <mrunge@redhat.com> - 1.2.5.2-2
- change build requirements to python2-devel

* Fri Aug 29 2014 Matthias Runge <mrunge@redhat.com> - 1.2.5.2-1
- Initial package.