7bc809f
%if 0%{?fedora} || 0%{?rhel} > 7
7bc809f
%bcond_with    python2
7bc809f
%bcond_without python3
7bc809f
%else
7bc809f
%bcond_without python2
7bc809f
%bcond_with    python3
1344205
%endif
1344205
1344205
%global pypi_name XStatic-bootswatch
1344205
1344205
Name:           python-%{pypi_name}
8a54c98
Version:        3.3.7.0
0ecdbcf
Release:        25%{?dist}
1344205
Summary:        bootswatch (XStatic packaging standard)
1344205
1344205
License:        MIT
1344205
URL:            http://bootswatch.com
7d8ad96
Source0:        https://pypi.io/packages/source/X/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
7d8ad96
Source1:        https://raw.githubusercontent.com/openstack/xstatic-bootswatch/master/LICENSE
1344205
BuildArch:      noarch
1344205
1344205
%description
1344205
Bootswatch javascript library packaged
1344205
for setuptools (easy_install) / pip.
1344205
1344205
Free themes for Bootstrap
1344205
7bc809f
%if %{with python2}
1344205
%package -n python2-%{pypi_name}
1344205
Summary:        bootswatch (XStatic packaging standard)
1344205
%{?python_provide:%python_provide python2-%{pypi_name}}
1344205
# python_provide does not exist in CentOS7 buildroot
1344205
Provides:       python-%{pypi_name} = %{version}-%{release}
1344205
1344205
BuildRequires:  python2-devel
36ed27c
BuildRequires:  python2-setuptools
1344205
36ed27c
Requires:       python2-XStatic
1344205
Requires:       bootswatch-common = %{version}-%{release}
1344205
Requires:       bootswatch-fonts  = %{version}-%{release}
1344205
1344205
%description -n python2-%{pypi_name}
1344205
bootswatch javascript library packaged
1344205
for setuptools (easy_install) / pip.
1344205
1344205
Free themes for Bootstrap
7bc809f
%endif
1344205
1344205
%package -n bootswatch-common
1344205
Summary:    bootswatch (XStatic packaging standard) common files
1344205
BuildRequires:  web-assets-devel
1344205
1344205
Requires:       web-assets-filesystem
1344205
1344205
%description -n bootswatch-common
1344205
Common bootswatch static content (CSS and SCSS)
1344205
1344205
%package -n bootswatch-fonts
1344205
Summary:    bootswatch (XStatic packaging standard) fonts
1344205
BuildRequires:  fontpackages-filesystem
1344205
1344205
Requires:       fontpackages-filesystem
1344205
1344205
%description -n bootswatch-fonts
1344205
Bootswatch fonts
1344205
7bc809f
%if %{with python3}
1344205
%package -n python3-%{pypi_name}
1344205
Summary:        bootswatch (XStatic packaging standard)
1344205
%{?python_provide:%python_provide python3-%{pypi_name}}
1344205
1344205
BuildRequires:  python3-devel
1344205
BuildRequires:  python3-setuptools
1344205
1344205
Requires:       python3-XStatic
1344205
Requires:       bootswatch-common = %{version}-%{release}
1344205
Requires:       bootswatch-fonts  = %{version}-%{release}
1344205
1344205
%description -n python3-%{pypi_name}
1344205
bootswatch javascript library packaged
1344205
for setuptools (easy_install) / pip.
1344205
1344205
Free themes for Bootstrap
1344205
%endif
1344205
1344205
1344205
%prep
1344205
%setup -q -n %{pypi_name}-%{version}
1344205
1344205
# patch to use webassets dir
1344205
sed -i "s|^BASE_DIR = .*|BASE_DIR = '%{_jsdir}/bootswatch'|" xstatic/pkg/bootswatch/__init__.py
7d8ad96
# License file is present in GitHub repo, but not in PyPi file
7d8ad96
cp %{SOURCE1} .
7d8ad96
1344205
1344205
%build
7bc809f
%if %{with python2}
1344205
%{__python2} setup.py build
7bc809f
%endif
7bc809f
7bc809f
%if %{with python3}
1344205
%{__python3} setup.py build
1344205
%endif
1344205
1344205
%install
7bc809f
%if %{with python2}
1344205
%{__python2} setup.py install --skip-build --root %{buildroot}
1344205
# Move fonts to the right directory
1344205
mkdir -p %{buildroot}/%{_datadir}/fonts/bootswatch
1344205
mv %{buildroot}/%{python2_sitelib}/xstatic/pkg/bootswatch/data/fonts/* %{buildroot}/%{_datadir}/fonts/bootswatch
1344205
rmdir %{buildroot}/%{python2_sitelib}/xstatic/pkg/bootswatch/data/fonts
1344205
1344205
# Move static files
1344205
mkdir -p %{buildroot}/%{_jsdir}/bootswatch
1344205
for theme in cerulean cosmo cyborg darkly flatly journal lumen paper readable sandstone simplex slate spacelab superhero united yeti
1344205
do
1344205
 mv %{buildroot}/%{python2_sitelib}/xstatic/pkg/bootswatch/data/${theme} %{buildroot}/%{_jsdir}/bootswatch
1344205
done
7bc809f
%endif
1344205
7bc809f
7bc809f
%if %{with python3}
1344205
%{__python3} setup.py install --skip-build --root %{buildroot}
7bc809f
# Move fonts to the right directory
7bc809f
mkdir -p %{buildroot}/%{_datadir}/fonts/bootswatch
7bc809f
mv %{buildroot}/%{python3_sitelib}/xstatic/pkg/bootswatch/data/fonts/* %{buildroot}/%{_datadir}/fonts/bootswatch
7bc809f
rmdir %{buildroot}/%{python3_sitelib}/xstatic/pkg/bootswatch/data/fonts
7bc809f
7bc809f
# Move static files
7bc809f
mkdir -p %{buildroot}/%{_jsdir}/bootswatch
1344205
for theme in cerulean cosmo cyborg darkly flatly journal lumen paper readable sandstone simplex slate spacelab superhero united yeti
1344205
do
7bc809f
 mv %{buildroot}/%{python3_sitelib}/xstatic/pkg/bootswatch/data/${theme} %{buildroot}/%{_jsdir}/bootswatch
1344205
done
1344205
%endif
1344205
7bc809f
%if %{with python2}
1344205
%files -n python2-%{pypi_name}
1344205
%doc README.txt
7d8ad96
%license LICENSE
1344205
%{python2_sitelib}/xstatic/pkg/bootswatch
1344205
%{python2_sitelib}/XStatic_bootswatch-%{version}-py?.?.egg-info
1344205
%{python2_sitelib}/XStatic_bootswatch-%{version}-py?.?-nspkg.pth
7bc809f
%endif
1344205
1344205
%files -n bootswatch-common
1344205
%doc README.txt
7d8ad96
%license LICENSE
1344205
%{_jsdir}/bootswatch
1344205
1344205
%files -n bootswatch-fonts
1344205
%doc README.txt
7d8ad96
%license LICENSE
1344205
%{_datadir}/fonts/bootswatch
1344205
7bc809f
%if %{with python3}
1344205
%files -n python3-%{pypi_name}
1344205
%doc README.txt
7d8ad96
%license LICENSE
1344205
%{python3_sitelib}/xstatic/pkg/bootswatch
2f0cb04
%{python3_sitelib}/XStatic_bootswatch-%{version}-py%{python3_version}.egg-info
2f0cb04
%{python3_sitelib}/XStatic_bootswatch-%{version}-py%{python3_version}-nspkg.pth
1344205
%endif
1344205
1344205
%changelog
0ecdbcf
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.7.0-25
0ecdbcf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
0ecdbcf
6e8d199
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.7.0-24
6e8d199
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
6e8d199
d2bedad
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.7.0-23
d2bedad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
d2bedad
150a0a1
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 3.3.7.0-22
150a0a1
- Rebuilt for Python 3.12
150a0a1
46a0a6d
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.7.0-21
46a0a6d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
46a0a6d
e9f6bf9
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.7.0-20
e9f6bf9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
e9f6bf9
c7cc42c
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 3.3.7.0-19
c7cc42c
- Rebuilt for Python 3.11
c7cc42c
0ea979f
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.7.0-18
0ea979f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
0ea979f
065217f
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.7.0-17
065217f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
065217f
133049d
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 3.3.7.0-16
133049d
- Rebuilt for Python 3.10
133049d
f45e1fe
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.7.0-15
f45e1fe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
f45e1fe
e3721fb
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.7.0-14
e3721fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
e3721fb
8ee2ed1
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 3.3.7.0-13
8ee2ed1
- Rebuilt for Python 3.9
8ee2ed1
2f65bb4
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.7.0-12
2f65bb4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
2f65bb4
7a33ff5
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.3.7.0-11
7a33ff5
- Rebuilt for Python 3.8.0rc1 (#1748018)
7a33ff5
112d561
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.3.7.0-10
112d561
- Rebuilt for Python 3.8
112d561
bacc703
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.7.0-9
bacc703
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
bacc703
369eb69
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.7.0-8
369eb69
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
369eb69
7bc809f
* Mon Sep 17 2018 Javier Peña <jpena@redhat.com> - 3.3.7.0-7
7bc809f
- Removed Python 2 package from Fedora 30+ (bz#1629755)
7bc809f
92a0c3c
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.7.0-6
92a0c3c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
92a0c3c
ef5ecd4
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.3.7.0-5
ef5ecd4
- Rebuilt for Python 3.7
ef5ecd4
36ed27c
* Fri Feb 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 3.3.7.0-4
36ed27c
- Update Python 2 dependency declarations to new packaging standards
36ed27c
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
36ed27c
1dbc1a7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.7.0-3
1dbc1a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
1dbc1a7
7b16c63
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.7.0-2
7b16c63
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
7b16c63
8a54c98
* Mon Feb  6 2017 Haïkel Guémar <hguemar@fedoraproject.org> - 3.3.7.0-1
8a54c98
- Upstream 3.3.7.0
8a54c98
bbf1051
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 3.3.6.0-2
bbf1051
- Rebuild for Python 3.6
bbf1051
7d8ad96
* Fri Aug 19 2016 jpena <jpena@redhat.com> - 3.3.6.0-1
7d8ad96
- Updated to upstream version 3.3.6.0
7d8ad96
- Added external license file, it is no longer bundled in source
7d8ad96
- Fixed source URL
7d8ad96
56296c5
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.5.3-5
56296c5
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
56296c5
1cf5164
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.5.3-4
1cf5164
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
1cf5164
e580629
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.5.3-3
e580629
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
e580629
1344205
* Mon Sep 07 2015 jpena <jpena@redhat.com> - 3.3.5.3-2
1344205
- Added bootswatch-fonts subpackage.
1344205
- Shortened description.
1344205
* Fri Sep 04 2015 jpena <jpena@redhat.com> - 3.3.5.3-1
1344205
- Initial package.