]> git.pld-linux.org Git - packages/python-css_parser.git/blob - python-css_parser.spec
rebuild with python 3.10
[packages/python-css_parser.git] / python-css_parser.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module          css_parser
8 %define         egg_name        css_parser
9 %define         pypi_name       css-parser
10 Summary:        A CSS Cascading Style Sheets library for Python
11 Name:           python-%{module}
12 Version:        1.0.4
13 Release:        6
14 License:        LGPL
15 Group:          Libraries/Python
16 Source0:        https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
17 # Source0-md5:  c6caae4db5557a07b7353c97baa13767
18 URL:            https://pypi.org/project/css-parser/
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.714
21 %if %{with python2}
22 BuildRequires:  python-modules
23 BuildRequires:  python-setuptools
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules
27 BuildRequires:  python3-setuptools
28 %endif
29 Requires:       python-modules
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 A fork of the cssutils project based on version 1.0.2. This fork
35 includes general bug fixes and extensions specific to editing and
36 working with ebooks.
37
38 %package -n python3-%{module}
39 Summary:        A CSS Cascading Style Sheets library for Python
40 Group:          Libraries/Python
41 Requires:       python3-modules
42
43 %description -n python3-%{module}
44 A fork of the cssutils project based on version 1.0.2. This fork
45 includes general bug fixes and extensions specific to editing and
46 working with ebooks.
47
48 %prep
49 %setup -q -n %{pypi_name}-%{version}
50
51 %build
52 %if %{with python2}
53 %py_build %{?with_tests:test}
54 %endif
55
56 %if %{with python3}
57 %py3_build %{?with_tests:test}
58 %endif
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62
63 %if %{with python2}
64 %py_install
65
66 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
67 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
68
69 %py_postclean
70 %endif
71
72 %if %{with python3}
73 %py3_install
74 %endif
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %if %{with python2}
80 %files
81 %defattr(644,root,root,755)
82 %doc README.md
83 %{py_sitescriptdir}/%{module}
84 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
85 %endif
86
87 %if %{with python3}
88 %files -n python3-%{module}
89 %defattr(644,root,root,755)
90 %doc README.md
91 %{py3_sitescriptdir}/%{module}
92 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
93 %endif
This page took 0.093652 seconds and 3 git commands to generate.