forked from openalea/lpy
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
97 lines (71 loc) · 2.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# -*- coding: utf-8 -*-
__revision__ = "$Id$"
# Header
import os, sys
pj = os.path.join
from openalea.deploy.metainfo import read_metainfo
metadata = read_metainfo('metainfo.ini', verbose=True)
for key,value in metadata.iteritems():
exec("%s = '%s'" % (key, value))
##############
# Setup script
# Package name
pkg_name= namespace + '.' + package
wralea_name= namespace + '.' + package + '_wralea'
meta_version = version
# check that meta version is updated
f = pj(os.path.dirname(__file__),'src', 'openalea', 'lpy','__version__.py')
d = {}
execfile(f,d,d)
version= d['LPY_VERSION_STR']
if meta_version != version:
print 'Warning:: Update the version in metainfo.ini !!'
print pkg_name,': version =',version
# Scons build directory
build_prefix = "build-scons"
from setuptools import setup
from openalea.deploy.binary_deps import binary_deps
install_requires = [binary_deps('vplants.plantgl')]
#if 'linux' not in sys.platform:
# install_requires.append('PyOpenGL')
# install_requires.append('pyqglviewer')
setup(
name=name,
version=version,
description=description,
long_description=long_description,
author=authors,
author_email=authors_email,
url=url,
license=license,
scons_scripts = ['SConstruct'],
namespace_packages = [namespace],
create_namespaces = False,
# pure python packages
packages = [ pkg_name, pkg_name+'.gui',pkg_name+'.gui.plugins', pkg_name+'.cpfg_compat', wralea_name ],
py_modules = ['lpygui_postinstall'],
# python packages directory
package_dir = { '' : 'src',},
# Add package platform libraries if any
include_package_data = True,
package_data = {'' : ['*.pyd', '*.so', '*.dylib', '*.lpy','*.ui','*.qrc'],},
zip_safe = False,
# Specific options of openalea.deploy
lib_dirs = {'lib' : pj(build_prefix, 'lib'),},
#bin_dirs = {'bin': pj(build_prefix, 'bin'),},
inc_dirs = {'include' : pj(build_prefix, 'src','cpp') },
share_dirs = {'share' : 'share', },
# Dependencies
# entry_points
entry_points = {
"wralea": ["lpy = openalea.lpy_wralea",],
'gui_scripts': ['lpy = openalea.lpy.gui.lpystudio:main',],
'console_scripts': ['cpfg2lpy = openalea.lpy.cpfg_compat.cpfg2lpy:main',],
},
postinstall_scripts = ['lpygui_postinstall'],
# Dependencies
setup_requires = ['openalea.deploy'],
dependency_links = ['http://openalea.gforge.inria.fr/pi'],
install_requires = install_requires,
pylint_packages = ['src/openalea/lpy/gui']
)