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