From 70d207eee1daeaa650c6cc58661f73fa2579a5bb Mon Sep 17 00:00:00 2001 From: Wlzzzz_del <1174547806@qq.com> Date: Mon, 12 Jul 2021 09:09:26 +0800 Subject: [PATCH] publish spec --- python-geojson.spec | 91 ++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 58 deletions(-) diff --git a/python-geojson.spec b/python-geojson.spec index 56f3352..3471906 100644 --- a/python-geojson.spec +++ b/python-geojson.spec @@ -1,70 +1,45 @@ -%global _empty_manifest_terminate_build 0 -Name: python-geojson -Version: 2.5.0 -Release: 1 -Summary: Python bindings and utilities for GeoJSON -License: BSD -URL: https://github.com/jazzband/geojson -Source0: https://files.pythonhosted.org/packages/b6/8d/c42d3fe6f9b5e5bd6a55d9f03813d674d65d853cb12e6bc56f154a2ceca0/geojson-2.5.0.tar.gz -BuildArch: noarch +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-geojson +Version: 2.5.0 +Release: 0 +Summary: Python bindings and utilities for GeoJSON +License: BSD-3-Clause +Group: Development/Languages/Python +URL: https://github.com/jazzband/python-geojson + +Source: https://files.pythonhosted.org/packages/source/g/geojson/geojson-%{version}.tar.gz + +#Patch0: https://github.com/jazzband/geojson/pull/151.patch#/geojson-py39-jsonload.patch +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +%python_subpackages %description -A library for encoding and decoding GeoJSON formatted data,and classes for all GeoJSON Objects - -%package -n python3-geojson -Summary: Python bindings and utilities for GeoJSON -Provides: python-geojson -BuildRequires: python3-devel -BuildRequires: python3-setuptools -%description -n python3-geojson -A library for encoding and decoding GeoJSON formatted data,and classes for all GeoJSON Objects - -%package help -Summary: Development documents and examples for geojson -Provides: python3-geojson-doc -%description help -A library for encoding and decoding GeoJSON formatted data,and classes for all GeoJSON Objects +This library contains functions for encoding and decoding GeoJSON formatted +data, classes for all GeoJSON Objects and an implementation of the Python +geo interface specification. %prep -%autosetup -n geojson-2.5.0 +%autosetup -p1 -n geojson-%{version} %build -%py3_build +%python_build %install -%py3_install -install -d -m755 %{buildroot}/%{_pkgdocdir} -if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi -if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi -if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi -if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi -pushd %{buildroot} -if [ -d usr/lib ]; then - find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/lib64 ]; then - find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/bin ]; then - find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/sbin ]; then - find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst -fi -touch doclist.lst -if [ -d usr/share/man ]; then - find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst -fi -popd -mv %{buildroot}/filelist.lst . -mv %{buildroot}/doclist.lst . +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} -%files -n python3-geojson -f filelist.lst -%dir %{python3_sitelib}/* +%check +export LANG=en_US.UTF-8 +#%pyunittest -v -%files help -f doclist.lst -%{_docdir}/* +%files %{python_files} +%license LICENSE.rst +%doc README.rst CHANGELOG.rst +%{python_sitelib}/geojson +%{python_sitelib}/geojson-%{version}*-info %changelog -* Tue Jul 06 2021 Python_Bot - 2.5.0-1 -- Package Spec generated + -- Gitee