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