]> git.pld-linux.org Git - packages/python-shapely.git/blob - python-shapely.spec
2bdec97b2e7ca5bfafb80df8f4b8d41a431c6575
[packages/python-shapely.git] / python-shapely.spec
1 # TODO: Package examples to _examplesdir ?
2 #
3 # Conditional build:
4 %bcond_with     tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 %define         module  shapely
9 Summary:        Geospatial geometries, predicates, and operations for Python
10 Name:           python-%{module}
11 Version:        1.7.1
12 Release:        3
13 License:        BSD
14 Group:          Development/Languages/Python
15 Source0:        http://pypi.python.org/packages/source/S/Shapely/Shapely-%{version}.tar.gz
16 # Source0-md5:  2bf7bc1199b3a88b13c12109cd3d2429
17 URL:            http://pypi.python.org/pypi/Shapely
18 BuildRequires:  python-devel
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.710
21 Requires:       geos >= 3.1
22 Requires:       python-modules
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 Shapely is a Python package for manipulation and analysis of 2D
27 geospatial geometries. It is based on GEOS. Shapely is not concerned
28 with data formats or coordinate reference systems.
29
30 %description -l pl.UTF-8
31 Pakiet do manipulacji i anlizy duwymiarowych geoptrzestrzennych
32 geometrii. Bazuje na GEOS, nie zajmuje się formatami danych czy
33 układami odniesnienia danych.
34
35 %package -n python3-%{module}
36 Summary:        Geospatial geometries, predicates, and operations for Python
37 Group:          Libraries/Python
38 Requires:       python3-modules
39
40 %description -n python3-%{module}
41 Shapely is a Python package for manipulation and analysis of 2D
42 geospatial geometries. It is based on GEOS. Shapely is not concerned
43 with data formats or coordinate reference systems.
44
45 %description -n python3-%{module} -l pl.UTF-8
46 Pakiet do manipulacji i anlizy duwymiarowych geoptrzestrzennych
47 geometrii. Bazuje na GEOS, nie zajmuje się formatami danych czy
48 układami odniesnienia danych.
49
50 %prep
51 %setup -q -n Shapely-%{version}
52
53 %build
54 %if %{with python2}
55 %py_build %{?with_tests:test}
56 %endif
57
58 %if %{with python3}
59 %py3_build %{?with_tests:test}
60 %endif
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64
65 %if %{with python2}
66 %py_install
67
68 # when files are installed in other way that standard 'setup.py
69 # they need to be (re-)compiled
70 # change %{py_sitedir} to %{py_sitescriptdir} for 'noarch' packages!
71 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
72 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
73
74 %py_postclean
75 %endif
76
77 %if %{with python3}
78 %py3_install
79 %endif
80
81 #%if %{with python2}
82 #install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version}
83 #cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version}
84 #find $RPM_BUILD_ROOT%{_examplesdir}/python-%{pypi_name}-%{version} -name '*.py' \
85 #       | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
86 #%endif
87 #%if %{with python3}
88 #install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version}
89 #cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version}
90 #find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{pypi_name}-%{version} -name '*.py' \
91 #       | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
92 #%endif
93
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98 %if %{with python2}
99 %files
100 %defattr(644,root,root,755)
101 # %doc CHANGES.txt CREDITS.txt HISTORY.txt README.txt
102 %dir %{py_sitedir}/%{module}
103 # %{py_sitescriptdir}/%{module}/ctypes_declarations.py
104 %{py_sitedir}/%{module}/*.py[co]
105
106 %dir %{py_sitedir}/%{module}/algorithms
107 %{py_sitedir}/%{module}/algorithms/*.py[co]
108 %dir %{py_sitedir}/%{module}/examples
109 %{py_sitedir}/%{module}/examples/*.py[co]
110 %dir %{py_sitedir}/%{module}/geometry
111 %{py_sitedir}/%{module}/geometry/*.py[co]
112 %dir %{py_sitedir}/%{module}/speedups
113 %attr(755,root,root) %{py_sitedir}/%{module}/speedups/*.so
114 %{py_sitedir}/%{module}/speedups/*.py[co]
115 %dir %{py_sitedir}/%{module}/vectorized
116 %attr(755,root,root) %{py_sitedir}/%{module}/vectorized/*.so
117 %{py_sitedir}/%{module}/vectorized/*.py[co]
118 %{py_sitedir}/Shapely-*.egg-info
119 %endif
120
121 %if %{with python3}
122 %files -n python3-%{module}
123 %defattr(644,root,root,755)
124 %dir %{py3_sitedir}/%{module}
125 %{py3_sitedir}/%{module}/__pycache__
126 # %{py_sitescriptdir}/%{module}/ctypes_declarations.py
127 %{py3_sitedir}/%{module}/*.py
128
129 %dir %{py3_sitedir}/%{module}/algorithms
130 %{py3_sitedir}/%{module}/algorithms/__pycache__
131 %{py3_sitedir}/%{module}/algorithms/*.py
132 %dir %{py3_sitedir}/%{module}/examples
133 %{py3_sitedir}/%{module}/examples/__pycache__
134 %{py3_sitedir}/%{module}/examples/*.py
135 %dir %{py3_sitedir}/%{module}/geometry
136 %{py3_sitedir}/%{module}/geometry/__pycache__
137 %{py3_sitedir}/%{module}/geometry/*.py
138 %dir %{py3_sitedir}/%{module}/speedups
139 %{py3_sitedir}/%{module}/speedups/__pycache__
140 %attr(755,root,root) %{py3_sitedir}/%{module}/speedups/*.so
141 %{py3_sitedir}/%{module}/speedups/*.py
142 %dir %{py3_sitedir}/%{module}/vectorized
143 %{py3_sitedir}/%{module}/vectorized/__pycache__
144 %attr(755,root,root) %{py3_sitedir}/%{module}/vectorized/*.so
145 %{py3_sitedir}/%{module}/vectorized/*.py
146 %{py3_sitedir}/Shapely-*.egg-info
147 %endif
This page took 0.063642 seconds and 2 git commands to generate.