]>
Commit | Line | Data |
---|---|---|
c66144c0 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # unit tests [some files are missing in tarball] | |
4 | %bcond_without python2 # CPython 2.x module | |
5 | %bcond_without python3 # CPython 3.x module | |
6 | ||
7 | Summary: Project documentation with Markdown | |
8 | Summary(pl.UTF-8): Dokumentacja projektu przy użyciu notacji Markdown | |
9 | Name: python-mkdocs | |
10 | Version: 1.0.4 | |
e4471ef5 | 11 | Release: 5 |
c66144c0 JB |
12 | License: BSD |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/mkdocs/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/m/mkdocs/mkdocs-%{version}.tar.gz | |
16 | # Source0-md5: 771d52ebb4a79a8ba36fd748da72ae5c | |
17 | URL: https://www.mkdocs.org/ | |
18 | BuildRequires: rpm-pythonprov | |
19 | BuildRequires: rpmbuild(macros) >= 1.714 | |
20 | %if %{with python2} | |
21 | BuildRequires: python-modules >= 1:2.7 | |
22 | BuildRequires: python-setuptools | |
23 | %if %{with tests} | |
24 | BuildRequires: python-PyYAML >= 3.10 | |
25 | BuildRequires: python-click >= 3.3 | |
26 | BuildRequires: python-jinja2 >= 2.7.1 | |
27 | BuildRequires: python-livereload >= 2.5.1 | |
28 | BuildRequires: python-markdown >= 2.3.1 | |
29 | BuildRequires: python-mock | |
30 | BuildRequires: python-tornado >= 5.0 | |
31 | %endif | |
32 | %endif | |
33 | %if %{with python3} | |
34 | BuildRequires: python3-modules >= 1:3.4 | |
35 | BuildRequires: python3-setuptools | |
36 | %if %{with tests} | |
37 | BuildRequires: python3-PyYAML >= 3.10 | |
38 | BuildRequires: python3-click >= 3.3 | |
39 | BuildRequires: python3-jinja2 >= 2.7.1 | |
40 | BuildRequires: python3-livereload >= 2.5.1 | |
41 | BuildRequires: python3-markdown >= 2.3.1 | |
42 | BuildRequires: python3-tornado >= 5.0 | |
43 | %endif | |
44 | %endif | |
45 | Requires: python-modules >= 1:2.7 | |
46 | BuildArch: noarch | |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
48 | ||
49 | %description | |
50 | MkDocs is a fast, simple and downright gorgeous static site generator | |
51 | that's geared towards building project documentation. Documentation | |
52 | source files are written in Markdown, and configured with a single | |
53 | YAML configuration file. | |
54 | ||
55 | %description -l pl.UTF-8 | |
56 | MkDocs to szybki, prosty i wręcz wspaniały generator statycznych stron | |
57 | nakierowana na budowanie dokumentacji projektu. Pliki źródłowe | |
58 | dokumentacji są pisane w notacji Markdown i konfigurowane przy użyciu | |
59 | pojedynczego pliku konfiguracyjnego YAML. | |
60 | ||
61 | %package -n python3-mkdocs | |
62 | Summary: Project documentation with Markdown | |
63 | Summary(pl.UTF-8): Dokumentacja projektu przy użyciu notacji Markdown | |
64 | Group: Libraries/Python | |
65 | Requires: python3-modules >= 1:3.4 | |
66 | ||
67 | %description -n python3-mkdocs | |
68 | MkDocs is a fast, simple and downright gorgeous static site generator | |
69 | that's geared towards building project documentation. Documentation | |
70 | source files are written in Markdown, and configured with a single | |
71 | YAML configuration file. | |
72 | ||
73 | %description -n python3-mkdocs -l pl.UTF-8 | |
74 | MkDocs to szybki, prosty i wręcz wspaniały generator statycznych stron | |
75 | nakierowana na budowanie dokumentacji projektu. Pliki źródłowe | |
76 | dokumentacji są pisane w notacji Markdown i konfigurowane przy użyciu | |
77 | pojedynczego pliku konfiguracyjnego YAML. | |
78 | ||
79 | %prep | |
80 | %setup -q -n mkdocs-%{version} | |
81 | ||
82 | %build | |
83 | %if %{with python2} | |
84 | %py_build %{?with_tests:test} | |
85 | %endif | |
86 | ||
87 | %if %{with python3} | |
88 | %py3_build %{?with_tests:test} | |
89 | %endif | |
90 | ||
91 | %install | |
92 | rm -rf $RPM_BUILD_ROOT | |
93 | ||
94 | %if %{with python3} | |
95 | %py3_install | |
96 | ||
97 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/mkdocs{,-3} | |
98 | %endif | |
99 | ||
100 | %if %{with python2} | |
101 | %py_install | |
102 | ||
103 | %py_postclean | |
104 | %endif | |
105 | ||
106 | %clean | |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
109 | %if %{with python2} | |
110 | %files | |
111 | %defattr(644,root,root,755) | |
112 | %doc LICENSE README.md | |
113 | %attr(755,root,root) %{_bindir}/mkdocs | |
114 | %{py_sitescriptdir}/mkdocs | |
115 | %{py_sitescriptdir}/mkdocs-%{version}-py*.egg-info | |
116 | %endif | |
117 | ||
118 | %if %{with python3} | |
119 | %files -n python3-mkdocs | |
120 | %defattr(644,root,root,755) | |
121 | %doc LICENSE README.md | |
122 | %attr(755,root,root) %{_bindir}/mkdocs-3 | |
123 | %{py3_sitescriptdir}/mkdocs | |
124 | %{py3_sitescriptdir}/mkdocs-%{version}-py*.egg-info | |
125 | %endif |