Skip to content

Commit

Permalink
don't import rtree in setup.py (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedh authored Mar 6, 2020
1 parent 9226020 commit 439c009
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
4 changes: 0 additions & 4 deletions rtree/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
__version__ = '0.9.4'

# from .index import Rtree

# from .core import rt
64 changes: 34 additions & 30 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,47 +1,51 @@
#!/usr/bin/env python
from setuptools import setup
import rtree
import os

from setuptools import setup
import itertools as it

# Get text from README.txt
with open('docs/source/README.txt', 'r') as fp:
readme_text = fp.read()

# Get __version without importing
with open('rtree/__init__.py', 'r') as fp:
# get and exec just the line which looks like "__version__ = '0.9.4'"
exec(next(line for line in fp if '__version__' in line))

extras_require = {
'test': ['pytest>=3', 'pytest-cov', 'numpy']
}

extras_require['all'] = list(set(it.chain(*extras_require.values())))

setup(
name = 'Rtree',
version = rtree.__version__,
description = 'R-Tree spatial index for Python GIS',
license = 'MIT',
keywords = 'gis spatial index r-tree',
author = 'Sean Gillies',
author_email = '[email protected]',
maintainer = 'Howard Butler',
maintainer_email = '[email protected]',
url = 'https://github.com/Toblerity/rtree',
long_description = readme_text,
packages = ['rtree'],
install_requires = ['setuptools'],
extras_require = extras_require,
tests_require = extras_require['test'],
zip_safe = False,
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: C',
'Programming Language :: C++',
'Programming Language :: Python',
'Topic :: Scientific/Engineering :: GIS',
'Topic :: Database',
],
name='Rtree',
version=__version__,
description='R-Tree spatial index for Python GIS',
license='MIT',
keywords='gis spatial index r-tree',
author='Sean Gillies',
author_email='[email protected]',
maintainer='Howard Butler',
maintainer_email='[email protected]',
url='https://github.com/Toblerity/rtree',
long_description=readme_text,
packages=['rtree'],
install_requires=['setuptools'],
extras_require=extras_require,
tests_require=extras_require['test'],
zip_safe=False,
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: C',
'Programming Language :: C++',
'Programming Language :: Python',
'Topic :: Scientific/Engineering :: GIS',
'Topic :: Database',
],
)

0 comments on commit 439c009

Please sign in to comment.