Blob Blame History Raw
%global pypi_name XStatic-JQuery-Migrate

Name:           python-%{pypi_name}
Version:        1.2.1.1
Release:        4%{?dist}
Summary:        JQuery-Migrate (XStatic packaging standard)

License:        MIT
URL:            https://github.com/jquery/jquery-migrate
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-Migrate 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}/jquery_migrate'|" xstatic/pkg/jquery_migrate/__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_migrate
mv %{buildroot}/%{python2_sitelib}/xstatic/pkg/jquery_migrate/data/jquery-migrate.* %{buildroot}/%{_jsdir}/jquery_migrate




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


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

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

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

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