]>
Commit | Line | Data |
---|---|---|
8cbc6d6a JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with doc # Sphinx documentation (not included in sdist) | |
4 | %bcond_with tests # unit tests (not included in sdist) | |
5 | ||
6 | Summary: Extended CommonMark compliant parser with bridges to docutils and Sphinx | |
7 | Summary(pl.UTF-8): Rozszerzony parser zgodny z CommonMark z interfejsami do docutils i Sphinksa | |
8 | Name: python3-myst_parser | |
827a9b68 | 9 | Version: 0.17.0 |
04f9f87c | 10 | Release: 3 |
8cbc6d6a JB |
11 | License: MIT |
12 | Group: Libraries/Python | |
13 | #Source0Download: https://pypi.org/simple/myst-parser/ | |
14 | Source0: https://files.pythonhosted.org/packages/source/m/myst-parser/myst-parser-%{version}.tar.gz | |
827a9b68 JB |
15 | # Source0-md5: 06b63965cd30eeb7aa14d0779e5756a2 |
16 | Patch0: %{name}-docutils.patch | |
8cbc6d6a | 17 | URL: https://pypi.org/project/myst-parser/ |
827a9b68 | 18 | BuildRequires: python3-modules >= 1:3.7 |
8cbc6d6a JB |
19 | BuildRequires: python3-setuptools >= 1:46.4.0 |
20 | %if %{with tests} | |
21 | BuildRequires: python3-PyYAML | |
22 | BuildRequires: python3-Sphinx >= 3.1 | |
23 | BuildRequires: python3-Sphinx < 5 | |
24 | BuildRequires: python3-bs4 | |
25 | BuildRequires: python3-docutils >= 0.15 | |
26 | BuildRequires: python3-docutils < 0.18 | |
27 | BuildRequires: python3-jinja2 | |
28 | BuildRequires: python3-markdown-it-py >= 1.0.0 | |
827a9b68 | 29 | BuildRequires: python3-markdown-it-py < 3 |
8cbc6d6a | 30 | BuildRequires: python3-mdit-py-plugins >= 0.3.0 |
827a9b68 | 31 | BuildRequires: python3-pytest >= 6 |
8cbc6d6a | 32 | BuildRequires: python3-pytest-cov |
827a9b68 | 33 | BuildRequires: python3-pytest-param-files >= 0.3.4 |
8cbc6d6a | 34 | BuildRequires: python3-pytest-regressions |
827a9b68 | 35 | BuildRequires: python3-typing_extensions |
8cbc6d6a JB |
36 | %endif |
37 | BuildRequires: rpm-pythonprov | |
38 | BuildRequires: rpmbuild(macros) >= 1.714 | |
39 | BuildRequires: sed >= 4.0 | |
40 | %if %{with doc} | |
827a9b68 JB |
41 | BuildRequires: python3-ipython |
42 | BuildRequires: python3-sphinx_book_theme >= 0.1.0 | |
43 | BuildRequires: python3-sphinx_panels >= 0.5.2 | |
44 | BuildRequires: python3-sphinxcontrib-bibtex >= 2.1 | |
45 | BuildRequires: python3-sphinxcontrib-mermaid >= 0.6.3 | |
46 | BuildRequires: python3-sphinxext-opengraph >= 0.4.2 | |
47 | BuildRequires: python3-sphinxext-rediraffe >= 0.2 | |
8cbc6d6a | 48 | BuildRequires: sphinx-pdg-3 |
8cbc6d6a | 49 | %endif |
827a9b68 | 50 | Requires: python3-modules >= 1:3.7 |
8cbc6d6a JB |
51 | BuildArch: noarch |
52 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
53 | ||
54 | %description | |
55 | MyST is a rich and extensible flavor of Markdown meant for technical | |
56 | documentation and publishing. | |
57 | ||
58 | %description -l pl.UTF-8 | |
59 | MyST to bogata i rozszerzalna odmiana notacji Markdown, przeznaczona | |
60 | do dokumentacji i publikacji technicznych. | |
61 | ||
62 | %package apidocs | |
63 | Summary: API documentation for Python myst_parser module | |
64 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona myst_parser | |
65 | Group: Documentation | |
66 | ||
67 | %description apidocs | |
68 | API documentation for Python myst_parser module. | |
69 | ||
70 | %description apidocs -l pl.UTF-8 | |
71 | Dokumentacja API modułu Pythona myst_parser. | |
72 | ||
73 | %prep | |
74 | %setup -q -n myst-parser-%{version} | |
827a9b68 | 75 | %patch0 -p1 |
8cbc6d6a JB |
76 | |
77 | %{__sed} -i -e '/mdit-py-plugins/ s/~=/>=/' setup.cfg | |
78 | ||
79 | %build | |
80 | %py3_build | |
81 | ||
82 | %if %{with tests} | |
83 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
84 | %{__python3} -m pytest tests | |
85 | %endif | |
86 | ||
87 | %if %{with doc} | |
88 | cd docs | |
89 | %{__python3} -m sphinx -W . build/html | |
90 | %endif | |
91 | ||
92 | %install | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %py3_install | |
96 | ||
97 | %clean | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %files | |
101 | %defattr(644,root,root,755) | |
102 | %doc CHANGELOG.md LICENSE README.md | |
103 | %attr(755,root,root) %{_bindir}/myst-anchors | |
104 | %attr(755,root,root) %{_bindir}/myst-docutils-html | |
105 | %attr(755,root,root) %{_bindir}/myst-docutils-html5 | |
106 | %attr(755,root,root) %{_bindir}/myst-docutils-latex | |
107 | %attr(755,root,root) %{_bindir}/myst-docutils-pseudoxml | |
108 | %attr(755,root,root) %{_bindir}/myst-docutils-xml | |
109 | %{py3_sitescriptdir}/myst_parser | |
110 | %{py3_sitescriptdir}/myst_parser-%{version}-py*.egg-info | |
111 | ||
112 | %if %{with doc} | |
113 | %files apidocs | |
114 | %defattr(644,root,root,755) | |
115 | %doc docs/build/html/* | |
116 | %endif |