Blob Blame History Raw
Name:           python-css-parser
Version:        1.0.4
Release:        4%{?dist}
Summary:        Parse and build Cascading Style Sheets

License:        LGPLv3
URL:            https://github.com/ebook-utils/css-parser
Source0:        https://github.com/ebook-utils/css-parser/archive/v%{version}/%{name}-%{version}.tar.gz

# https://github.com/ebook-utils/css-parser/pull/5
Patch1:         0001-Handle-test-failure-when-no-network-connection.patch
Patch2:         0002-Merge-branch-catch-urlerror-of-https-github.com-kesz.patch

BuildArch:      noarch
BuildRequires:  python3-devel
# for tests
BuildRequires:  python3-chardet

%global _description %{expand:
A fork of the cssutils project based on version 1.0.2. This fork includes
general bug fixes and extensions specific to editing and working with ebooks.}

%description %_description

%package -n python3-css-parser
Summary:        %{summary}
%{?python_provide:%python_provide python3-css-parser}

%description -n python3-css-parser %_description

%prep
%autosetup -n css-parser-%{version} -p1

%build
sed -r -i '1{/.usr.bin.env python/d;}' src/css_parser/*py src/css_parser/*/*py

%py3_build

%install
%py3_install

%check
%{__python3} run_tests.py

%files -n python3-css-parser
%{python3_sitelib}/css_parser/
%{python3_sitelib}/css_parser-%{version}-py%{python3_version}.egg-info/
%doc README.md
%license COPYING COPYING.LESSER

%changelog
* Thu Aug 22 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.4-4
- Subpackage python2-css-parser has been removed (#1741018)

* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.4-3
- Rebuilt for Python 3.8

* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Tue Jun 11 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.0.4-1
- Initial packaging