]>
Commit | Line | Data |
---|---|---|
b3baeb49 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # do not perform "make test" | |
4 | ||
5 | %define module wlc | |
6 | %define egg_name wlc | |
7 | %define pypi_name wlc | |
8 | Summary: Weblate commandline client using Weblate's REST API | |
9 | Name: wlc | |
10 | Version: 0.5 | |
11 | Release: 1 | |
12 | License: GPL v3+ | |
13 | Group: Libraries/Python | |
14 | Source0: https://files.pythonhosted.org/packages/source/w/%{module}/%{module}-%{version}.tar.gz | |
15 | # Source0-md5: 15a3a221938aa4ef75698aed72ffd0be | |
16 | URL: https://weblate.org/ | |
17 | BuildRequires: python3-devel | |
18 | BuildRequires: python3-setuptools | |
19 | BuildRequires: rpm-pythonprov | |
20 | BuildRequires: rpmbuild(macros) >= 1.714 | |
b3baeb49 ER |
21 | Requires: python3-setuptools |
22 | BuildArch: noarch | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | A command line utility for Weblate, translation tool with tight | |
27 | version control integration | |
28 | ||
29 | %prep | |
30 | %setup -q -n %{module}-%{version} | |
31 | ||
32 | # Remove bundled egg-info | |
33 | %{__rm} -r %{module}.egg-info | |
34 | ||
35 | %build | |
36 | %py3_build %{?with_tests:test} | |
37 | ||
38 | %install | |
39 | rm -rf $RPM_BUILD_ROOT | |
40 | %py3_install | |
41 | ||
42 | %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/test_* | |
43 | %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/__pycache__/test_* | |
44 | ||
45 | %clean | |
46 | rm -rf $RPM_BUILD_ROOT | |
47 | ||
48 | %files | |
49 | %defattr(644,root,root,755) | |
50 | %doc README.rst | |
51 | %attr(755,root,root) %{_bindir}/wlc | |
52 | %{py3_sitescriptdir}/%{pypi_name} | |
53 | %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info |