This repository has been archived by the owner on Jun 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
setup.py
63 lines (54 loc) · 1.6 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import os
import re
import io
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
requirements = (
'cython',
'mercantile',
'sanic==19.6.3',
'sanic-cors==0.9.9.post1',
'pyyaml',
'asyncpg>=0.15.0',
'jinja2'
)
def find_version(*file_paths):
"""
see https://github.com/pypa/sampleproject/blob/master/setup.py
"""
with io.open(os.path.join(here, *file_paths), 'r') as f:
version_file = f.read()
# The version line must have the form
# __version__ = 'ver'
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string. "
"Should be at the first line of __init__.py.")
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='Postile',
version=find_version('postile', '__init__.py'),
description="Fast Vector Tile Server",
long_description=long_description,
long_description_content_type="text/markdown",
url='https://github.com/ldgeo/postile',
author='ldgeo',
author_email='contact@oslandia.com',
license='BSD-3',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3.6',
],
packages=find_packages(),
install_requires=requirements,
include_package_data=True,
entry_points={
'console_scripts': [
'postile=postile.postile:main',
],
},
)