1
|
|
|
#!/usr/bin/env python3 |
2
|
|
|
# ~*~ coding: utf-8 ~*~ |
3
|
|
|
#- |
4
|
|
|
# OSMAlchemy - OpenStreetMap to SQLAlchemy bridge |
5
|
|
|
# Copyright (c) 2016 Dominik George <[email protected]> |
6
|
|
|
# |
7
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy |
8
|
|
|
# of this software and associated documentation files (the "Software"), to deal |
9
|
|
|
# in the Software without restriction, including without limitation the rights |
10
|
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
11
|
|
|
# copies of the Software, and to permit persons to whom the Software is |
12
|
|
|
# furnished to do so, subject to the following conditions: |
13
|
|
|
# |
14
|
|
|
# The above copyright notice and this permission notice shall be included in all |
15
|
|
|
# copies or substantial portions of the Software. |
16
|
|
|
# |
17
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
18
|
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
19
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
20
|
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
21
|
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
22
|
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
23
|
|
|
# SOFTWARE. |
24
|
|
|
# |
25
|
|
|
# Alternatively, you are free to use OSMAlchemy under Simplified BSD, The |
26
|
|
|
# MirOS Licence, GPL-2+, LGPL-2.1+, AGPL-3+ or the same terms as Python |
27
|
|
|
# itself. |
28
|
|
|
|
29
|
|
|
import importlib.util |
30
|
|
|
import os |
31
|
|
|
from setuptools import setup |
32
|
|
|
|
33
|
|
|
# Get some information for the setup |
34
|
|
|
MYDIR = os.path.dirname(__file__) |
35
|
|
|
|
36
|
|
|
# Find the version string from the __init__ file |
37
|
|
|
def find_version(package_name): |
38
|
|
|
filename = os.path.join(MYDIR, package_name, "__init__.py") |
39
|
|
|
with open(filename, "r") as file: |
40
|
|
|
for line in file.readlines(): |
41
|
|
|
if line.startswith("__version__"): |
42
|
|
|
version = line.split('"')[1] |
43
|
|
|
return version |
44
|
|
|
|
45
|
|
|
setup( |
46
|
|
|
# Basic information |
47
|
|
|
name = 'OSMAlchemy', |
48
|
|
|
version = find_version("osmalchemy"), |
49
|
|
|
keywords = ['osm', 'openstreetmap', 'proxy', 'caching', 'orm'], |
50
|
|
|
description = 'OpenStreetMap to SQLAlchemy bridge', |
51
|
|
|
long_description = open(os.path.join(MYDIR, "README.rst"), "r").read(), |
52
|
|
|
url = 'https://github.com/Natureshadow/OSMAlchemy', |
53
|
|
|
|
54
|
|
|
# Author information |
55
|
|
|
author = 'Dominik George, Eike Tim Jesinghaus', |
56
|
|
|
author_email = '[email protected]', |
57
|
|
|
|
58
|
|
|
# Included code |
59
|
|
|
packages = ["osmalchemy", "osmalchemy.util"], |
60
|
|
|
|
61
|
|
|
# Distribution information |
62
|
|
|
zip_safe = True, |
63
|
|
|
install_requires = [ |
64
|
|
|
'SQLAlchemy>=1.0.0', |
65
|
|
|
'python-dateutil', |
66
|
|
|
'overpass' |
67
|
|
|
], |
68
|
|
|
tests_require = [ |
69
|
|
|
'SQLAlchemy>=1.0.0', |
70
|
|
|
'python-dateutil', |
71
|
|
|
'overpass', |
72
|
|
|
'psycopg2', |
73
|
|
|
'Flask>=0.10', |
74
|
|
|
'Flask-SQLAlchemy', |
75
|
|
|
'testing.postgresql', |
76
|
|
|
'testing.mysqld' |
77
|
|
|
], |
78
|
|
|
extras_require = { |
79
|
|
|
'Flask': [ |
80
|
|
|
'Flask>=0.10', |
81
|
|
|
'Flask-SQLAlchemy' |
82
|
|
|
] |
83
|
|
|
}, |
84
|
|
|
test_suite = 'test', |
85
|
|
|
classifiers = [ |
86
|
|
|
'Development Status :: 3 - Alpha', |
87
|
|
|
'Environment :: Plugins', |
88
|
|
|
'Intended Audience :: Developers', |
89
|
|
|
'License :: OSI Approved :: MIT License', |
90
|
|
|
'Programming Language :: Python :: 3 :: Only', |
91
|
|
|
'Topic :: Database', |
92
|
|
|
'Topic :: Scientific/Engineering :: GIS', |
93
|
|
|
'Topic :: Software Development :: Libraries :: Python Modules' |
94
|
|
|
] |
95
|
|
|
) |
96
|
|
|
|