Initial import (#1526200)
This commit is contained in:
parent
7f0163053f
commit
a71c7fc1f8
5 changed files with 140 additions and 3 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/tinycss2-0.6.1.tar.gz
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# python-tinycss2
|
||||
|
||||
The python-tinycss2 package
|
||||
13
python-tinycss2-disable-flake8-isort-for-pytest.patch
Normal file
13
python-tinycss2-disable-flake8-isort-for-pytest.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/setup.cfg b/setup.cfg
|
||||
index ae602ff..a6452e5 100644
|
||||
--- a/setup.cfg
|
||||
+++ b/setup.cfg
|
||||
@@ -5,7 +5,7 @@ test = pytest
|
||||
universal = 1
|
||||
|
||||
[tool:pytest]
|
||||
-addopts = --cov=tinycss2 --flake8 --isort tinycss2/test.py
|
||||
+addopts = --cov=tinycss2 tinycss2/test.py
|
||||
norecursedirs = dist .cache .git build *.egg-info .eggs venv
|
||||
|
||||
[egg_info]
|
||||
125
python-tinycss2.spec
Normal file
125
python-tinycss2.spec
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
|
||||
%global srcname tinycss2
|
||||
|
||||
%if 0%{?fedora}
|
||||
%bcond_without python3
|
||||
%else
|
||||
%bcond_with python3
|
||||
%endif
|
||||
|
||||
%global py2_prefix python2
|
||||
%global py3_prefix python%{python3_pkgversion}
|
||||
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 0.6.1
|
||||
Release: 2%{?dist}
|
||||
Summary: Low-level CSS parser for Python
|
||||
|
||||
License: BSD
|
||||
URL: https://pypi.python.org/pypi/%{srcname}/
|
||||
Source0: https://files.pythonhosted.org/packages/source/t/%{srcname}/%{srcname}-%{version}.tar.gz
|
||||
# Fedora does not ship pytest's flake8/isort modules
|
||||
Patch0: %{name}-disable-flake8-isort-for-pytest.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: %{py2_prefix}-devel
|
||||
BuildRequires: %{py2_prefix}-pytest
|
||||
BuildRequires: %{py2_prefix}-pytest-cov
|
||||
# required to run the tests
|
||||
BuildRequires: %{py2_prefix}-webencodings >= 0.4
|
||||
%if %{with python3}
|
||||
BuildRequires: %{py3_prefix}-devel
|
||||
BuildRequires: %{py3_prefix}-pytest
|
||||
BuildRequires: %{py3_prefix}-pytest-cov
|
||||
# required for testing
|
||||
BuildRequires: %{py3_prefix}-webencodings >= 0.4
|
||||
%endif # with python3
|
||||
|
||||
%description
|
||||
tinycss2 is a modern, low-level CSS parser for Python. tinycss2 is a rewrite of
|
||||
tinycss with a simpler API, based on the more recent CSS Syntax Level 3
|
||||
specification.
|
||||
|
||||
|
||||
%package -n %{py2_prefix}-%{srcname}
|
||||
Summary: Low-level CSS parser for Python 2
|
||||
Group: Development/Libraries
|
||||
Requires: python2-webencodings >= 0.4
|
||||
%{?python_provide:%python_provide %{py2_prefix}-%{srcname}}
|
||||
|
||||
%description -n %{py2_prefix}-%{srcname}
|
||||
tinycss2 is a modern, low-level CSS parser for Python. tinycss2 is a rewrite of
|
||||
tinycss with a simpler API, based on the more recent CSS Syntax Level 3
|
||||
specification.
|
||||
|
||||
|
||||
|
||||
%if %{with python3}
|
||||
%package -n %{py3_prefix}-%{srcname}
|
||||
Summary: Low-level CSS parser for Python 3
|
||||
Group: Development/Libraries
|
||||
Requires: %{py3_prefix}-webencodings >= 0.4
|
||||
%{?python_provide:%python_provide %{py3_prefix}-%{srcname}}
|
||||
|
||||
%description -n %{py3_prefix}-%{srcname}
|
||||
tinycss2 is a modern, low-level CSS parser for Python. tinycss2 is a rewrite of
|
||||
tinycss with a simpler API, based on the more recent CSS Syntax Level 3
|
||||
specification.
|
||||
%endif # with python3
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{srcname}-%{version}
|
||||
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%if %{with python3}
|
||||
%py3_build
|
||||
%endif # with python3
|
||||
|
||||
|
||||
%install
|
||||
%py2_install
|
||||
%if %{with python3}
|
||||
%py3_install
|
||||
%endif # with python3
|
||||
|
||||
|
||||
%check
|
||||
%{__python2} -m pytest -v
|
||||
# remove files which are only required for unit tests (including test.pyc/.pyo)
|
||||
rm -rf %{buildroot}%{python2_sitelib}/%{srcname}/css-parsing-tests
|
||||
rm -rf %{buildroot}%{python2_sitelib}/%{srcname}/test.py*
|
||||
%if %{with python3}
|
||||
%{__python3} -m pytest -v
|
||||
rm -rf %{buildroot}%{python3_sitelib}/%{srcname}/css-parsing-tests
|
||||
rm -rf %{buildroot}%{python3_sitelib}/%{srcname}/test.py
|
||||
rm -rf %{buildroot}%{python3_sitelib}/%{srcname}/__pycache__/test.*.py?
|
||||
%endif # with python3
|
||||
|
||||
|
||||
%files -n %{py2_prefix}-%{srcname}
|
||||
%license LICENSE
|
||||
%doc CHANGES README.rst
|
||||
%{python2_sitelib}/%{srcname}/
|
||||
%{python2_sitelib}/%{srcname}-%{version}-py?.?.egg-info/
|
||||
|
||||
%if %{with python3}
|
||||
%files -n %{py3_prefix}-%{srcname}
|
||||
%license LICENSE
|
||||
%doc CHANGES README.rst
|
||||
%{python3_sitelib}/%{srcname}/
|
||||
%{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info/
|
||||
%endif # with python3
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Dec 16 2017 Felix Schwarz <fschwarz@fedoraproject.org> 0.6.1-2
|
||||
- remove also generated bytecode for test.py in Python 3
|
||||
- more specific files specification
|
||||
|
||||
* Tue Dec 12 2017 Felix Schwarz <fschwarz@fedoraproject.org> 0.6.1-1
|
||||
- initial package
|
||||
|
||||
1
sources
Normal file
1
sources
Normal file
|
|
@ -0,0 +1 @@
|
|||
SHA512 (tinycss2-0.6.1.tar.gz) = fa064bbb06d641a497a3c1eb35118bbf8ca8c4d32fbd3d8c64bb10d6cdab24387e77cd4c3277a957f23de2bd527a407836245f4387d7f880958858bd9cc7ab89
|
||||
Loading…
Add table
Add a link
Reference in a new issue