]>
Commit | Line | Data |
---|---|---|
b644e90e JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | %bcond_without python2 # CPython 2.x module | |
5 | %bcond_without python3 # CPython 3.x module | |
6 | ||
7 | Summary: Fast markdown parser in pure Python | |
8 | Summary(pl.UTF-8): Szybki parser markdown napisany w czystym Pythonie | |
9 | Name: python-mistune | |
10 | Version: 0.8.4 | |
7ea49d10 | 11 | Release: 6 |
b644e90e JB |
12 | License: BSD |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/mistune/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/m/mistune/mistune-%{version}.tar.gz | |
16 | # Source0-md5: fb6ab174ece938dea09f8b2adad771e4 | |
17 | URL: https://github.com/lepture/mistune | |
18 | BuildRequires: rpm-pythonprov | |
19 | BuildRequires: rpmbuild(macros) >= 1.714 | |
20 | %if %{with python2} | |
21 | BuildRequires: python-modules >= 1:2.7 | |
22 | BuildRequires: python-setuptools | |
23 | %{?with_tests:BuildRequires: python-nose} | |
24 | %endif | |
25 | %if %{with python3} | |
26 | BuildRequires: python3-modules >= 1:3.5 | |
27 | BuildRequires: python3-setuptools | |
28 | %{?with_tests:BuildRequires: python3-nose} | |
29 | %endif | |
30 | Requires: python-modules >= 1:2.7 | |
31 | BuildArch: noarch | |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
35 | The fastest markdown parser in pure Python with renderer features, | |
36 | inspired by marked. | |
37 | ||
38 | %description -l pl.UTF-8 | |
39 | Najszybszy parser markdown w czystym Pythonie z obsługą renderingu, | |
40 | zainspirowany modułem marked. | |
41 | ||
42 | %package -n python3-mistune | |
43 | Summary: Fast markdown parser in pure Python | |
44 | Summary(pl.UTF-8): Szybki parser markdown napisany w czystym Pythonie | |
45 | Group: Libraries/Python | |
46 | Requires: python3-modules >= 1:3.5 | |
47 | ||
48 | %description -n python3-mistune | |
49 | The fastest markdown parser in pure Python with renderer features, | |
50 | inspired by marked. | |
51 | ||
52 | %description -n python3-mistune -l pl.UTF-8 | |
53 | Najszybszy parser markdown w czystym Pythonie z obsługą renderingu, | |
54 | zainspirowany modułem marked. | |
55 | ||
56 | %prep | |
57 | %setup -q -n mistune-%{version} | |
58 | ||
59 | %build | |
60 | %if %{with python2} | |
61 | %py_build %{?with_tests:test} | |
62 | %endif | |
63 | ||
64 | %if %{with python3} | |
65 | %py3_build %{?with_tests:test} | |
66 | %endif | |
67 | ||
68 | %install | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | ||
71 | %if %{with python2} | |
72 | %py_install | |
73 | ||
74 | %py_postclean | |
75 | %endif | |
76 | ||
77 | %if %{with python3} | |
78 | %py3_install | |
79 | %endif | |
80 | ||
81 | %clean | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %if %{with python2} | |
85 | %files | |
86 | %defattr(644,root,root,755) | |
87 | %doc CHANGES.rst LICENSE README.rst | |
88 | %{py_sitescriptdir}/mistune.py[co] | |
89 | %{py_sitescriptdir}/mistune-%{version}-py*.egg-info | |
90 | %endif | |
91 | ||
92 | %if %{with python3} | |
93 | %files -n python3-mistune | |
94 | %defattr(644,root,root,755) | |
95 | %doc CHANGES.rst LICENSE README.rst | |
96 | %{py3_sitescriptdir}/mistune.py | |
97 | %{py3_sitescriptdir}/__pycache__/mistune.cpython-*.py[co] | |
98 | %{py3_sitescriptdir}/mistune-%{version}-py*.egg-info | |
99 | %endif |