]> git.pld-linux.org Git - packages/python-pymdown-extensions.git/blame - python-pymdown-extensions.spec
- release 5 (by relup.sh)
[packages/python-pymdown-extensions.git] / python-pymdown-extensions.spec
CommitLineData
8b356bab
JB
1#
2# Conditional build:
3%bcond_without doc # MkDocs documentation
4%bcond_without tests # unit tests
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8Summary: Extension pack for Python Markdown
9Summary(pl.UTF-8): Zestaw rozszerzeń do pakietu Python Markdown
10Name: python-pymdown-extensions
11Version: 5.0
ec88fea8 12Release: 5
8b356bab
JB
13License: MIT, BSD
14Group: Libraries/Python
15#Source0Download: https://pypi.org/simple/pymdown-extensions/
16Source0: https://files.pythonhosted.org/packages/source/p/pymdown-extensions/pymdown-extensions-%{version}.tar.gz
17# Source0-md5: 158931bf0b6eef56896743c0af1f5c19
18URL: https://github.com/facelessuser/pymdown-extensions
19%if %{with doc}
20BuildRequires: python-mkdocs
21BuildRequires: python-mkdocs-material
22%endif
23%if %{with python2}
24BuildRequires: python-modules >= 1:2.7
25BuildRequires: python-setuptools
26%if %{with tests}
27BuildRequires: python-PyYAML >= 3.10
28BuildRequires: python-markdown >= 2.6.10
29BuildRequires: python-pytest
30%endif
31%endif
32%if %{with python3}
33BuildRequires: python3-modules >= 1:3.3
34BuildRequires: python3-setuptools
35%if %{with tests}
36BuildRequires: python3-PyYAML >= 3.10
37BuildRequires: python3-markdown >= 2.6.10
38BuildRequires: python3-pytest
39%endif
40%endif
41BuildRequires: rpm-pythonprov
42BuildRequires: rpmbuild(macros) >= 1.714
43Requires: python-modules >= 1:2.7
44BuildArch: noarch
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47%description
48Extension pack for Python Markdown.
49
50%description -l pl.UTF-8
51Zestaw rozszerzeń do pakietu Python Markdown.
52
53%package -n python3-pymdown-extensions
54Summary: Extension pack for Python Markdown
55Summary(pl.UTF-8): Zestaw rozszerzeń do pakietu Python Markdown
56Group: Libraries/Python
57Requires: python3-modules >= 1:3.3
58
59%description -n python3-pymdown-extensions
60Extension pack for Python Markdown.
61
62%description -n python3-pymdown-extensions -l pl.UTF-8
63Zestaw rozszerzeń do pakietu Python Markdown.
64
65%package apidocs
66Summary: API documentation for Python pymdown-extensions module
67Summary(pl.UTF-8): Dokumentacja API modułu Pythona pymdown-extensions
68Group: Documentation
69
70%description apidocs
71API documentation for Python pymdown-extensions module.
72
73%description apidocs -l pl.UTF-8
74Dokumentacja API modułu Pythona pymdown-extensions.
75
76%prep
77%setup -q -n pymdown-extensions-%{version}
78
79%build
80%if %{with python2}
81%py_build %{?with_tests:test}
82%endif
83
84%if %{with python3}
85%py3_build %{?with_tests:test}
86%endif
87
88%if %{with doc}
89PYTHONPATH=$(pwd) \
90mkdocs build --clean --verbose --strict
91
92%{__rm} site/{__init__.py*,sitemap.xml*}
93%endif
94
95%install
96rm -rf $RPM_BUILD_ROOT
97
98%if %{with python2}
99%py_install
100
101%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/tests
102
103%py_postclean
104%endif
105
106%if %{with python3}
107%py3_install
108
109%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/tests
110%endif
111
112%clean
113rm -rf $RPM_BUILD_ROOT
114
115%if %{with python2}
116%files
117%defattr(644,root,root,755)
118%doc LICENSE.md README.md
119%{py_sitescriptdir}/pymdownx
120%{py_sitescriptdir}/pymdown_extensions-%{version}-py*.egg-info
121%endif
122
123%if %{with python3}
124%files -n python3-pymdown-extensions
125%defattr(644,root,root,755)
126%doc LICENSE.md README.md
127%{py3_sitescriptdir}/pymdownx
128%{py3_sitescriptdir}/pymdown_extensions-%{version}-py*.egg-info
129%endif
130
131%if %{with doc}
132%files apidocs
133%defattr(644,root,root,755)
134%doc site/*
135%endif
This page took 0.240523 seconds and 4 git commands to generate.