]> git.pld-linux.org Git - packages/python-geopy.git/blob - python-geopy.spec
7b4ee8fb5f9f6745a3d05cb8e649181a4c98bedb
[packages/python-geopy.git] / python-geopy.spec
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
7 %define         module  geopy
8 Summary:        A Geocoding Toolbox for Python
9 Name:           python-%{module}
10 Version:        1.11.0
11 Release:        3
12 License:        MIT
13 Group:          Development/Languages/Python
14 Source0:        https://pypi.python.org/packages/source/g/geopy/geopy-%{version}.tar.gz
15 # Source0-md5:  b73445dc0069550bbd2b09162f7339b3
16 URL:            https://pypi.python.org/pypi/geopy
17 BuildRequires:  rpmbuild(macros) >= 1.710
18
19 %if %{with python2}
20 ## BuildRequires:       pylint
21 BuildRequires:  python-devel
22 BuildRequires:  python-setuptools
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
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
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
74 %prep
75 %setup -q -n %{module}-%{version}
76
77 %build
78 %if %{with python2}
79 %py_build %{?with_tests:test}
80 %endif
81
82 %if %{with python3}
83 %py3_build %{?with_tests:test}
84 %endif
85
86 %if %{with doc}
87 cd docs
88 %{__make} -j1 html
89 rm -rf _build/html/_sources
90 %endif
91
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95
96 %if %{with python2}
97 %py_install
98
99 %py_postclean
100 %endif
101
102 %if %{with python3}
103 %py3_install
104 %endif
105
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %files
111 %defattr(644,root,root,755)
112 %dir %{py_sitescriptdir}/%{module}
113 %{py_sitescriptdir}/%{module}/*.py[co]
114 %dir %{py_sitescriptdir}/%{module}/geocoders
115 %{py_sitescriptdir}/%{module}/geocoders/*.py[co]
116 %if "%{py_ver}" > "2.4"
117 %{py_sitescriptdir}/%{module}-*.egg-info
118 %endif
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
This page took 0.055529 seconds and 2 git commands to generate.