3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
5 %bcond_with tests # unit tests (need git configured for user)
8 Summary: git-up(1) - fetch and rebase all locally-tracked remote branches
9 Summary(pl.UTF-8): git-up(1) - pobieranie i rebase wszystkich śledzonych lokalnie zdanych gałęzi
10 Name: python-%{module}
14 Group: Libraries/Python
15 #Source0Download: https://github.com/msiemens/PyGitUp/releases
16 Source0: https://github.com/msiemens/PyGitUp/archive/v%{version}/%{module}-v%{version}.tar.gz
17 # Source0-md5: 8573a0c48aa0afa6dddae51d1cd204c1
18 Patch0: click-version.patch
19 URL: https://github.com/msiemens/PyGitUp
20 %{?with_tests:BuildRequires: git-core}
22 BuildRequires: python-modules >= 1:2.7
23 BuildRequires: python-setuptools
25 BuildRequires: python-click >= 7.0
26 BuildRequires: python-colorama >= 0.3.7
27 BuildRequires: python-git >= 2.1.8
28 BuildRequires: python-nose >= 1.3.7
29 BuildRequires: python-six >= 1.10.0
30 BuildRequires: python-termcolor >= 1.1.0
34 BuildRequires: python3-modules >= 1:3.4
35 BuildRequires: python3-setuptools
37 BuildRequires: python3-click >= 7.0
38 BuildRequires: python3-colorama >= 0.3.7
39 BuildRequires: python3-git >= 2.1.8
40 BuildRequires: python3-nose >= 1.3.7
41 BuildRequires: python3-six >= 1.10.0
42 BuildRequires: python3-termcolor >= 1.1.0
45 BuildRequires: rpm-pythonprov
46 BuildRequires: rpmbuild(macros) >= 1.714
47 Requires: python-modules >= 1:2.7
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 git-up(1) - fetch and rebase all locally-tracked remote branches.
54 %description -l pl.UTF-8
55 git-up(1) - pobieranie i rebase wszystkich śledzonych lokalnie zdanych
58 %package -n python3-%{module}
59 Summary: git-up(1) - fetch and rebase all locally-tracked remote branches
60 Summary(pl.UTF-8): git-up(1) - pobieranie i rebase wszystkich śledzonych lokalnie zdanych gałęzi
61 Group: Libraries/Python
62 Requires: python3-modules >= 1:3.4
64 %description -n python3-%{module}
65 git-up(1) - fetch and rebase all locally-tracked remote branches.
67 %description -n python3-%{module} -l pl.UTF-8
68 git-up(1) - pobieranie i rebase wszystkich śledzonych lokalnie zdanych
72 %setup -q -n %{module}-%{version}
77 %py_build %{?with_tests:test}
81 %py3_build %{?with_tests:test}
85 rm -rf $RPM_BUILD_ROOT
90 %{__mv} $RPM_BUILD_ROOT%{_bindir}/git-up{,-2}
94 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/PyGitUp/tests
100 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/PyGitUp/tests
104 rm -rf $RPM_BUILD_ROOT
108 %defattr(644,root,root,755)
109 %doc LICENCE README.rst
110 %attr(755,root,root) %{_bindir}/git-up-2
111 %dir %{py_sitescriptdir}/PyGitUp
112 %{py_sitescriptdir}/PyGitUp/*.py[co]
113 %{py_sitescriptdir}/PyGitUp/check-bundler.rb
114 %{py_sitescriptdir}/git_up-%{version}-py*.egg-info
118 %files -n python3-%{module}
119 %defattr(644,root,root,755)
120 %doc LICENCE README.rst
121 %attr(755,root,root) %{_bindir}/git-up
122 %dir %{py3_sitescriptdir}/PyGitUp
123 %{py3_sitescriptdir}/PyGitUp/*.py
124 %{py3_sitescriptdir}/PyGitUp/__pycache__
125 %{py3_sitescriptdir}/PyGitUp/check-bundler.rb
126 %{py3_sitescriptdir}/git_up-%{version}-py*.egg-info