]> git.pld-linux.org Git - SPECS.git/blob - python-gitdb.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / python-gitdb.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_without  doc     # Sphinx documentation
6 %bcond_with     tests   # unit tests (needs git checkout, not archive?)
7
8 %define         module  gitdb
9 Summary:        GitDB - pure-Python git object database
10 Summary(pl.UTF-8):      GitDB - czysto pythonowa baza danych obiektów gita
11 Name:           python-%{module}
12 Version:        2.0.5
13 Release:        4
14 License:        BSD
15 Group:          Development/Languages/Python
16 #Source0Download: https://github.com/gitpython-developers/gitdb/releases
17 Source0:        https://github.com/gitpython-developers/gitdb/archive/%{version}/%{module}-%{version}.tar.gz
18 # Source0-md5:  d33484c57b9e4599d5540bf0e7906881
19 URL:            https://github.com/gitpython-developers/gitdb
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 BuildRequires:  python-setuptools
23 %if %{with tests}
24 BuildRequires:  python-smmap >= 2.0.0
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules >= 1:3.4
29 BuildRequires:  python3-setuptools
30 %if %{with tests}
31 BuildRequires:  python3-smmap >= 2.0.0
32 %endif
33 %endif
34 BuildRequires:  rpm-pythonprov
35 BuildRequires:  rpmbuild(macros) >= 1.714
36 %{?with_doc:BuildRequires:      sphinx-pdg}
37 Requires:       python-modules >= 1:2.7
38 BuildArch:      noarch
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %description
42 GitDB allows you to access bare git repositories for reading and
43 writing. It aims at allowing full access to loose objects as well as
44 packs with performance and scalability in mind. It operates
45 exclusively on streams, allowing to handle large objects with a small
46 memory footprint.
47
48 %description -l pl.UTF-8
49 GitDB pozwala na dostęp do gołych repozytoriów gita do odczytu i
50 zapisu. Celem jest umożliwienie pełnego dostępu do luźnych obiektów,
51 jak i paczek z myślą o wydajności i skalowalności. Operuje wyłącznie
52 na strumieniach, pozwalając na obsługę dużych obiektów przy niewielkim
53 narzucie czasu.
54
55 %package -n python3-%{module}
56 Summary:        GitDB - pure-Python git object database
57 Summary(pl.UTF-8):      GitDB - czysto pythonowa baza danych obiektów gita
58 Group:          Development/Languages/Python
59 Requires:       python3-modules >= 1:3.4
60
61 %description -n python3-%{module}
62 GitDB allows you to access bare git repositories for reading and
63 writing. It aims at allowing full access to loose objects as well as
64 packs with performance and scalability in mind. It operates
65 exclusively on streams, allowing to handle large objects with a small
66 memory footprint.
67
68 %description -n python3-%{module} -l pl.UTF-8
69 GitDB pozwala na dostęp do gołych repozytoriów gita do odczytu i
70 zapisu. Celem jest umożliwienie pełnego dostępu do luźnych obiektów,
71 jak i paczek z myślą o wydajności i skalowalności. Operuje wyłącznie
72 na strumieniach, pozwalając na obsługę dużych obiektów przy niewielkim
73 narzucie czasu.
74
75 %package apidocs
76 Summary:        API documentation for GitDB module
77 Summary(pl.UTF-8):      Dokumentacja API modułu GitDB
78 Group:          Documentation
79
80 %description apidocs
81 API documentation for GitDB module.
82
83 %description apidocs -l pl.UTF-8
84 Dokumentacja API modułu GitDB.
85
86 %prep
87 %setup -q -n %{module}-%{version}
88
89 %build
90 %if %{with python2}
91 %py_build %{?with_tests:test}
92 %endif
93
94 %if %{with python3}
95 %py3_build %{?with_tests:test}
96 %endif
97
98 %if %{with doc}
99 %{__make} -C doc html
100 %endif
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104
105 %if %{with python2}
106 %py_install
107
108 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/gitdb/test
109
110 %py_postclean
111 %endif
112
113 %if %{with python3}
114 %py3_install
115
116 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/gitdb/test
117 %endif
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %if %{with python2}
123 %files
124 %defattr(644,root,root,755)
125 %doc AUTHORS LICENSE README.rst
126 %dir %{py_sitescriptdir}/gitdb
127 %{py_sitescriptdir}/gitdb/*.py[co]
128 %{py_sitescriptdir}/gitdb/db
129 %{py_sitescriptdir}/gitdb/utils
130 %{py_sitescriptdir}/gitdb2-%{version}-py*.egg-info
131 %endif
132
133 %if %{with python3}
134 %files -n python3-%{module}
135 %defattr(644,root,root,755)
136 %doc AUTHORS LICENSE README.rst
137 %dir %{py3_sitescriptdir}/gitdb
138 %{py3_sitescriptdir}/gitdb/*.py
139 %{py3_sitescriptdir}/gitdb/db
140 %{py3_sitescriptdir}/gitdb/utils
141 %{py3_sitescriptdir}/gitdb/__pycache__
142 %{py3_sitescriptdir}/gitdb2-%{version}-py*.egg-info
143 %endif
144
145 %if %{with doc}
146 %files apidocs
147 %defattr(644,root,root,755)
148 %doc doc/build/html/{_static,*.html,*.js}
149 %endif
This page took 0.145411 seconds and 3 git commands to generate.