Blame SPECS/python-XStatic-smart-table.spec

95568b
%global pypi_name XStatic-smart-table
95568b
95568b
Name:           python-%{pypi_name}
95568b
Version:        1.4.13.2
95568b
Release:        13%{?dist}
95568b
Summary:        smart-table (XStatic packaging standard)
95568b
95568b
License:        MIT
95568b
URL:            https://github.com/lorenzofox3/Smart-Table
95568b
Source0:        https://files.pythonhosted.org/packages/source/X/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
95568b
BuildArch:      noarch
95568b
95568b
%description
95568b
JavaScript library packaged for setuptools (easy_install) / pip.
95568b
95568b
This package is intended to be used by any project that needs these files.
95568b
95568b
It intentionally does not provide any extra code except some metadata
95568b
nor has any extra requirements.
95568b
95568b
%package -n python3-%{pypi_name}
95568b
Summary:        %{summary}
95568b
95568b
BuildRequires:  python3-devel
95568b
BuildRequires:  python3-setuptools
95568b
95568b
Requires:       python3-XStatic
95568b
Requires:       xstatic-smart-table-common
95568b
95568b
%{?python_provide:%python_provide python3-%{pypi_name}}
95568b
95568b
%description -n python3-%{pypi_name}
95568b
JavaScript library packaged for setuptools (easy_install) / pip.
95568b
95568b
This package is intended to be used by any project that needs these files.
95568b
95568b
It intentionally does not provide any extra code except some metadata
95568b
nor has any extra requirements.
95568b
95568b
This package provides Python 3 build of %{pypi_name}.
95568b
95568b
%package -n xstatic-smart-table-common
95568b
Summary:        %{summary}
95568b
95568b
BuildRequires:  web-assets-devel
95568b
Requires:       web-assets-filesystem
95568b
95568b
%description -n xstatic-smart-table-common
95568b
JavaScript library packaged for setuptools (easy_install) / pip.
95568b
95568b
This package is intended to be used by any project that needs these files.
95568b
95568b
It intentionally does not provide any extra code except some metadata
95568b
nor has any extra requirements.
95568b
95568b
This package contains the javascript files.
95568b
95568b
%prep
95568b
%autosetup -n %{pypi_name}-%{version}
95568b
# patch to use webassets dir
95568b
sed -i "s|^BASE_DIR = .*|BASE_DIR = '%{_jsdir}/angular_smart_table'|" xstatic/pkg/angular_smart_table/__init__.py
95568b
# fix assets detection when you use XStatic
95568b
sed -i 's/smart-table.min.js/smart-table.js/' xstatic/pkg/angular_smart_table/__init__.py
95568b
95568b
%build
95568b
%py3_build
95568b
95568b
%install
95568b
%py3_install
95568b
95568b
mkdir -p %{buildroot}%{_jsdir}/angular_smart_table
95568b
mv %{buildroot}%{python3_sitelib}/xstatic/pkg/angular_smart_table/data/smart-table.js %{buildroot}%{_jsdir}/angular_smart_table
95568b
rmdir %{buildroot}%{python3_sitelib}/xstatic/pkg/angular_smart_table/data/
95568b
# fix execute flags for js
95568b
chmod 644 %{buildroot}%{_jsdir}/angular_smart_table/smart-table.js
95568b
95568b
%files -n python3-%{pypi_name}
95568b
%doc README.txt
95568b
%{python3_sitelib}/xstatic/pkg/angular_smart_table
95568b
%{python3_sitelib}/XStatic_smart_table-%{version}-py%{python3_version}.egg-info
95568b
%{python3_sitelib}/XStatic_smart_table-%{version}-py%{python3_version}-nspkg.pth
95568b
95568b
%files -n xstatic-smart-table-common
95568b
%doc README.txt
95568b
%{_jsdir}/angular_smart_table
95568b
95568b
%changelog
95568b
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.13.2-13
95568b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
95568b
95568b
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.13.2-12
95568b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
95568b
95568b
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.4.13.2-11
95568b
- Rebuilt for Python 3.9
95568b
95568b
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.13.2-10
95568b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
95568b
95568b
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.4.13.2-9
95568b
- Rebuilt for Python 3.8.0rc1 (#1748018)
95568b
95568b
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.4.13.2-8
95568b
- Rebuilt for Python 3.8
95568b
95568b
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.13.2-7
95568b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
95568b
95568b
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.13.2-6
95568b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
95568b
95568b
* Wed Oct 17 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.4.13.2-5
95568b
- Subpackage python2-XStatic-smart-table has been removed
95568b
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
95568b
95568b
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.13.2-4
95568b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
95568b
95568b
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.4.13.2-3
95568b
- Rebuilt for Python 3.7
95568b
95568b
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.13.2-2
95568b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
95568b
95568b
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.13.2-1
95568b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
95568b
95568b
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5.3-8
95568b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
95568b
95568b
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.4.5.3-7
95568b
- Rebuild for Python 3.6
95568b
95568b
* Thu Oct 13 2016 Jan Beran <jberan@redhat.com> - 1.4.5.3-6
95568b
- Provides a Python 3 subpackage
95568b
95568b
* Fri Aug 19 2016 Haïkel Guémar <hguemar@fedoraproject.org> - 1.4.5.3-5
95568b
- Fix assets detection
95568b
95568b
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.5.3-4
95568b
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
95568b
95568b
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.5.3-3
95568b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
95568b
95568b
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.5.3-2
95568b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
95568b
95568b
* Sat Jan 10 2015 Matthias Runge <mrunge@redhat.com> - 1.4.5.3-1
95568b
- Initial package. (rhbz#1181050)
95568b