]>
Commit | Line | Data |
---|---|---|
8b40fbdb | 1 | # |
50523346 JK |
2 | # Conditional build: |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
96e3afe2 | 6 | %define module rdflib |
bab78db9 | 7 | |
8b40fbdb JB |
8 | Summary: Python 2 library for working with RDF |
9 | Summary(pl.UTF-8): Biblioteka Pythona 2 do pracy z RDF | |
96e3afe2 | 10 | Name: python-%{module} |
b390c5ff | 11 | Version: 4.2.2 |
ecbc7eba | 12 | Release: 7 |
00b3cd2a | 13 | License: BSD |
bab78db9 | 14 | Group: Development/Languages/Python |
50523346 | 15 | Source0: https://github.com/RDFLib/rdflib/archive/%{version}/%{module}-%{version}.tar.gz |
b390c5ff | 16 | # Source0-md5: 1dd95c6443302d6a44a908e4af8fdc5d |
50523346 | 17 | URL: https://github.com/RDFLib/rdflib |
c100659f | 18 | BuildRequires: rpm-pythonprov |
50523346 JK |
19 | BuildRequires: rpmbuild(macros) >= 1.714 |
20 | %if %{with python2} | |
8b40fbdb | 21 | BuildRequires: python-modules >= 1:2.6 |
50523346 JK |
22 | BuildRequires: python-setuptools |
23 | %endif | |
24 | %if %{with python3} | |
8b40fbdb | 25 | BuildRequires: python3-modules >= 1:3.3 |
50523346 JK |
26 | BuildRequires: python3-setuptools |
27 | %endif | |
8b40fbdb | 28 | Requires: python-modules >= 1:2.6 |
96e3afe2 | 29 | BuildArch: noarch |
bab78db9 | 30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %description | |
33 | RDFLib is a Python library for working with RDF, a simple yet powerful | |
34 | language for representing information. The library contains an RDF/XML | |
3324f7d4 | 35 | parser/serializer, a TripleStore, an InformationStore and various |
36 | store backends. It is being developed by Daniel Krech along with the | |
37 | help of a number of contributors. | |
bab78db9 | 38 | |
64048599 JR |
39 | %description -l pl.UTF-8 |
40 | RDFLib to biblioteka Pythona do pracy z RDF - prostym, ale potężnym | |
41 | językiem do reprezentowania informacji. Biblioteka zawiera | |
42 | parser/serializer RDF/XML, TripleStore, InformationStore oraz różne | |
00b3cd2a | 43 | backendy do przechowywania informacji. Jest rozwijana przez Daniela |
64048599 | 44 | Krecha z pomocą wielu współpracowników. |
bab78db9 | 45 | |
50523346 | 46 | %package -n python3-%{module} |
8b40fbdb JB |
47 | Summary: Python 3 library for working with RDF |
48 | Summary(pl.UTF-8): Biblioteka Pythona 3 do pracy z RDF | |
50523346 | 49 | Group: Libraries/Python |
8b40fbdb | 50 | Requires: python3-modules >= 1:3.3 |
50523346 JK |
51 | |
52 | %description -n python3-%{module} | |
53 | RDFLib is a Python library for working with RDF, a simple yet powerful | |
54 | language for representing information. The library contains an RDF/XML | |
55 | parser/serializer, a TripleStore, an InformationStore and various | |
56 | store backends. It is being developed by Daniel Krech along with the | |
57 | help of a number of contributors. | |
58 | ||
59 | %description -n python3-%{module} -l pl.UTF-8 | |
60 | RDFLib to biblioteka Pythona do pracy z RDF - prostym, ale potężnym | |
61 | językiem do reprezentowania informacji. Biblioteka zawiera | |
62 | parser/serializer RDF/XML, TripleStore, InformationStore oraz różne | |
63 | backendy do przechowywania informacji. Jest rozwijana przez Daniela | |
64 | Krecha z pomocą wielu współpracowników. | |
65 | ||
66 | %package -n rdflib-tools | |
67 | Summary: Utilities from python-rdflib | |
8b40fbdb JB |
68 | Summary(pl.UTF-8): Narzędzia z pakietu python-rdflib |
69 | Group: Applications/File | |
50523346 | 70 | %if %{with python3} |
8b40fbdb | 71 | Requires: python3-%{module} = %{version}-%{release} |
50523346 | 72 | %else |
8b40fbdb | 73 | Requires: %{name} = %{version}-%{release} |
50523346 JK |
74 | %endif |
75 | ||
76 | %description -n rdflib-tools | |
77 | Utilities from python-rdflib. | |
78 | ||
8b40fbdb JB |
79 | %description -n rdflib-tools -l pl.UTF-8 |
80 | Narzędzia z pakietu python-rdflib. | |
81 | ||
bab78db9 | 82 | %prep |
96e3afe2 | 83 | %setup -q -n %{module}-%{version} |
bab78db9 | 84 | |
85 | %build | |
50523346 JK |
86 | %if %{with python2} |
87 | %py_build %{?with_tests:test} | |
88 | %endif | |
89 | ||
90 | %if %{with python3} | |
91 | %py3_build %{?with_tests:test} | |
92 | %endif | |
bab78db9 | 93 | |
94 | %install | |
95 | rm -rf $RPM_BUILD_ROOT | |
00b3cd2a | 96 | |
50523346 | 97 | %if %{with python2} |
f634e655 | 98 | %py_install |
00b3cd2a | 99 | |
285e18c6 | 100 | %py_postclean |
8b40fbdb JB |
101 | |
102 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
103 | cp -p examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
50523346 JK |
104 | %endif |
105 | ||
106 | %if %{with python3} | |
107 | %py3_install | |
8b40fbdb JB |
108 | |
109 | install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} | |
110 | cp -p examples/*.py $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} | |
50523346 | 111 | %endif |
bab78db9 | 112 | |
113 | %clean | |
114 | rm -rf $RPM_BUILD_ROOT | |
115 | ||
116 | %files | |
117 | %defattr(644,root,root,755) | |
8b40fbdb | 118 | %doc CHANGELOG.md CONTRIBUTORS LICENSE README.md |
285e18c6 | 119 | %{py_sitescriptdir}/rdflib |
8b40fbdb JB |
120 | %{py_sitescriptdir}/rdflib-%{version}-py*.egg-info |
121 | %{_examplesdir}/%{name}-%{version} | |
50523346 JK |
122 | |
123 | %files -n python3-%{module} | |
124 | %defattr(644,root,root,755) | |
8b40fbdb | 125 | %doc CHANGELOG.md CONTRIBUTORS LICENSE README.md |
50523346 | 126 | %{py3_sitescriptdir}/rdflib |
8b40fbdb JB |
127 | %{py3_sitescriptdir}/rdflib-%{version}-py*.egg-info |
128 | %{_examplesdir}/python3-%{module}-%{version} | |
50523346 JK |
129 | |
130 | %files -n rdflib-tools | |
131 | %defattr(644,root,root,755) | |
8b40fbdb JB |
132 | %attr(755,root,root) %{_bindir}/csv2rdf |
133 | %attr(755,root,root) %{_bindir}/rdf2dot | |
134 | %attr(755,root,root) %{_bindir}/rdfgraphisomorphism | |
135 | %attr(755,root,root) %{_bindir}/rdfpipe | |
136 | %attr(755,root,root) %{_bindir}/rdfs2dot |