]>
Commit | Line | Data |
---|---|---|
7d09d443 MK |
1 | # Conditional build: |
2 | %bcond_with doc # don't build doc | |
3 | %bcond_with tests # do not perform "make test" | |
4 | %bcond_without python2 # CPython 2.x module | |
5 | %bcond_without python3 # CPython 3.x module | |
6 | ||
4e9f3ba5 AM |
7 | %define module geopy |
8 | Summary: A Geocoding Toolbox for Python | |
9 | Name: python-%{module} | |
98b84bca JP |
10 | Version: 1.23.0 |
11 | Release: 1 | |
4e9f3ba5 AM |
12 | License: MIT |
13 | Group: Development/Languages/Python | |
b34bfc80 | 14 | Source0: https://pypi.python.org/packages/source/g/geopy/geopy-%{version}.tar.gz |
98b84bca | 15 | # Source0-md5: e8b7d678665fab26ce3e8ff97f352ee8 |
b34bfc80 | 16 | URL: https://pypi.python.org/pypi/geopy |
8e675dbd | 17 | BuildRequires: rpmbuild(macros) >= 1.710 |
7d09d443 MK |
18 | |
19 | %if %{with python2} | |
20 | ## BuildRequires: pylint | |
4e9f3ba5 | 21 | BuildRequires: python-devel |
568c3ec1 | 22 | BuildRequires: python-setuptools |
7d09d443 MK |
23 | %endif |
24 | %if %{with python3} | |
25 | ## BuildRequires: pylint-python3 | |
26 | BuildRequires: python3-devel | |
27 | BuildRequires: python3-distribute | |
28 | BuildRequires: python3-modules | |
29 | %endif | |
30 | ||
4e9f3ba5 AM |
31 | BuildArch: noarch |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
35 | geopy makes it easy for developers to locate the coordinates of | |
36 | addresses, cities, countries, and landmarks across the globe using | |
37 | third-party geocoders and other data sources, such as wikis. | |
38 | ||
39 | geopy currently includes support for six geocoders: Google Maps, | |
40 | Yahoo! Maps, Windows Local Live (Virtual Earth), geocoder.us, | |
41 | GeoNames, MediaWiki pages (with the GIS extension), and Semantic | |
42 | MediaWiki pages. | |
43 | ||
7d09d443 MK |
44 | |
45 | %package -n python3-%{module} | |
46 | Summary: - | |
47 | Summary(pl.UTF-8): - | |
48 | Group: Libraries/Python | |
49 | Requires: python3-modules | |
50 | ||
51 | %description -n python3-%{module} | |
52 | geopy makes it easy for developers to locate the coordinates of | |
53 | addresses, cities, countries, and landmarks across the globe using | |
54 | third-party geocoders and other data sources, such as wikis. | |
55 | ||
56 | geopy currently includes support for six geocoders: Google Maps, | |
57 | Yahoo! Maps, Windows Local Live (Virtual Earth), geocoder.us, | |
58 | GeoNames, MediaWiki pages (with the GIS extension), and Semantic | |
59 | MediaWiki pages. | |
60 | ||
61 | ## %description -n python3-%{module} -l pl.UTF-8 | |
62 | ||
63 | %package apidocs | |
64 | Summary: %{module} API documentation | |
65 | Summary(pl.UTF-8): Dokumentacja API %{module} | |
66 | Group: Documentation | |
67 | ||
68 | %description apidocs | |
69 | API documentation for %{module}. | |
70 | ||
71 | %description apidocs -l pl.UTF-8 | |
72 | Dokumentacja API %{module}. | |
73 | ||
4e9f3ba5 AM |
74 | %prep |
75 | %setup -q -n %{module}-%{version} | |
76 | ||
77 | %build | |
7d09d443 | 78 | %if %{with python2} |
178ae869 | 79 | %py_build %{?with_tests:test} |
7d09d443 MK |
80 | %endif |
81 | ||
82 | %if %{with python3} | |
178ae869 | 83 | %py3_build %{?with_tests:test} |
7d09d443 MK |
84 | %endif |
85 | ||
86 | %if %{with doc} | |
87 | cd docs | |
88 | %{__make} -j1 html | |
89 | rm -rf _build/html/_sources | |
90 | %endif | |
91 | ||
4e9f3ba5 AM |
92 | |
93 | %install | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
7d09d443 | 96 | %if %{with python2} |
178ae869 | 97 | %py_install |
4e9f3ba5 | 98 | |
4e9f3ba5 | 99 | %py_postclean |
7d09d443 MK |
100 | %endif |
101 | ||
102 | %if %{with python3} | |
178ae869 | 103 | %py3_install |
7d09d443 MK |
104 | %endif |
105 | ||
4e9f3ba5 AM |
106 | |
107 | %clean | |
108 | rm -rf $RPM_BUILD_ROOT | |
109 | ||
110 | %files | |
111 | %defattr(644,root,root,755) | |
7d09d443 MK |
112 | %dir %{py_sitescriptdir}/%{module} |
113 | %{py_sitescriptdir}/%{module}/*.py[co] | |
114 | %dir %{py_sitescriptdir}/%{module}/geocoders | |
115 | %{py_sitescriptdir}/%{module}/geocoders/*.py[co] | |
4e9f3ba5 | 116 | %if "%{py_ver}" > "2.4" |
7d09d443 | 117 | %{py_sitescriptdir}/%{module}-*.egg-info |
4e9f3ba5 | 118 | %endif |
7d09d443 MK |
119 | |
120 | %if %{with python3} | |
121 | %files -n python3-%{module} | |
122 | %defattr(644,root,root,755) | |
123 | ## %doc AUTHORS CHANGES LICENSE | |
124 | %{py3_sitescriptdir}/%{module} | |
125 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
126 | %endif | |
127 |