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