]>
Commit | Line | Data |
---|---|---|
a62aac66 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # don't build doc | |
a1a3f60d | 4 | %bcond_with tests # do not perform "make test" |
a62aac66 JB |
5 | %bcond_without python2 # CPython 2.x module |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
8 | Summary: SPARQL Endpoint interface to Python 2 | |
9 | Summary(pl.UTF-8): Interfejs SPARQL Endpoint do Pythona 2 | |
10 | Name: python-SPARQLWrapper | |
a1a3f60d | 11 | Version: 1.8.4 |
22350449 | 12 | Release: 4 |
a62aac66 JB |
13 | License: W3C |
14 | Group: Libraries/Python | |
15 | #Source0Download: https://github.com/RDFLib/sparqlwrapper/releases | |
16 | Source0: https://github.com/RDFLib/sparqlwrapper/archive/%{version}/sparqlwrapper-%{version}.tar.gz | |
a1a3f60d | 17 | # Source0-md5: 177c10d032de0f37feb5108120c2bb5a |
a62aac66 JB |
18 | URL: https://rdflib.github.io/sparqlwrapper/ |
19 | %{?with_doc:BuildRequires: epydoc} | |
20 | BuildRequires: rpm-pythonprov | |
21 | # for the py_build, py_install macros | |
22 | BuildRequires: rpmbuild(macros) >= 1.714 | |
23 | %if %{with python2} | |
24 | BuildRequires: python-modules >= 1:2.5 | |
25 | BuildRequires: python-setuptools | |
26 | %if %{with tests} | |
5b9d94fa | 27 | BuildRequires: python-isodate |
a62aac66 | 28 | BuildRequires: python-keepalive >= 0.5 |
5b9d94fa | 29 | BuildRequires: python-rdflib >= 4.2.2 |
a62aac66 JB |
30 | %endif |
31 | %endif | |
32 | %if %{with python3} | |
33 | BuildRequires: python3-2to3 >= 1:3.2 | |
34 | BuildRequires: python3-modules >= 1:3.2 | |
35 | BuildRequires: python3-setuptools | |
36 | %if %{with tests} | |
5b9d94fa | 37 | BuildRequires: python3-isodate |
a62aac66 | 38 | BuildRequires: python3-keepalive >= 0.5 |
5b9d94fa | 39 | BuildRequires: python3-rdflib >= 4.2.2 |
a62aac66 JB |
40 | %endif |
41 | %endif | |
42 | Requires: python-modules >= 1:2.5 | |
43 | BuildArch: noarch | |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
45 | ||
46 | %description | |
47 | This is a wrapper around a SPARQL service. It helps in creating the | |
48 | query URI and, possibly, convert the result into a more manageable | |
49 | format. | |
50 | ||
51 | %description -l pl.UTF-8 | |
52 | Ten moduł to obudowanie usługi SPARQL, pomagające przy tworzeniu | |
53 | URI zapytania oraz ewentualnie konwertujące wynik do bardziej | |
54 | zarządzalnego formatu. | |
55 | ||
56 | %package -n python3-SPARQLWrapper | |
57 | Summary: SPARQL Endpoint interface to Python 3 | |
58 | Summary(pl.UTF-8): Interfejs SPARQL Endpoint do Pythona 3 | |
59 | Group: Libraries/Python | |
60 | Requires: python3-modules >= 1:3.2 | |
61 | ||
62 | %description -n python3-SPARQLWrapper | |
63 | This is a wrapper around a SPARQL service. It helps in creating the | |
64 | query URI and, possibly, convert the result into a more manageable | |
65 | format. | |
66 | ||
67 | %description -n python3-SPARQLWrapper -l pl.UTF-8 | |
68 | Ten moduł to obudowanie usługi SPARQL, pomagające przy tworzeniu | |
69 | URI zapytania oraz ewentualnie konwertujące wynik do bardziej | |
70 | zarządzalnego formatu. | |
71 | ||
72 | %package apidocs | |
73 | Summary: API documentation for SPARQLWrapper module | |
74 | Summary(pl.UTF-8): Dokumentacja API modułu SPARQLWrapper | |
75 | Group: Documentation | |
76 | ||
77 | %description apidocs | |
78 | API documentation for SPARQLWrapper module. | |
79 | ||
80 | %description apidocs -l pl.UTF-8 | |
81 | Dokumentacja API modułu SPARQLWrapper. | |
82 | ||
83 | %prep | |
84 | %setup -q -n sparqlwrapper-%{version} | |
85 | ||
86 | %build | |
87 | %if %{with python2} | |
88 | %py_build %{?with_tests:test} | |
89 | %endif | |
90 | ||
91 | %if %{with python3} | |
92 | %py3_build %{?with_tests:test} | |
93 | %endif | |
94 | ||
95 | %if %{with doc} | |
96 | %{__make} doc | |
97 | %endif | |
98 | ||
99 | %install | |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
102 | %if %{with python2} | |
103 | %py_install | |
104 | ||
105 | %py_postclean | |
106 | %endif | |
107 | ||
108 | %if %{with python3} | |
109 | %py3_install | |
110 | %endif | |
111 | ||
112 | %clean | |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
115 | %if %{with python2} | |
116 | %files | |
117 | %defattr(644,root,root,755) | |
118 | %doc AUTHORS.md ChangeLog.txt LICENSE.txt MANAGEMENT.md README.md | |
119 | %{py_sitescriptdir}/SPARQLWrapper | |
120 | %{py_sitescriptdir}/SPARQLWrapper-%{version}-py*.egg-info | |
121 | %endif | |
122 | ||
123 | %if %{with python3} | |
124 | %files -n python3-SPARQLWrapper | |
125 | %defattr(644,root,root,755) | |
126 | %doc AUTHORS.md ChangeLog.txt LICENSE.txt MANAGEMENT.md README.md | |
127 | %{py3_sitescriptdir}/SPARQLWrapper | |
128 | %{py3_sitescriptdir}/SPARQLWrapper-%{version}-py*.egg-info | |
129 | %endif | |
130 | ||
131 | %if %{with doc} | |
132 | %files apidocs | |
133 | %defattr(644,root,root,755) | |
134 | %doc doc/* | |
135 | %endif |