]> git.pld-linux.org Git - packages/python-PyGitUp.git/blob - python-PyGitUp.spec
2b3bd2a41aa2c893e8d39c0430c9db858eafcc2a
[packages/python-PyGitUp.git] / python-PyGitUp.spec
1 #
2 # Conditional build:
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)
6
7 %define         module  PyGitUp
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}
11 Version:        1.6.1
12 Release:        6
13 License:        MIT
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}
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.7
23 BuildRequires:  python-setuptools
24 %if %{with tests}
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
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-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
43 %endif
44 %endif
45 BuildRequires:  rpm-pythonprov
46 BuildRequires:  rpmbuild(macros) >= 1.714
47 Requires:       python-modules >= 1:2.7
48 BuildArch:      noarch
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 git-up(1) - fetch and rebase all locally-tracked remote branches.
53
54 %description -l pl.UTF-8
55 git-up(1) - pobieranie i rebase wszystkich śledzonych lokalnie zdanych
56 gałęzi.
57
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
63
64 %description -n python3-%{module}
65 git-up(1) - fetch and rebase all locally-tracked remote branches.
66
67 %description -n python3-%{module} -l pl.UTF-8
68 git-up(1) - pobieranie i rebase wszystkich śledzonych lokalnie zdanych
69 gałęzi.
70
71 %prep
72 %setup -q -n %{module}-%{version}
73 %patch0 -p1
74
75 %build
76 %if %{with python2}
77 %py_build %{?with_tests:test}
78 %endif
79
80 %if %{with python3}
81 %py3_build %{?with_tests:test}
82 %endif
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86
87 %if %{with python2}
88 %py_install
89
90 %{__mv} $RPM_BUILD_ROOT%{_bindir}/git-up{,-2}
91
92 %py_postclean
93
94 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/PyGitUp/tests
95 %endif
96
97 %if %{with python3}
98 %py3_install
99
100 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/PyGitUp/tests
101 %endif
102
103 %clean
104 rm -rf $RPM_BUILD_ROOT
105
106 %if %{with python2}
107 %files
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
115 %endif
116
117 %if %{with python3}
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
127 %endif
This page took 0.085668 seconds and 2 git commands to generate.