]> git.pld-linux.org Git - packages/python-maxminddb.git/blame - python-maxminddb.spec
- release 9 (by relup.sh)
[packages/python-maxminddb.git] / python-maxminddb.spec
CommitLineData
d11597d7
AM
1#
2# Conditional build:
3%bcond_without doc # don't build doc
4%bcond_with tests # do not perform "make test"
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8%define module maxminddb
9Summary: Python extension for reading the MaxMind DB format
10Name: python-%{module}
11Version: 1.1.1
9f910188 12Release: 9
d11597d7
AM
13License: APL
14Group: Libraries/Python
15Source0: https://pypi.python.org/packages/source/m/maxminddb/maxminddb-%{version}.tar.gz
16# Source0-md5: 70a6d2a4b70f08e5b509fbb83f239795
17URL: https://pypi.python.org/pypi/maxminddb
cc558049 18BuildRequires: libmaxminddb-devel
d11597d7 19BuildRequires: rpm-pythonprov
5d71afa8 20BuildRequires: rpmbuild(macros) >= 1.710
d11597d7
AM
21%if %{with python2}
22BuildRequires: python-devel
23BuildRequires: python-distribute
24%endif
25%if %{with python3}
26BuildRequires: python3-devel
27BuildRequires: python3-distribute
28BuildRequires: python3-modules
29%endif
30Requires: python-ipaddr
31Requires: python-modules
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35This is a Python module for reading MaxMind DB files.
36
37MaxMind DB is a binary file format that stores data indexed by IP
38address subnets (IPv4 or IPv6).
39
40%package -n python3-%{module}
41Summary: Python extension for reading the MaxMind DB format
42Group: Libraries/Python
43Requires: python3-modules
44
45%description -n python3-%{module}
46This is a Python module for reading MaxMind DB files.
47
48MaxMind DB is a binary file format that stores data indexed by IP
49address subnets (IPv4 or IPv6).
50
51%package apidocs
52Summary: %{module} API documentation
53Summary(pl.UTF-8): Dokumentacja API %{module}
54Group: Documentation
ef558b1b 55BuildArch: noarch
d11597d7
AM
56
57%description apidocs
58API documentation for %{module}.
59
60%description apidocs -l pl.UTF-8
61Dokumentacja API %{module}.
62
63%prep
64%setup -q -n %{module}-%{version}
65
66%build
67%if %{with python2}
68CC="%{__cc}" \
69CFLAGS="%{rpmcppflags} %{rpmcflags}" \
d23282ad 70%py_build %{?with_tests:test}
d11597d7
AM
71%endif
72
73%if %{with python3}
74CC="%{__cc}" \
75CFLAGS="%{rpmcppflags} %{rpmcflags}" \
d23282ad 76%py3_build %{?with_tests:test}
d11597d7
AM
77%endif
78
79%if %{with doc}
80cd docs
81%{__make} -j1 html
82rm -rf _build/html/_sources
83%endif
84
85%install
86rm -rf $RPM_BUILD_ROOT
87
88%if %{with python2}
d23282ad 89%py_install
d11597d7
AM
90
91%py_postclean
92%endif
93
94%if %{with python3}
d23282ad 95%py3_install
d11597d7
AM
96%endif
97
98%clean
99rm -rf $RPM_BUILD_ROOT
100
101%if %{with python2}
102%files
103%defattr(644,root,root,755)
104%doc HISTORY.rst README.rst
105%dir %{py_sitedir}/maxminddb
106%{py_sitedir}/maxminddb/*.py[co]
107%attr(755,root,root) %{py_sitedir}/maxminddb/*.so
108%if "%{py_ver}" > "2.4"
109%{py_sitedir}/%{module}-%{version}-py*.egg-info
110%endif
111%endif
112
113%if %{with python3}
114%files -n python3-%{module}
115%defattr(644,root,root,755)
116%doc HISTORY.rst README.rst
117%{py3_sitedir}/%{module}
118%{py3_sitedir}/%{module}-%{version}-py*.egg-info
119%endif
120
121%if %{with doc}
122%files apidocs
123%defattr(644,root,root,755)
124%doc docs/html/*
125%endif
This page took 0.034331 seconds and 4 git commands to generate.