-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.py
47 lines (41 loc) · 1.32 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import os
import sys
from setuptools import setup, Extension
try:
from Cython.Build import cythonize
ext = '.pyx'
except ImportError:
def cythonize(extensions): return extensions
ext = '.c'
MIN_PYTHON = (2, 7)
if sys.version_info < MIN_PYTHON:
sys.stderr.write("Python {}.{} or later is required\n".format(*MIN_PYTHON))
sys.exit(1)
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
extensions = cythonize([
Extension('geo._sphere', ['geo/_sphere' + ext]),
Extension('geo._ellipsoid', ['geo/_ellipsoid' + ext]),
])
setup(
name='geo-py',
version='0.5',
author='Alexander Verbitsky',
author_email='[email protected]',
maintainer='Alexander Verbitsky',
maintainer_email='[email protected]',
description='Set of algorithms and structures related to geodesy and geospatial data',
long_description=read('README.rst'),
keywords='geodesy, haversine distance, great circle distance, vincenty\'s formula',
url='https://github.com/gojuno/geo-py',
packages=['geo'],
ext_modules = extensions,
test_suite='test',
license='BSD',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Topic :: Utilities',
'Programming Language :: Python',
'License :: OSI Approved :: BSD License',
],
)