forked from pool/python-Rtree
Accepting request 894008 from home:bnavigator:branches:devel:languages:python:numeric
new requirement of spyder 5.0.3 OBS-URL: https://build.opensuse.org/request/show/894008 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Rtree?expand=0&rev=1
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
3
Rtree-0.9.7.tar.gz
Normal file
3
Rtree-0.9.7.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:be8772ca34699a9ad3fb4cfe2cfb6629854e453c10b3328039301bbfc128ca3e
|
||||
size 44877
|
||||
95
Rtree-opensuse-noarch.patch
Normal file
95
Rtree-opensuse-noarch.patch
Normal file
@@ -0,0 +1,95 @@
|
||||
diff -ur Rtree-0.9.7/setup.py Rtree-0.9.7.p/setup.py
|
||||
--- Rtree-0.9.7/setup.py 2020-12-24 16:38:19.000000000 +0100
|
||||
+++ Rtree-0.9.7.p/setup.py 2021-05-18 00:48:04.350602925 +0200
|
||||
@@ -6,7 +6,6 @@
|
||||
from setuptools.dist import Distribution
|
||||
from setuptools.command.install import install
|
||||
|
||||
-from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
|
||||
|
||||
|
||||
# Get text from README.txt
|
||||
@@ -21,74 +20,6 @@
|
||||
# current working directory of this setup.py file
|
||||
_cwd = os.path.abspath(os.path.split(__file__)[0])
|
||||
|
||||
-
|
||||
-class bdist_wheel(_bdist_wheel):
|
||||
- def finalize_options(self):
|
||||
- _bdist_wheel.finalize_options(self)
|
||||
- self.root_is_pure = False
|
||||
-
|
||||
-
|
||||
-class BinaryDistribution(Distribution):
|
||||
- """Distribution which always forces a binary package with platform name"""
|
||||
- def has_ext_modules(foo):
|
||||
- return True
|
||||
-
|
||||
-
|
||||
-class InstallPlatlib(install):
|
||||
- def finalize_options(self):
|
||||
- """
|
||||
- Copy the shared libraries into the wheel. Note that this
|
||||
- will *only* check in `rtree/lib` rather than anywhere on
|
||||
- the system so if you are building a wheel you *must* copy or
|
||||
- symlink the `.so`/`.dll`/`.dylib` files into `rtree/lib`.
|
||||
- """
|
||||
- # use for checking extension types
|
||||
- from fnmatch import fnmatch
|
||||
-
|
||||
- install.finalize_options(self)
|
||||
- if self.distribution.has_ext_modules():
|
||||
- self.install_lib = self.install_platlib
|
||||
- # now copy over libspatialindex
|
||||
- # get the location of the shared library on the filesystem
|
||||
-
|
||||
- # where we're putting the shared library in the build directory
|
||||
- target_dir = os.path.join(self.build_lib, 'rtree', 'lib')
|
||||
- # where are we checking for shared libraries
|
||||
- source_dir = os.path.join(_cwd, 'rtree', 'lib')
|
||||
-
|
||||
- # what patterns represent shared libraries
|
||||
- patterns = {'*.so',
|
||||
- 'libspatialindex*dylib',
|
||||
- '*.dll'}
|
||||
-
|
||||
- if not os.path.isdir(source_dir):
|
||||
- # no copying of binary parts to library
|
||||
- # this is so `pip install .` works even
|
||||
- # if `rtree/lib` isn't populated
|
||||
- return
|
||||
-
|
||||
- for file_name in os.listdir(source_dir):
|
||||
- # make sure file name is lower case
|
||||
- check = file_name.lower()
|
||||
- # use filename pattern matching to see if it is
|
||||
- # a shared library format file
|
||||
- if not any(fnmatch(check, p) for p in patterns):
|
||||
- continue
|
||||
-
|
||||
- # if the source isn't a file skip it
|
||||
- if not os.path.isfile(os.path.join(source_dir, file_name)):
|
||||
- continue
|
||||
-
|
||||
- # make build directory if it doesn't exist yet
|
||||
- if not os.path.isdir(target_dir):
|
||||
- os.makedirs(target_dir)
|
||||
-
|
||||
- # copy the source file to the target directory
|
||||
- self.copy_file(
|
||||
- os.path.join(source_dir, file_name),
|
||||
- os.path.join(target_dir, file_name))
|
||||
-
|
||||
-
|
||||
setup(
|
||||
name='Rtree',
|
||||
version=__version__,
|
||||
@@ -105,8 +36,6 @@
|
||||
package_data={"rtree": ['lib']},
|
||||
zip_safe=False,
|
||||
include_package_data=True,
|
||||
- distclass=BinaryDistribution,
|
||||
- cmdclass={'bdist_wheel': bdist_wheel, 'install': InstallPlatlib},
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Intended Audience :: Developers',
|
||||
2
python-Rtree-rpmlintrc
Normal file
2
python-Rtree-rpmlintrc
Normal file
@@ -0,0 +1,2 @@
|
||||
# pure python package does not link but access it via ctypes
|
||||
addFilter("explicit-lib-dependency libspatialindex")
|
||||
7
python-Rtree.changes
Normal file
7
python-Rtree.changes
Normal file
@@ -0,0 +1,7 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon May 17 22:22:43 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- initial specfile for 0.9.7
|
||||
- New requirement for spyder 5.0.3
|
||||
- add Rtree-opensuse-noarch.patch: we don't put spatialindex into a
|
||||
wheel, so the module is kept pure.
|
||||
75
python-Rtree.spec
Normal file
75
python-Rtree.spec
Normal file
@@ -0,0 +1,75 @@
|
||||
#
|
||||
# spec file for package python-Rtree
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python36 1
|
||||
Name: python-Rtree
|
||||
Version: 0.9.7
|
||||
Release: 0
|
||||
Summary: R-Tree spatial index for Python GIS
|
||||
License: MIT
|
||||
URL: https://github.com/Toblerity/rtree
|
||||
Source: https://files.pythonhosted.org/packages/source/R/Rtree/Rtree-%{version}.tar.gz
|
||||
Source99: python-Rtree-rpmlintrc
|
||||
# PATCH-FIX-OPENSUSE Rtree-opensuse-noarch.patch -- we don't put spatialindex into a wheel so the module is kept pure. <code@bnavigator.de>
|
||||
Patch0: Rtree-opensuse-noarch.patch
|
||||
BuildRequires: %{python_module numpy}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libspatialindex4
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: libspatialindex4
|
||||
Provides: python-rtree = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
A ctypes Python wrapper of libspatialindex that provides a number of advanced
|
||||
spatial indexing features for the spatially curious Python user.
|
||||
|
||||
* Nearest neighbor search
|
||||
* Intersection search
|
||||
* Multi-dimensional indexes
|
||||
* Clustered indexes (store Python pickles directly with index entries)
|
||||
* Bulk loading
|
||||
* Deletion
|
||||
* Disk serialization
|
||||
* Custom storage implementation (to implement spatial indexing in ZODB,
|
||||
for example)
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n Rtree-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%pytest
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%license LICENSE.txt
|
||||
%{python_sitelib}/rtree
|
||||
%{python_sitelib}/Rtree-%{version}*-info
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user