Blob Blame History Raw
%global pypi_name XStatic-JQuery.TableSorter

Name:           python-XStatic-JQuery-TableSorter
Version:        2.14.5.1
Release:        5%{?dist}
Summary:        JQuery-TableSorter (XStatic packaging standard)

License:        MIT
URL:            https://github.com/Mottie/tablesorter
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
JQuery.TableSorter 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}/jquery_tablesorter'|" xstatic/pkg/jquery_tablesorter/__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}/jquery_tablesorter
mv %{buildroot}/%{python2_sitelib}/xstatic/pkg/jquery_tablesorter/data/jquery.tablesorter.js %{buildroot}/%{_jsdir}/jquery_tablesorter



%files
%doc README.txt
%{python2_sitelib}/xstatic/pkg/jquery_tablesorter
%{python2_sitelib}/XStatic_JQuery.TableSorter-%{version}-py%{python_version}-*.pth
%{python2_sitelib}/XStatic_JQuery.TableSorter-%{version}-py%{python_version}.egg-info
%{_jsdir}/jquery_tablesorter


%changelog
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.14.5.1-5
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.14.5.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

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

* Thu Sep 04 2014 Matthias Runge <mrunge@redhat.com> - 2.14.5.1-2
- change BR to python2-devel (rhbz#1134912)

* Thu Aug 28 2014 Matthias Runge <mrunge@redhat.com> - 2.14.5.1-1
- Initial package.