-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
51 lines (45 loc) · 1.21 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
from setuptools import setup
from Cython.Build import cythonize
from subprocess import check_output
from os.path import exists
# remove the leading v from the tag
# replace the first '-' with a '.' (so commit id is part of version),
# maybe a bad idea?
# remove the final \n (to avoid it being replaced with a dash
if exists('version.txt'):
with open('version.txt') as fd:
VERSION = fd.read().strip()[1:].replace('-', '.', 1).split('-')[0]
else:
try:
VERSION = check_output(
['git', 'describe', '--tags'],
shell=True
).decode('utf-8')[1:].replace('-', '.', 1).strip()
except Exception:
VERSION = 'dev'
setup(
name='cloudpoints',
author='Gabriel Pettier, Tangible Display',
url='',
license='all rights reserved',
version=VERSION,
description=(
'visualise LIDAR data'
),
ext_modules=cythonize(
[
'cloudpoints/view.pyx',
'cloudpoints/object_renderer.pyx'
]
),
platforms='any',
include_package_data=True,
packages=['cloudpoints'],
install_requires=[
'liblas',
],
entry_points='''
[console_scripts]
cloudpoints=cloudpoints.view:main
'''
)