]> git.pld-linux.org Git - packages/python-m2r.git/blame - python-m2r.spec
rebuild with python 3.10
[packages/python-m2r.git] / python-m2r.spec
CommitLineData
b1f2c45f
JB
1#
2# Conditional build:
3%bcond_without tests # unit tests
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: Markdown and reStructuredText in a single file
8Summary(pl.UTF-8): Markdown i reStructuredText w pojedynczym pliku
9Name: python-m2r
10Version: 0.2.1
3d867db0 11Release: 3
b1f2c45f
JB
12License: MIT
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/m2r/
15Source0: https://files.pythonhosted.org/packages/source/m/m2r/m2r-%{version}.tar.gz
16# Source0-md5: 8bdb45c19e2b59bb5ffb9a0348e81ad8
17URL: https://pypi.org/project/m2r/
18%if %{with python2}
19BuildRequires: python-modules >= 1:2.7
20BuildRequires: python-setuptools
21%if %{with tests}
22BuildRequires: python-docutils
23BuildRequires: python-mistune
24BuildRequires: python-mock
25BuildRequires: python-pygments
26%endif
27%endif
28%if %{with python3}
29BuildRequires: python3-modules >= 1:3.4
30BuildRequires: python3-setuptools
31%if %{with tests}
32BuildRequires: python3-docutils
33BuildRequires: python3-mistune
34BuildRequires: python3-pygments
35%endif
36%endif
37BuildRequires: rpm-pythonprov
38BuildRequires: rpmbuild(macros) >= 1.714
39Requires: python-modules >= 1:2.7
40BuildArch: noarch
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43%description
44M2R converts a markdown file including reStructuredText (rst) markups
45to a valid rst format.
46
47%description -l pl.UTF-8
48M2R konwertuje plik markdown zawierający znaczniki reStructuredText
49(rst) na poprawny format rst.
50
51%package -n python3-m2r
52Summary: Markdown and reStructuredText in a single file
53Summary(pl.UTF-8): Markdown i reStructuredText w pojedynczym pliku
54Group: Libraries/Python
55Requires: python3-modules >= 1:3.4
56
57%description -n python3-m2r
58M2R converts a markdown file including reStructuredText (rst) markups
59to a valid rst format.
60
61%description -n python3-m2r -l pl.UTF-8
62M2R konwertuje plik markdown zawierający znaczniki reStructuredText
63(rst) na poprawny format rst.
64
65%prep
66%setup -q -n m2r-%{version}
67
68%build
69%if %{with python2}
70%py_build
71
72%if %{with tests}
73%{__python} -m unittest discover -s tests
74%endif
75%endif
76
77%if %{with python3}
78%py3_build
79
80%if %{with tests}
81%{__python3} -m unittest discover -s tests
82%endif
83%endif
84
85%install
86rm -rf $RPM_BUILD_ROOT
87
88%if %{with python2}
89%py_install
90
91%{__mv} $RPM_BUILD_ROOT%{_bindir}/m2r{,-2}
92
93%py_postclean
94%endif
95
96%if %{with python3}
97%py3_install
98
99%{__mv} $RPM_BUILD_ROOT%{_bindir}/m2r{,-3}
100ln -snf m2r-3 $RPM_BUILD_ROOT%{_bindir}/m2r
101%endif
102
103%clean
104rm -rf $RPM_BUILD_ROOT
105
106%if %{with python2}
107%files
108%defattr(644,root,root,755)
109%doc CHANGES.md LICENSE README.md
110%attr(755,root,root) %{_bindir}/m2r-2
111%{py_sitescriptdir}/m2r.py[co]
112%{py_sitescriptdir}/m2r-%{version}-py*.egg-info
113%endif
114
115%if %{with python3}
116%files -n python3-m2r
117%defattr(644,root,root,755)
118%doc CHANGES.md LICENSE README.md
119%attr(755,root,root) %{_bindir}/m2r
120%attr(755,root,root) %{_bindir}/m2r-3
121%{py3_sitescriptdir}/m2r.py
122%{py3_sitescriptdir}/__pycache__/m2r.cpython-*.py[co]
123%{py3_sitescriptdir}/m2r-%{version}-py*.egg-info
124%endif
This page took 0.119256 seconds and 4 git commands to generate.