]> git.pld-linux.org Git - packages/python-PyGitUp.git/blame - python-PyGitUp.spec
rebuild with python 3.10
[packages/python-PyGitUp.git] / python-PyGitUp.spec
CommitLineData
06d5ad30
JR
1#
2# Conditional build:
6ec3f4ec
JB
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
7c720dc3 5%bcond_with tests # unit tests (need git configured for user)
06d5ad30
JR
6
7%define module PyGitUp
6ec3f4ec
JB
8Summary: git-up(1) - fetch and rebase all locally-tracked remote branches
9Summary(pl.UTF-8): git-up(1) - pobieranie i rebase wszystkich śledzonych lokalnie zdanych gałęzi
06d5ad30 10Name: python-%{module}
6ec3f4ec 11Version: 1.6.1
ad55a363 12Release: 7
6ec3f4ec 13License: MIT
06d5ad30 14Group: Libraries/Python
6ec3f4ec 15#Source0Download: https://github.com/msiemens/PyGitUp/releases
2e077a6f 16Source0: https://github.com/msiemens/PyGitUp/archive/v%{version}/%{module}-v%{version}.tar.gz
6ec3f4ec 17# Source0-md5: 8573a0c48aa0afa6dddae51d1cd204c1
710242d7 18Patch0: click-version.patch
615730f1 19URL: https://github.com/msiemens/PyGitUp
7c720dc3 20%{?with_tests:BuildRequires: git-core}
6ec3f4ec
JB
21%if %{with python2}
22BuildRequires: python-modules >= 1:2.7
23BuildRequires: python-setuptools
24%if %{with tests}
25BuildRequires: python-click >= 7.0
7f13615e 26BuildRequires: python-colorama >= 0.3.7
6ec3f4ec
JB
27BuildRequires: python-git >= 2.1.8
28BuildRequires: python-nose >= 1.3.7
7f13615e 29BuildRequires: python-six >= 1.10.0
5d7881fc 30BuildRequires: python-termcolor >= 1.1.0
6ec3f4ec
JB
31%endif
32%endif
33%if %{with python3}
34BuildRequires: python3-modules >= 1:3.4
35BuildRequires: python3-setuptools
36%if %{with tests}
37BuildRequires: python3-click >= 7.0
38BuildRequires: python3-colorama >= 0.3.7
39BuildRequires: python3-git >= 2.1.8
40BuildRequires: python3-nose >= 1.3.7
41BuildRequires: python3-six >= 1.10.0
42BuildRequires: python3-termcolor >= 1.1.0
43%endif
44%endif
45BuildRequires: rpm-pythonprov
46BuildRequires: rpmbuild(macros) >= 1.714
47Requires: python-modules >= 1:2.7
06d5ad30
JR
48BuildArch: noarch
49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51%description
6ec3f4ec
JB
52git-up(1) - fetch and rebase all locally-tracked remote branches.
53
54%description -l pl.UTF-8
55git-up(1) - pobieranie i rebase wszystkich śledzonych lokalnie zdanych
56gałęzi.
57
58%package -n python3-%{module}
59Summary: git-up(1) - fetch and rebase all locally-tracked remote branches
60Summary(pl.UTF-8): git-up(1) - pobieranie i rebase wszystkich śledzonych lokalnie zdanych gałęzi
61Group: Libraries/Python
62Requires: python3-modules >= 1:3.4
63
64%description -n python3-%{module}
65git-up(1) - fetch and rebase all locally-tracked remote branches.
66
67%description -n python3-%{module} -l pl.UTF-8
68git-up(1) - pobieranie i rebase wszystkich śledzonych lokalnie zdanych
69gałęzi.
06d5ad30
JR
70
71%prep
72%setup -q -n %{module}-%{version}
710242d7 73%patch0 -p1
06d5ad30
JR
74
75%build
6ec3f4ec 76%if %{with python2}
298e403c 77%py_build %{?with_tests:test}
6ec3f4ec
JB
78%endif
79
80%if %{with python3}
81%py3_build %{?with_tests:test}
82%endif
06d5ad30
JR
83
84%install
85rm -rf $RPM_BUILD_ROOT
86
6ec3f4ec 87%if %{with python2}
298e403c 88%py_install
06d5ad30 89
8c43a7cd
JR
90%{__mv} $RPM_BUILD_ROOT%{_bindir}/git-up{,-2}
91
06d5ad30
JR
92%py_postclean
93
6ec3f4ec
JB
94%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/PyGitUp/tests
95%endif
96
8c43a7cd
JR
97%if %{with python3}
98%py3_install
99
100%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/PyGitUp/tests
101%endif
102
06d5ad30
JR
103%clean
104rm -rf $RPM_BUILD_ROOT
105
6ec3f4ec 106%if %{with python2}
06d5ad30
JR
107%files
108%defattr(644,root,root,755)
6ec3f4ec 109%doc LICENCE README.rst
8c43a7cd 110%attr(755,root,root) %{_bindir}/git-up-2
6ec3f4ec
JB
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
8c43a7cd 121%attr(755,root,root) %{_bindir}/git-up
6ec3f4ec
JB
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
06d5ad30 127%endif
This page took 0.075391 seconds and 4 git commands to generate.