36
36
#print (pkg_name+': version = '+version)
37
37
38
38
39
- # cmake build directory
40
- build_prefix = "build-cmake"
41
-
42
39
def compile_interface ():
43
40
cwd = os .getcwd ()
44
41
os .chdir (pj (lpydir ,'gui' ))
@@ -56,6 +53,25 @@ def compile_interface():
56
53
57
54
from setuptools import setup
58
55
56
+
57
+ # Scons build directory
58
+ build_prefix = "build-cmake"
59
+
60
+ if 'CONDA_PREFIX' in os .environ or 'PREFIX' in os .environ :
61
+ deploy_args = {}
62
+ else :
63
+ currentdir = os .path .dirname (__file__ )
64
+ deploy_args = dict (
65
+ # Specific options of openalea.deploy
66
+ lib_dirs = {'lib' : pj (currentdir , build_prefix , 'lib' ),},
67
+ bin_dirs = {'bin' : pj (currentdir , build_prefix , 'bin' ),},
68
+ inc_dirs = { 'include' : pj (currentdir , build_prefix , 'include' ) },
69
+ share_dirs = { 'share' : 'share' },
70
+ postinstall_scripts = ['pgl_postinstall' ,],
71
+ namespace_packages = [namespace ],
72
+ create_namespaces = False ,
73
+ )
74
+
59
75
setup (
60
76
name = name ,
61
77
version = version ,
@@ -66,9 +82,6 @@ def compile_interface():
66
82
url = url ,
67
83
license = license ,
68
84
69
- namespace_packages = [namespace ],
70
- create_namespaces = False ,
71
-
72
85
# pure python packages
73
86
packages = [
74
87
namespace ,
@@ -83,7 +96,7 @@ def compile_interface():
83
96
package_dir = { '' : 'src' ,},
84
97
85
98
package_data = {
86
- "" : ["share/*" , "share/*/*" , "share/*/*/*" , "share/*/*/*/*" , '*.pyd' , '*.so' , '*.dylib' , '*.lpy' ,'*.ui' ,'*.qrc' ],
99
+ "" : ['*.pyd' , '*.so' , '*.dylib' , '*.lpy' ,'*.ui' ,'*.qrc' ],
87
100
},
88
101
89
102
# Add package platform libraries if any
@@ -96,6 +109,7 @@ def compile_interface():
96
109
"wralea" : ["lpy = openalea.lpy_wralea" ,],
97
110
'gui_scripts' : ['lpy = openalea.lpy.gui.lpystudio:main' ,],
98
111
'console_scripts' : ['cpfg2lpy = openalea.lpy.cpfg_compat.cpfg2lpy:main' ,],
99
- }
112
+ },
100
113
114
+ ** deploy_args
101
115
)
0 commit comments