922908b
%global pypi_name XStatic-Hogan
922908b
922908b
Name:           python-%{pypi_name}
922908b
Version:        2.0.0.2
5a95876
Release:        15%{?dist}
922908b
Summary:        Hogan (XStatic packaging standard)
922908b
922908b
License:        ASL 2.0
922908b
URL:            http://twitter.github.io/hogan.js/
486e035
Source0:        https://files.pythonhosted.org/packages/source/X/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
922908b
BuildArch:      noarch
486e035
486e035
%description
486e035
JavaScript library packaged for setuptools (easy_install) / pip.
486e035
486e035
This package is intended to be used by any project that needs these files.
486e035
486e035
It intentionally does not provide any extra code except some metadata
486e035
nor has any extra requirements.
486e035
486e035
%package -n python3-%{pypi_name}
486e035
Summary:        %{summary}
922908b
486e035
BuildRequires:  python3-devel
486e035
BuildRequires:  python3-setuptools
922908b
486e035
Requires:       python3-XStatic
486e035
Requires:       xstatic-hogan-common
922908b
486e035
%{?python_provide:%python_provide python3-%{pypi_name}}
922908b
486e035
%description -n python3-%{pypi_name}
486e035
JavaScript library packaged for setuptools (easy_install) / pip.
922908b
486e035
This package is intended to be used by any project that needs these files.
486e035
486e035
It intentionally does not provide any extra code except some metadata
486e035
nor has any extra requirements.
922908b
486e035
This package provides Python 3 build of %{pypi_name}.
922908b
486e035
%package -n xstatic-hogan-common
486e035
Summary:        %{summary}
486e035
486e035
BuildRequires:  web-assets-devel
486e035
Requires:       web-assets-filesystem
922908b
486e035
%description -n xstatic-hogan-common
486e035
JavaScript library packaged for setuptools (easy_install) / pip.
486e035
486e035
This package is intended to be used by any project that needs these files.
486e035
486e035
It intentionally does not provide any extra code except some metadata
486e035
nor has any extra requirements.
486e035
486e035
This package contains the javascript files.
486e035
486e035
%prep
486e035
%autosetup -n %{pypi_name}-%{version}
486e035
# patch to use webassets dir
486e035
sed -i "s|^BASE_DIR = .*|BASE_DIR = '%{_jsdir}/hogan'|" xstatic/pkg/hogan/__init__.py
486e035
486e035
%build
486e035
%py3_build
486e035
486e035
%install
5e00e7d
%py3_install
5e00e7d
486e035
mkdir -p %{buildroot}%{_jsdir}/hogan
5e00e7d
mv %{buildroot}%{python3_sitelib}/xstatic/pkg/hogan/data/hogan.js %{buildroot}%{_jsdir}/hogan
5e00e7d
rmdir %{buildroot}%{python3_sitelib}/xstatic/pkg/hogan/data/
486e035
# fix execute flags for js
486e035
chmod 644 %{buildroot}%{_jsdir}/hogan/hogan.js
486e035
486e035
%files -n python3-%{pypi_name}
486e035
%doc README.txt
486e035
%{python3_sitelib}/xstatic/pkg/hogan
486e035
%{python3_sitelib}/XStatic_Hogan-%{version}-py%{python3_version}.egg-info
486e035
%{python3_sitelib}/XStatic_Hogan-%{version}-py%{python3_version}-nspkg.pth
486e035
486e035
%files -n xstatic-hogan-common
486e035
%doc README.txt
922908b
%{_jsdir}/hogan
922908b
922908b
%changelog
5a95876
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0.2-15
5a95876
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
5a95876
97c8e59
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0.2-14
97c8e59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
97c8e59
5e00e7d
* Wed Oct 17 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.0.0.2-13
5e00e7d
- Subpackage python2-XStatic-Hogan has been removed
5e00e7d
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
5e00e7d
d851fa8
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0.2-12
d851fa8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
d851fa8
b603c8e
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.0.0.2-11
b603c8e
- Rebuilt for Python 3.7
b603c8e
ab1787b
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0.2-10
ab1787b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
ab1787b
1b225d0
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0.2-9
1b225d0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
1b225d0
d451647
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0.2-8
d451647
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d451647
2635631
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 2.0.0.2-7
2635631
- Rebuild for Python 3.6
2635631
486e035
* Wed Oct 12 2016 Jan Beran <jberan@redhat.com> - 2.0.0.2-6
486e035
- Provides a Python 3 subpackage
486e035
1f5345a
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0.2-5
1f5345a
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
1f5345a
a3aaf22
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0.2-4
a3aaf22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
a3aaf22
046d443
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0.2-3
046d443
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
046d443
922908b
* Thu Sep 04 2014 Matthias Runge <mrunge@redhat.com> - 2.0.0.2-2
922908b
- changed BR to python2-devel (rhbz#1134800)
922908b
922908b
* Thu Aug 28 2014 Matthias Runge <mrunge@redhat.com> - 2.0.0.2-1
922908b
- Initial package.