-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtldr.spec
54 lines (45 loc) · 1.45 KB
/
tldr.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Name: tldr
Version: 3.3.0
Release: 1
Summary: Simplified and community-driven man pages
License: MIT
URL: https://github.com/tldr-pages/tldr-python-client
Source0: https://github.com/tldr-pages/tldr-python-client/archive/%{version}/%{name}-python-client-%{version}.tar.gz
BuildArch: noarch
BuildRequires: pkgconfig(python)
# dependencies for make man
BuildRequires: make
BuildRequires: python3dist(sphinx)
BuildRequires: python3dist(termcolor)
BuildRequires: python3dist(colorama)
BuildRequires: python3dist(shtab)
#BuildRequires: python3dist(sphinx-argparse)
# dependencies for %%check
#BuildRequires: python3dist(pytest)
%description
A Python command line client for tldr - Simplified and community-driven
man pages http://tldr-pages.github.io/.
%prep
%autosetup -n %{name}-python-client-%{version}
%build
pushd docs
make man
popd
%py_build
%{python3} tldr.py --print-completion bash > tldr.bash
%{python3} tldr.py --print-completion zsh > tldr.zsh
%install
%py_install
#pyproject_install
#pyproject_save_files tldr
install -Dp --mode=0644 %{name}.bash %{buildroot}%{bash_completions_dir}/%{name}
install -Dp --mode=0644 %{name}.zsh %{buildroot}%{zsh_completions_dir}/_%{name}
#check
#pytest -k "not test_error_message"
%files -f %{pyproject_files}
%license LICENSE.md
%doc CHANGELOG.md README.md
%{_bindir}/%{name}
%{_mandir}/man1/tldr.1*
%{bash_completions_dir}/%{name}
%{zsh_completions_dir}/_%{name}