]>
Commit | Line | Data |
---|---|---|
d47f2ad8 JB |
1 | # |
2 | # Conditional build: | |
d47f2ad8 JB |
3 | %bcond_with tests # unit tests (require git checkout, not archive?) |
4 | %bcond_without doc # Sphinx documentation | |
5 | ||
404da54d | 6 | Summary: Python Git Library |
d47f2ad8 JB |
7 | Summary(pl.UTF-8): Biblioteka Git dla Pythona |
8 | Name: python-git | |
e2d49db2 JR |
9 | Version: 2.1.15 |
10 | Release: 1 | |
404da54d | 11 | License: BSD |
d47f2ad8 JB |
12 | Group: Development/Languages/Python |
13 | #Source0Download: https://github.com/gitpython-developers/GitPython/releases | |
ddbcfa81 | 14 | Source0: https://github.com/gitpython-developers/GitPython/archive/%{version}/GitPython-%{version}.tar.gz |
e2d49db2 | 15 | # Source0-md5: e6dfd0204f5b626f69ae904a2e392c91 |
d47f2ad8 | 16 | URL: https://pypi.org/project/GitPython/ |
d47f2ad8 | 17 | BuildRequires: python-modules >= 1:2.7 |
404da54d | 18 | BuildRequires: python-setuptools |
d47f2ad8 JB |
19 | %if %{with tests} |
20 | BuildRequires: python-ddt >= 1.1.1 | |
21 | BuildRequires: python-gitdb >= 2.0.0 | |
22 | %endif | |
e0a63ebd | 23 | BuildRequires: rpm-pythonprov |
d47f2ad8 JB |
24 | BuildRequires: rpmbuild(macros) >= 1.714 |
25 | %{?with_doc:BuildRequires: sphinx-pdg} | |
26 | Requires: python-modules >= 1:2.7 | |
404da54d ER |
27 | Obsoletes: GitPython |
28 | BuildArch: noarch | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
d47f2ad8 JB |
32 | GitPython is a Python library used to interact with git repositories, |
33 | high-level like git-porcelain, or low-level like git-plumbing. | |
34 | ||
35 | It provides abstractions of git objects for easy access of repository | |
36 | data, and additionally allows you to access the git repository more | |
37 | directly using either a pure Python implementation, or the faster, but | |
38 | more resource intensive git command implementation. | |
39 | ||
40 | %description -l pl.UTF-8 | |
41 | GitPython to biblioteka Pythona służąca do pracy z repozytoriami gita, | |
42 | wysokopoziomowo, jak git-porcelain lub niskopoziomowo, jak | |
43 | git-plumbing. | |
44 | ||
45 | Biblioteka udostępnia abstrakcje obiektów gita, zapewniając łatwy | |
46 | dostęp do danych repozytorium, a ponadto pozwala na dostęp do | |
47 | repozytorium bardziej bezpośrednio albo przy użyciu czysto pythonowej | |
48 | implementacji, albo szybciej, ale z większym zużyciem zasobów, przy | |
49 | użyciu implementacji poleceń gita. | |
404da54d | 50 | |
d47f2ad8 JB |
51 | %package apidocs |
52 | Summary: API documentation for GitPython library | |
53 | Summary(pl.UTF-8): Dokumentacja API biblioteki GitPython | |
54 | Group: Documentation | |
55 | ||
56 | %description apidocs | |
57 | API documentation for GitPython library. | |
58 | ||
59 | %description apidocs -l pl.UTF-8 | |
60 | Dokumentacja API biblioteki GitPython. | |
404da54d ER |
61 | |
62 | %prep | |
194eb70a | 63 | %setup -q -n GitPython-%{version} |
404da54d ER |
64 | |
65 | %build | |
d47f2ad8 | 66 | %py_build %{?with_tests:test} |
d47f2ad8 JB |
67 | |
68 | %if %{with doc} | |
69 | %{__make} -C doc html | |
70 | %endif | |
404da54d ER |
71 | |
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
d47f2ad8 | 74 | |
34c0214a | 75 | %py_install |
404da54d | 76 | |
d47f2ad8 JB |
77 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/git/test |
78 | ||
404da54d ER |
79 | %py_postclean |
80 | ||
81 | %clean | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %files | |
85 | %defattr(644,root,root,755) | |
d47f2ad8 | 86 | %doc AUTHORS CHANGES LICENSE README.md |
404da54d ER |
87 | %dir %{py_sitescriptdir}/git |
88 | %{py_sitescriptdir}/git/*.py[co] | |
d47f2ad8 JB |
89 | %{py_sitescriptdir}/git/index |
90 | %{py_sitescriptdir}/git/objects | |
91 | %{py_sitescriptdir}/git/refs | |
92 | %{py_sitescriptdir}/git/repo | |
93 | %{py_sitescriptdir}/GitPython-%{version}-py*.egg-info | |
d47f2ad8 JB |
94 | |
95 | %if %{with doc} | |
96 | %files apidocs | |
97 | %defattr(644,root,root,755) | |
98 | %doc doc/build/html/{_static,*.html,*.js} | |
404da54d | 99 | %endif |