# Created by pyp2rpm-1.1.1
%global pypi_name XStatic-Bootstrap-Datepicker
Name: python-%{pypi_name}
Version: 1.3.1.0
Release: 3%{?dist}
Summary: Bootstrap-Datepicker (XStatic packaging standard)
License: ASL 2.0
URL: https://github.com/eternicode/bootstrap-datepicker/
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
Bootstrap-Datepicker 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 XStatic_Bootstrap_Datepicker.egg-info
sed -i "s|^BASE_DIR = .*|BASE_DIR = '%{_jsdir}/bootstrap_datepicker'|" xstatic/pkg/bootstrap_datepicker/__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}/bootstrap_datepicker
mv %{buildroot}/%{python2_sitelib}/xstatic/pkg/bootstrap_datepicker/data/* %{buildroot}/%{_jsdir}/bootstrap_datepicker
%files
%doc README.txt
%{python2_sitelib}/xstatic/pkg/bootstrap_datepicker
%{python2_sitelib}/XStatic_Bootstrap_Datepicker-%{version}-py%{python_version}.egg-info
%{python2_sitelib}/XStatic_Bootstrap_Datepicker-%{version}-py%{python_version}-nspkg.pth
%{_jsdir}/bootstrap_datepicker
%changelog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri Sep 19 2014 Matthias Runge <mrunge@redhat.com> - 1.3.1.0-1
- Initial package.