forked from buckhx/QuadKey
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add setup script for PyPi distribution.
- Loading branch information
Showing
4 changed files
with
56 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.7.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,39 @@ | ||
#!/usr/bin/env python | ||
# https://packaging.python.org/tutorials/packaging-projects/ | ||
import os | ||
|
||
from setuptools import setup, find_packages | ||
from setuptools.glob import glob | ||
|
||
try: | ||
from Cython.Distutils.extension import Extension | ||
from Cython.Build import build_ext | ||
except ImportError: | ||
from setuptools import Extension | ||
|
||
USING_CYTHON = False | ||
else: | ||
USING_CYTHON = True | ||
|
||
ext = 'pyx' if USING_CYTHON else 'c' | ||
sources = glob('quadkey/tilesystem/*.%s' % (ext,)) | ||
extensions = [Extension(source.split('.')[0].replace(os.path.sep, '.'), sources=[source]) for source in sources] | ||
cmdclass = {'build_ext': build_ext} if USING_CYTHON else {} | ||
|
||
setup( | ||
name='pyquadkey2', | ||
version='0.1.0', | ||
description='Python implementation of geographical tiling using QuadKeys as proposed by Microsoft', | ||
author='Ferdinand Mütsch', | ||
author_email='[email protected]', | ||
url='https://github.com/n1try/pyquadkey2', | ||
packages=find_packages(), | ||
install_requires=['Cython>=0.29.12'], | ||
project_urls={ | ||
'Bug Tracker': 'https://github.com/n1try/pyquadkey2/issues', | ||
'Source Code': 'https://github.com/n1try/pyquadkey2', | ||
}, | ||
keywords='tiling quadkey quadtile geospatial geohash' | ||
name='pyquadkey2', | ||
version='0.1.0', | ||
description='Python implementation of geographical tiling using QuadKeys as proposed by Microsoft', | ||
author='Ferdinand Mütsch', | ||
author_email='[email protected]', | ||
url='https://github.com/n1try/pyquadkey2', | ||
packages=find_packages(), | ||
project_urls={ | ||
'Bug Tracker': 'https://github.com/n1try/pyquadkey2/issues', | ||
'Source Code': 'https://github.com/n1try/pyquadkey2', | ||
}, | ||
keywords='tiling quadkey quadtile geospatial geohash', | ||
python_requires='>=3.6', | ||
ext_modules=extensions, | ||
cmdclass=cmdclass | ||
) |