]> git.pld-linux.org Git - packages/python3-markdown.git/blob - python3-markdown.spec
rebuild with tests and docs
[packages/python3-markdown.git] / python3-markdown.spec
1 #
2 # Conditional build:
3 %bcond_with     doc     # documentation
4 %bcond_without  tests   # unit tests
5
6 %define         module  markdown
7 Summary:        Markdown implementation in Python 3
8 Summary(pl.UTF-8):      Implementacja formatu Markdown w Pythonie 3
9 Name:           python3-%{module}
10 Version:        3.3.4
11 Release:        3
12 License:        BSD
13 Group:          Development/Languages/Python
14 #Source0Download: https://pypi.org/simple/markdown/
15 Source0:        https://files.pythonhosted.org/packages/source/M/Markdown/Markdown-%{version}.tar.gz
16 # Source0-md5:  b6833c6326e9164ee0c662218a75e7f0
17 URL:            https://pypi.org/project/markdown/
18 BuildRequires:  python3-devel >= 1:3.6
19 BuildRequires:  python3-setuptools >= 1:36.6
20 %if %{with tests}
21 BuildRequires:  python3-PyYAML
22 %if "%{py3_ver}" <= "3.8"
23 BuildRequires:  python3-importlib_metadata
24 %endif
25 %endif
26 %if %{with doc}
27 BuildRequires:  python3-mkdocs >= 1.0
28 BuildRequires:  python3-mkdocs-nature
29 %endif
30 BuildRequires:  rpm-pythonprov
31 BuildRequires:  rpmbuild(macros) >= 1.714
32 Conflicts:      python-markdown < 3
33 BuildArch:      noarch
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 This is a Python 3 implementation of John Gruber's Markdown. It is
38 almost completely compliant with the reference implementation, though
39 there are a few known issues.
40
41 %description -l pl.UTF-8
42 Ten pakiet zawiera implementację formatu Markdown Johna Grubera w
43 Pythonie 3. Jest prawie całkowicie zgodna z implementacją wzorcową,
44 choć jest kilka znanych problemów.
45
46 %prep
47 %setup -q -n Markdown-%{version}
48
49 %build
50 %py3_build
51
52 %if %{with tests}
53 %{__python3} -m unittest discover tests
54 %endif
55
56 %if %{with doc}
57 mkdocs-3
58 %endif
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62
63 %py3_install
64 # rename binary
65 %{__mv} $RPM_BUILD_ROOT%{_bindir}/markdown_py{,-%{py3_ver}}
66 # default binary
67 ln -s markdown_py-%{py3_ver} $RPM_BUILD_ROOT%{_bindir}/markdown_py
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 %files
73 %defattr(644,root,root,755)
74 %doc LICENSE.md README.md docs/{change_log,extensions,authors.md,cli.md,favicon.ico,index.md,py.png,reference.md}
75 %attr(755,root,root) %{_bindir}/markdown_py
76 %attr(755,root,root) %{_bindir}/markdown_py-%{py3_ver}
77 %{py3_sitescriptdir}/markdown
78 %{py3_sitescriptdir}/Markdown-%{version}-py*.egg-info
This page took 0.133459 seconds and 3 git commands to generate.