]> git.pld-linux.org Git - packages/python-markdown.git/blame - python-markdown.spec
- disable python3 here, use py2 mkdocs
[packages/python-markdown.git] / python-markdown.spec
CommitLineData
9a8cda62 1# NOTE: for versions >= 3.2 (for python 3.6+) see python3-markdown.spec
f8804a58 2#
4e2d3523 3# Conditional build:
c1058429 4%bcond_with doc # documentation
4c99705f 5%bcond_without tests # unit tests
cc59a982 6%bcond_without python2 # python2 package
9a8cda62 7%bcond_with python3 # python3 package (built from python3-markdown.spec)
4e2d3523 8
4ceaf0fc 9%define module markdown
f8804a58
JB
10Summary: Markdown implementation in Python 2
11Summary(pl.UTF-8): Implementacja formatu Markdown w Pythonie 2
4ceaf0fc 12Name: python-%{module}
9a8cda62 13# keep 3.1.x here for python2 support
c1058429
JB
14Version: 3.1.1
15Release: 1
a974dd9e
AF
16License: BSD
17Group: Development/Languages/Python
f8e0eed6 18#Source0Download: https://pypi.org/simple/markdown/
f8804a58 19Source0: https://files.pythonhosted.org/packages/source/M/Markdown/Markdown-%{version}.tar.gz
c1058429 20# Source0-md5: d84732ecc65b3a1bff693d9d4c24277f
f8e0eed6 21URL: https://pypi.org/project/markdown/
c1058429
JB
22%if %{with python2}
23BuildRequires: python-devel >= 1:2.7
c1058429 24BuildRequires: python-setuptools >= 36
f8804a58
JB
25%if %{with tests}
26BuildRequires: python-PyYAML
c1058429 27%endif
f8804a58 28%endif
f8804a58 29%if %{with python3}
c1058429
JB
30BuildRequires: python3-devel >= 1:3.5
31BuildRequires: python3-setuptools >= 36
f8804a58
JB
32%if %{with tests}
33BuildRequires: python3-PyYAML
f8804a58 34%endif
4e2d3523 35%endif
0d815958
JB
36%if %{with doc}
37BuildRequires: python-mkdocs >= 1.0
38BuildRequires: python-mkdocs-nature
39%endif
f8e0eed6
JB
40BuildRequires: rpm-pythonprov
41BuildRequires: rpmbuild(macros) >= 1.714
4ceaf0fc 42Provides: python-Markdown = %{version}-%{release}
f8e0eed6 43Obsoletes: python-Markdown < 2.3
a974dd9e
AF
44BuildArch: noarch
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47%description
f8804a58 48This is a Python 2 implementation of John Gruber's Markdown. It is
4e2d3523
ER
49almost completely compliant with the reference implementation, though
50there are a few known issues.
51
f8804a58
JB
52%description -l pl.UTF-8
53Ten pakiet zawiera implementację formatu Markdown Johna Grubera w
54Pythonie 2. Jest prawie całkowicie zgodna z implementacją wzorcową,
55choć jest kilka znanych problemów.
56
4e2d3523 57%package -n python3-markdown
f8804a58
JB
58Summary: Markdown implementation in Python 3
59Summary(pl.UTF-8): Implementacja formatu Markdown w Pythonie 3
4e2d3523 60Group: Development/Languages/Python
24f34a9e 61Conflicts: python-markdown < 3
4e2d3523
ER
62
63%description -n python3-markdown
f8804a58 64This is a Python 3 implementation of John Gruber's Markdown. It is
4e2d3523
ER
65almost completely compliant with the reference implementation, though
66there are a few known issues.
a974dd9e 67
f8804a58
JB
68%description -n python3-markdown -l pl.UTF-8
69Ten pakiet zawiera implementację formatu Markdown Johna Grubera w
70Pythonie 3. Jest prawie całkowicie zgodna z implementacją wzorcową,
71choć jest kilka znanych problemów.
72
a974dd9e 73%prep
cc59a982 74%setup -q -n Markdown-%{version}
4e2d3523 75
a974dd9e 76%build
cc59a982 77%if %{with python2}
d44221e5 78%py_build
a974dd9e 79
4e2d3523 80%if %{with tests}
c1058429 81%{__python} -m unittest discover tests
cc59a982
JB
82%endif
83%endif
4e2d3523 84
f8804a58 85%if %{with python3}
cc59a982
JB
86%py3_build
87
88%if %{with tests}
c1058429 89%{__python3} -m unittest discover tests
4e2d3523
ER
90%endif
91%endif
92
c1058429 93%if %{with doc}
9a8cda62 94mkdocs-2
c1058429
JB
95%endif
96
a974dd9e
AF
97%install
98rm -rf $RPM_BUILD_ROOT
4e2d3523 99
cc59a982
JB
100%if %{with python2}
101%py_install
c1058429 102
cc59a982
JB
103%py_postclean
104# rename binary
105%{__mv} $RPM_BUILD_ROOT%{_bindir}/markdown_py{,-%{py_ver}}
c1058429
JB
106%endif
107
108%if %{with python3}
109%py3_install
110# rename binary
111%{__mv} $RPM_BUILD_ROOT%{_bindir}/markdown_py{,-%{py3_ver}}
112# default binary
113ln -s markdown_py-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/markdown_py
cc59a982 114%endif
4e2d3523 115
a974dd9e
AF
116%clean
117rm -rf $RPM_BUILD_ROOT
118
cc59a982 119%if %{with python2}
a974dd9e
AF
120%files
121%defattr(644,root,root,755)
4c99705f 122%doc LICENSE.md README.md docs/{change_log,extensions,authors.md,cli.md,favicon.ico,index.md,py.png,reference.md}
4e2d3523 123%attr(755,root,root) %{_bindir}/markdown_py-%{py_ver}
a974dd9e 124%{py_sitescriptdir}/markdown
4e2d3523 125%{py_sitescriptdir}/Markdown-%{version}-py*.egg-info
cc59a982 126%endif
4e2d3523 127
f8804a58 128%if %{with python3}
4e2d3523
ER
129%files -n python3-markdown
130%defattr(644,root,root,755)
4c99705f 131%doc LICENSE.md README.md docs/{change_log,extensions,authors.md,cli.md,favicon.ico,index.md,py.png,reference.md}
c1058429 132%attr(755,root,root) %{_bindir}/markdown_py
4e2d3523 133%attr(755,root,root) %{_bindir}/markdown_py-%{py3_ver}
4e2d3523 134%{py3_sitescriptdir}/markdown
f8804a58 135%{py3_sitescriptdir}/Markdown-%{version}-py*.egg-info
a974dd9e 136%endif
This page took 0.130187 seconds and 4 git commands to generate.