]>
Commit | Line | Data |
---|---|---|
6f9d402e JB |
1 | # |
2 | # Conditional build: | |
46eb8e8d | 3 | %bcond_with tests # test target [pytest-runner doesn't support build-base] |
6f9d402e JB |
4 | %bcond_without python2 # CPython 2.x module |
5 | %bcond_without python3 # CPython 3.x module | |
6 | ||
7 | Summary: Python 2 classes and setuptools plugin for Mercurial and Git repositories | |
8 | Summary(pl.UTF-8): Klasy Pythona 2 oraz wtyczka setuptools do repozytoriów Mercurial oraz Git | |
6f9d402e | 9 | Name: python-hgtools |
46eb8e8d | 10 | Version: 6.5.1 |
53d72010 | 11 | Release: 7 |
6f9d402e JB |
12 | License: MIT |
13 | Group: Libraries/Python | |
46eb8e8d JB |
14 | #Source0Download: https://pypi.python.org/simple/hgtools/ |
15 | Source0: https://pypi.python.org/packages/source/h/hgtools/hgtools-%{version}.tar.gz | |
16 | # Source0-md5: ce8413687e43d5626cdcfee5024a9bc0 | |
6f9d402e | 17 | URL: https://bitbucket.org/jaraco/hgtools/ |
6f9d402e | 18 | BuildRequires: rpm-pythonprov |
46eb8e8d | 19 | BuildRequires: rpmbuild(macros) >= 1.714 |
6f9d402e | 20 | %if %{with python2} |
46eb8e8d JB |
21 | %{?with_tests:BuildRequires: python-backports.unittest_mock} |
22 | %{?with_tests:BuildRequires: python-pytest >= 2.8} | |
23 | %{?with_tests:BuildRequires: python-pytest-runner} | |
6f9d402e JB |
24 | BuildRequires: python-modules >= 1:2.6 |
25 | BuildRequires: python-setuptools | |
46eb8e8d | 26 | BuildRequires: python-setuptools_scm >= 1.9 |
6f9d402e JB |
27 | %endif |
28 | %if %{with python3} | |
46eb8e8d JB |
29 | %{?with_tests:BuildRequires: python3-backports.unittest_mock} |
30 | %{?with_tests:BuildRequires: python3-pytest >= 2.8} | |
31 | %{?with_tests:BuildRequires: python3-pytest-runner} | |
6f9d402e | 32 | BuildRequires: python3-setuptools |
46eb8e8d | 33 | BuildRequires: python3-setuptools_scm >= 1.9 |
6f9d402e JB |
34 | BuildRequires: python3-modules >= 1:3.2 |
35 | %endif | |
36 | Requires: python-modules >= 1:2.6 | |
37 | BuildArch: noarch | |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
39 | ||
40 | %description | |
41 | hgtools builds on the setuptools_hg plugin for setuptools. hgtools | |
42 | provides classes for inspecting and working with repositories in the | |
43 | Mercurial and Git version control systems (VCS). | |
44 | ||
45 | %description -l pl.UTF-8 | |
46 | hgtools dobudowuje wtyczkę setuptools_hg dla setuptools. Zapewnia | |
47 | klasy do przeglądania orazy pracy z repozytoriami systemów kontroli | |
48 | wersji (VCS) Mercurial oraz Git. | |
49 | ||
50 | %package -n python3-hgtools | |
51 | Summary: Python 3 classes and setuptools plugin for Mercurial and Git repositories | |
52 | Summary(pl.UTF-8): Klasy Pythona 3 oraz wtyczka setuptools do repozytoriów Mercurial oraz Git | |
53 | Group: Libraries/Python | |
46eb8e8d | 54 | Requires: python3-modules >= 1:3.2 |
6f9d402e JB |
55 | |
56 | %description -n python3-hgtools | |
57 | hgtools builds on the setuptools_hg plugin for setuptools. hgtools | |
58 | provides classes for inspecting and working with repositories in the | |
59 | Mercurial and Git version control systems (VCS). | |
60 | ||
61 | %description -n python3-hgtools -l pl.UTF-8 | |
62 | hgtools dobudowuje wtyczkę setuptools_hg dla setuptools. Zapewnia | |
63 | klasy do przeglądania orazy pracy z repozytoriami systemów kontroli | |
64 | wersji (VCS) Mercurial oraz Git. | |
65 | ||
66 | %prep | |
67 | %setup -q -n hgtools-%{version} | |
68 | ||
69 | %build | |
70 | %if %{with python2} | |
46eb8e8d | 71 | %py_build %{?with_tests:test} |
6f9d402e JB |
72 | %endif |
73 | ||
74 | %if %{with python3} | |
46eb8e8d | 75 | %py3_build %{?with_tests:test} |
6f9d402e JB |
76 | %endif |
77 | ||
78 | %install | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
81 | %if %{with python2} | |
b9fda368 | 82 | %py_install |
6f9d402e JB |
83 | |
84 | %py_postclean | |
85 | %endif | |
86 | ||
87 | %if %{with python3} | |
b9fda368 | 88 | %py3_install |
6f9d402e JB |
89 | %endif |
90 | ||
91 | %clean | |
92 | rm -rf $RPM_BUILD_ROOT | |
93 | ||
94 | %if %{with python2} | |
95 | %files | |
96 | %defattr(644,root,root,755) | |
46eb8e8d | 97 | %doc CHANGES.rst LICENSE README.rst |
6f9d402e JB |
98 | %{py_sitescriptdir}/hgtools |
99 | %{py_sitescriptdir}/hgtools-%{version}-py*.egg-info | |
100 | %endif | |
101 | ||
102 | %if %{with python3} | |
103 | %files -n python3-hgtools | |
104 | %defattr(644,root,root,755) | |
46eb8e8d | 105 | %doc CHANGES.rst LICENSE README.rst |
6f9d402e JB |
106 | %{py3_sitescriptdir}/hgtools |
107 | %{py3_sitescriptdir}/hgtools-%{version}-py*.egg-info | |
108 | %endif |