Blame SPECS/python-XStatic-Json2yaml.spec

70cdbb
%global pypi_name XStatic-Json2yaml
70cdbb
70cdbb
Name:           python-%{pypi_name}
70cdbb
Version:        0.1.1.0
70cdbb
Release:        10%{?dist}
70cdbb
Summary:        Json2yaml (XStatic packaging standard)
70cdbb
70cdbb
License:        MIT
70cdbb
URL:            https://github.com/jeffsu/json2yaml
70cdbb
Source0:        https://files.pythonhosted.org/packages/source/X/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
70cdbb
BuildArch:      noarch
70cdbb
70cdbb
70cdbb
70cdbb
%description
70cdbb
Json2yaml JavaScript library packaged for setup-tools (easy_install) / pip.
70cdbb
70cdbb
This package is intended to be used by any project that needs these files.
70cdbb
70cdbb
It intentionally does not provide any extra code except some metadata
70cdbb
nor has any extra requirements.
70cdbb
70cdbb
70cdbb
%package -n xstatic-json2yaml-common
70cdbb
Summary:        %{summary}
70cdbb
70cdbb
BuildRequires:  web-assets-devel
70cdbb
Requires:       web-assets-filesystem
70cdbb
70cdbb
%description -n xstatic-json2yaml-common
70cdbb
Json2yaml JavaScript library packaged for setup-tools (easy_install) / pip.
70cdbb
70cdbb
This package is intended to be used by any project that needs these files.
70cdbb
70cdbb
It intentionally does not provide any extra code except some metadata
70cdbb
nor has any extra requirements.
70cdbb
70cdbb
This package contains the JavaScript files.
70cdbb
70cdbb
70cdbb
%package -n python3-%{pypi_name}
70cdbb
Summary:        %{summary}
70cdbb
70cdbb
BuildRequires:  python3-devel
70cdbb
BuildRequires:  python3-setuptools
70cdbb
70cdbb
Requires:       python3-XStatic
70cdbb
Requires:       xstatic-json2yaml-common
70cdbb
70cdbb
%{?python_provide:%python_provide python3-%{pypi_name}}
70cdbb
70cdbb
%description -n python3-%{pypi_name}
70cdbb
Json2yaml JavaScript library packaged for setup-tools (easy_install) / pip.
70cdbb
70cdbb
This package is intended to be used by any project that needs these files.
70cdbb
70cdbb
It intentionally does not provide any extra code except some metadata
70cdbb
nor has any extra requirements.
70cdbb
70cdbb
This package provides Python 3 build of %{pypi_name}.
70cdbb
70cdbb
70cdbb
%prep
70cdbb
%autosetup -n %{pypi_name}-%{version}
70cdbb
# Remove bundled egg-info
70cdbb
rm -rf %{pypi_name}.egg-info
70cdbb
70cdbb
# Patch to use webassets directory
70cdbb
sed -i "s|^BASE_DIR = .*|BASE_DIR = '%{_jsdir}/json2yaml'|" xstatic/pkg/json2yaml/__init__.py
70cdbb
70cdbb
70cdbb
%build
70cdbb
%py3_build
70cdbb
70cdbb
70cdbb
%install
70cdbb
%py3_install
70cdbb
70cdbb
mkdir -p %{buildroot}/%{_jsdir}/json2yaml
70cdbb
mv %{buildroot}/%{python3_sitelib}/xstatic/pkg/json2yaml/data/json2yaml.js %{buildroot}/%{_jsdir}/json2yaml
70cdbb
rmdir %{buildroot}%{python3_sitelib}/xstatic/pkg/json2yaml/data/
70cdbb
70cdbb
%files -n xstatic-json2yaml-common
70cdbb
%doc README.txt
70cdbb
%{_jsdir}/json2yaml
70cdbb
70cdbb
%files -n python3-%{pypi_name}
70cdbb
%doc README.txt
70cdbb
%{python3_sitelib}/xstatic/pkg/json2yaml
70cdbb
%{python3_sitelib}/XStatic_Json2yaml-%{version}-py3.*.egg-info
70cdbb
%{python3_sitelib}/XStatic_Json2yaml-%{version}-py3.*-nspkg.pth
70cdbb
70cdbb
70cdbb
%changelog
70cdbb
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.1.0-10
70cdbb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
70cdbb
70cdbb
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.1.0-9
70cdbb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
70cdbb
70cdbb
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 0.1.1.0-8
70cdbb
- Rebuilt for Python 3.9
70cdbb
70cdbb
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.1.0-7
70cdbb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
70cdbb
70cdbb
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.1.1.0-6
70cdbb
- Rebuilt for Python 3.8.0rc1 (#1748018)
70cdbb
70cdbb
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0.1.1.0-5
70cdbb
- Rebuilt for Python 3.8
70cdbb
70cdbb
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.1.0-4
70cdbb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
70cdbb
70cdbb
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.1.0-3
70cdbb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
70cdbb
70cdbb
* Wed Oct 17 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.1.1.0-2
70cdbb
- Subpackage python2-XStatic-Json2yaml has been removed
70cdbb
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
70cdbb
70cdbb
* Thu Jul 12 2018 Radomir Dopieralski 
70cdbb
- Initial package