41deeb1
bcb10b5
# avoid providing the private libs:
bcb10b5
%if 0%{?fedora} || 0%{?rhel} >= 7
646a50e
646a50e
%global __provides_exclude_from ^(%{python3_sitearch})/.*\\.so.*$
646a50e
646a50e
bcb10b5
%else
646a50e
# only for rhel 6 or before
bcb10b5
%{?filter_setup:
bcb10b5
%filter_provides_in %{python2_sitearch}.*\.so$
bcb10b5
%filter_setup
bcb10b5
}
bcb10b5
%endif
bcb10b5
bcb10b5
41deeb1
Name:           pyproj
646a50e
Version:        1.9.6
63f3afd
Release:        2%{?dist}
41deeb1
Summary:        Cython wrapper to provide python interfaces to Proj
41deeb1
41deeb1
License:        MIT
ff7206e
URL:            https://github.com/jswhit/%{name}
ff7206e
Source0:        https://pypi.python.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
8688e98
# the old source url still works, but if need be it can be replaced
8688e98
# with: https://files.pythonhosted.org/packages/source/p/%%{name}/%%{name}-%%{version}.tar.gz
41deeb1
8688e98
BuildRequires:  gcc
ff7206e
BuildRequires:  proj-devel
c806a2a
bf51713
# needed to remove the hardcoded path '/usr/lib' from the _proj.so file
6e2e453
BuildRequires: chrpath
41deeb1
bf51713
# these 2 are needed during the tests run in the check section
bf51713
BuildRequires:  proj-nad
bf51713
BuildRequires:  proj-epsg
bf51713
6fd5b99
%global _description \
6fd5b99
Cython wrapper to provide python interfaces to Proj. \
6fd5b99
Performs cartographic transformations between geographic (Lat/Lon) \
6fd5b99
and map projection (x/y) coordinates. Can also transform directly \
6fd5b99
from one map projection coordinate system to another. \
6fd5b99
Coordinates can be given as numpy arrays, python arrays, lists or scalars. \
41deeb1
Optimized for numpy arrays.
41deeb1
6fd5b99
%description %_description
6fd5b99
6fd5b99
41deeb1
%package -n python3-%{name}
41deeb1
6fd5b99
Summary: %summary
41deeb1
c806a2a
BuildRequires:  python3-devel
c806a2a
BuildRequires:  python3-numpy
c806a2a
BuildRequires:  python3-Cython
646a50e
# needed during unittesting
646a50e
BuildRequires:  python3-nose2
646a50e
#?? BuildRequires:  python3-mock
c806a2a
8688e98
# these 2 packages are arch independent and contain only data files
c806a2a
Requires:  proj-nad
c806a2a
Requires:  proj-epsg
c806a2a
6fd5b99
# ensure python provides are provided when python3 becomes the default runtime
6fd5b99
%{?python_provide:%python_provide python3-%{name}}
6fd5b99
6fd5b99
%description -n python3-%{name} %_description
41deeb1
41deeb1
41deeb1
%prep
41deeb1
%setup -q
41deeb1
41deeb1
# Delete proj sources, Cython generated file and proj data
41deeb1
rm -rf src
41deeb1
rm -f nad2bin.c
41deeb1
rm -f _proj.c
41deeb1
rm -rf lib/%{name}/data
41deeb1
98cd1f0
# Generate Cython C code
646a50e
# not needed anymore, this is taken care of by setup.py now
646a50e
# cython _proj.pyx
41deeb1
41deeb1
%build
41deeb1
export PROJ_DIR="%{_usr}/"
646a50e
41deeb1
779e8f0
%py3_build
41deeb1
41deeb1
%install
bf51713
export PROJ_DIR="%{_usr}/"
41deeb1
779e8f0
%py3_install
41deeb1
41deeb1
# correct wrong write permission for group
41deeb1
chmod 755  %{buildroot}/%{python3_sitearch}/%{name}/*.so
41deeb1
6e2e453
# remove the rpath setting from _proj.so
6e2e453
chrpath -d %{buildroot}/%{python3_sitearch}/%{name}/*.so
6e2e453
41deeb1
ff7206e
%check
ff7206e
646a50e
646a50e
# run old tests based on doctest (see README.md)
646a50e
PYTHONPATH="%{buildroot}%{python3_sitearch}" %{__python3} -c 'import pyproj;pyproj.test()' -v
646a50e
646a50e
# run new tests based on unittest (see README.md)
646a50e
# disabled since these fail, the seem not maintained
646a50e
# since they contain print statements not compatible with python3
646a50e
#PYTHONPATH="%%{buildroot}%%{python3_sitearch}" %%{__python3} unittest/test.py
41deeb1
41deeb1
41deeb1
%files -n python3-%{name}
ff7206e
%doc Changelog docs README.md
41deeb1
%{python3_sitearch}/%{name}
41deeb1
%{python3_sitearch}/%{name}-*-py*.egg-info
41deeb1
646a50e
# note: the provided create_docs.sh script would suggest that
646a50e
# epydoc is needed to build the docs in subdir docs. However
646a50e
# the upstream author has already run this tool and has added
646a50e
# the resulting files to git, so this is not needed during
646a50e
# rpm creation after all.
646a50e
41deeb1
%changelog
63f3afd
* Mon Feb 25 2019 Miro Hrončok <mhroncok@redhat.com> - 1.9.6-2
63f3afd
- Subpackage python2-pyproj has been removed
63f3afd
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
63f3afd
646a50e
* Sun Feb 17 2019 Jos de Kloe <josdekloe@gmail.com> 1.9.6-1
646a50e
- update to version 1.9.6, remove python2 sub-package for Fedora 30+
646a50e
- remove use of py3dir macro when building python3 sub-package
646a50e
2a09821
* Tue Feb 12 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.9.5.1-18
2a09821
- Rebuilt for updated Proj
2a09821
59ae6cd
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.5.1-17
59ae6cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
59ae6cd
3f26f20
* Fri Aug 17 2018 Jos de Kloe <josdekloe@gmail.com> 1.9.5.1-16
3f26f20
- merge with cython patch by Miro Hrončok <pagure@pkgs.fedoraproject.org>
3f26f20
  (there is no more cython3 command; Cython behaves the same on both Pythons)
3f26f20
- remove the no_inv_hammer_test patch
3f26f20
576fbe9
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.5.1-15
576fbe9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
576fbe9
3e688f4
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.9.5.1-14
3e688f4
- Rebuilt for Python 3.7
3e688f4
8688e98
* Sat Feb 24 2018 Jos de Kloe <josdekloe@gmail.com> 1.9.5.1-13
8688e98
- Add explicit BuildRequires for gcc
8688e98
1c87cdd
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.5.1-12
1c87cdd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
1c87cdd
b76ed66
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.5.1-11
b76ed66
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
b76ed66
900a139
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.5.1-10
900a139
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
900a139
Igor Gnatenko b7d99f4
* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.9.5.1-9
Igor Gnatenko b7d99f4
- Rebuild due to bug in RPM (RHBZ #1468476)
Igor Gnatenko b7d99f4
c806a2a
* Thu Jul 06 2017 Björn Esser <besser82@fedoraproject.org> - 1.9.5.1-8
c806a2a
- move package specific (Build)Requires in the correspondig sub-packages
c806a2a
bcb10b5
* Thu Jul 06 2017 Björn Esser <besser82@fedoraproject.org> - 1.9.5.1-7
bcb10b5
- setup filtering for private libs correctly
bcb10b5
6fd5b99
* Fri Jun 30 2017 Jos de Kloe <josdekloe@gmail.com> 1.9.5.1-6
6fd5b99
- rename pyproj to python2-pyproj following the new package naming scheme
6fd5b99
b6163d9
* Wed Feb 01 2017 Jos de Kloe <josdekloe@gmail.com> 1.9.5.1-5
b6163d9
- force rebuild after libproj soname jump
b6163d9
3053776
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.9.5.1-4
3053776
- Rebuild for Python 3.6
3053776
ca3244a
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.5.1-3
ca3244a
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
ca3244a
402cbd7
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.5.1-2
402cbd7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
402cbd7
bf51713
* Thu Jan 14 2016 Jos de Kloe <josdekloe@gmail.com> 1.9.5.1-1
bf51713
- update to new upstream version
bf51713
- remove the inverse hammer test
bf51713
498e00c
* Thu Nov 12 2015 Jos de Kloe <josdekloe@gmail.com> 1.9.4-4
6e2e453
- apply patch to fix a bug in _proj.pyx that surfaced in cython 0.23
6e2e453
- apply chrpath to fix binary-or-shlib-defines-rpath error reported by rpmlint
6e2e453
2db8799
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.4-3
2db8799
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
2db8799
ef7eafa
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.4-2
ef7eafa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
ef7eafa
ff7206e
* Thu Mar 12 2015 Jos de Kloe <josdekloe@gmail.com> 1.9.4-1
ff7206e
- update to version 1.9.4
ff7206e
- replace python_sitearch macro with python2_sitearch
ff7206e
- replace the deprecated macro __python by __python3
ff7206e
- activate the check section
4544c32
ace7009
* Sat Jan 11 2014 Jos de Kloe <josdekloe@gmail.com> 1.9.2-8.20120712svn300
ace7009
- replace the deprecated macro __python by __python2
ace7009
- require proj-epsg to solve bug #1022238
ace7009
bd4353c
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.2-7.20120712svn300
bd4353c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
bd4353c
74369d0
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.9.2-6.20120712svn300
74369d0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
74369d0
ace7009
* Thu Jul 12 2012 Jos de Kloe <josdekloe@gmail.com> 1.9.2-5.20120712svn300
ace7009
- adapted version number format to comply to the Snapshot packages 
ace7009
  guidelines, and move to svn revision 300.
ace7009
41deeb1
* Wed Jun 20 2012 Jos de Kloe <josdekloe@gmail.com> 1.9.2-4.r298
ace7009
- Added proj-nad as explicit Requirement since it contains data files needed
ace7009
  to run the module, and bumped the version number to the one mentioned in 
ace7009
  the setup-proj.py script
ace7009
41deeb1
* Fri Jun 15 2012 Jos de Kloe <josdekloe@gmail.com> 1.9.0-3.r298
ace7009
- Adapted to build with python3
ace7009
ace7009
* Thu May 31 2012 Jos de Kloe <josdekloe@gmail.com> 1.9.0-2.r298
ace7009
- Adapted to svn revision r298 which has some modifications
ace7009
  to allow building without using the included proj sources
ace7009
41deeb1
* Mon Apr 23 2012 Volker Fröhlich <volker27@gmx.at> - 1.9.0-1
ace7009
- Initial package for Fedora