forked from fredboudon/PyQGLViewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
59 lines (45 loc) · 1.53 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
# Header
import os, sys
pj = os.path.join
name = 'PyQGLViewer'
description = 'Python bindings of libQGLViewer.'
long_description= 'PyQGLViewer is a set of Python bindings for the libQGLViewer C++ library which extends the Qt framework with widgets and tools that eases the creation of OpenGL 3D viewers.'
authors = 'Frédéric Boudon'
authors_email = 'frederic.boudon@cirad.fr'
url= 'https://github.com/fredboudon/PyQGLViewer'
# LGPL compatible INRIA license
license = 'Cecill-C'
##############
# Setup script
# check that meta version is updated
def get_version():
versionfile = open(pj(os.path.dirname(__file__),'sip', 'PyQGLViewer', 'qglviewerversion.sip')).read()
lid = versionfile.index('#define PYQGLVIEWER_VERSION')
version = int(versionfile[lid:versionfile.index('\n',lid)].split()[2],16)
major = (version & 0xff0000) >> 16
minor = (version & 0x00ff00) >> 8
rev = (version & 0x0000ff)
return str(major)+'.'+str(minor)+'.'+str(rev)
version = get_version()
from setuptools import setup
setup(
name='PyQGLViewer',
version=version,
description=description,
long_description=long_description,
author=authors,
author_email=authors_email,
url=url,
license=license,
# pure python packages
packages = [
'PyQGLViewer'
],
# python packages directory
package_dir = { '' : 'src',},
package_data={
"": ['*.pyd', '*.so', '*.dylib'],
},
include_package_data = True,
zip_safe = False,
)