forked from Oslandia/py3dtiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
71 lines (59 loc) · 1.64 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
64
65
66
67
68
69
70
71
# -*- coding: utf-8 -*-
import os
import re
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
requirements = (
'numpy',
'pyproj',
'cython',
'triangle'
)
dev_requirements = (
'pytest',
'pytest-cov',
)
doc_requirements = (
'sphinx',
'sphinx_rtd_theme',
)
prod_requirements = (
)
def find_version(*file_paths):
"""
see https://github.com/pypa/sampleproject/blob/master/setup.py
"""
with 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.")
setup(
name='py3dtiles',
version=find_version('py3dtiles', '__init__.py'),
description="Python module for 3D tiles format",
url='https://github.com/Oslandia/py3dtiles',
author='dev',
author_email='[email protected]',
license='LGPL2 or later',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
packages=find_packages(),
install_requires=requirements,
test_suite="tests",
scripts=["tools/py3dtiles_info"],
extras_require={
'dev': dev_requirements,
'prod': prod_requirements,
'doc': doc_requirements
}
)