@@ -30,14 +30,16 @@ def import_module_from_path(path):
30
30
31
31
32
32
util = import_module_from_path ('optix/path_utility.py' )
33
- cuda_include_path = util .get_cuda_include_path ()
34
- optix_include_path = util .get_optix_include_path ()
33
+ cuda_include_path = util .get_cuda_include_path (environment_variable = 'CUDA_PATH' )
34
+ optix_include_path = util .get_optix_include_path (environement_variable = 'OPTIX_PATH' )
35
35
print ("Found cuda includes at" , cuda_include_path )
36
36
print ("Found optix includes at" , optix_include_path )
37
37
if cuda_include_path is None :
38
- raise RuntimeError ("CUDA not found in the system, but is required to build this package." )
38
+ raise RuntimeError ("CUDA not found in the system, but is required to build this package. Consider setting"
39
+ "CUDA_PATH to the location of the local cuda toolkit installation." )
39
40
if optix_include_path is None :
40
- raise RuntimeError ("OptiX not found in the system, but is required to build this package." )
41
+ raise RuntimeError ("OptiX not found in the system, but is required to build this package. Consider setting "
42
+ "OPTIX_PATH to the location of the optix SDK." )
41
43
42
44
optix_version_re = re .compile (r'.*OPTIX_VERSION +(\d{5})' ) # get the optix version from the header
43
45
with open (Path (optix_include_path ) / "optix.h" , 'r' ) as f :
@@ -83,7 +85,7 @@ def glob_fix(package_name, glob):
83
85
for path in package_path .glob (glob )]
84
86
85
87
from setuptools .command .install import install as _install
86
-
88
+ from setuptools . command . develop import develop as _develop
87
89
88
90
class EmbeddHeadersCommandMixin :
89
91
def update_package_data (self ):
@@ -94,7 +96,7 @@ def update_package_data(self):
94
96
self .distribution .package_data )
95
97
96
98
def run (self ):
97
- embedd = os .getenv ("OPTIX_ADD_HEADERS " )
99
+ embedd = os .getenv ("OPTIX_EMBED_HEADERS " )
98
100
if embedd :
99
101
# create the path for the internal headers
100
102
# due to optix license restrictions those headers
@@ -106,15 +108,19 @@ def run(self):
106
108
107
109
self .update_package_data ()
108
110
109
-
110
111
super ().run ()
111
112
112
113
113
114
class CustomInstallCommand (EmbeddHeadersCommandMixin , _install ):
114
115
pass
115
116
116
117
117
- cmd_classes = {'install' : CustomInstallCommand }
118
+ class CustomDevelopCommand (EmbeddHeadersCommandMixin , _develop ):
119
+ pass
120
+
121
+
122
+ cmd_classes = {'install' : CustomInstallCommand ,
123
+ 'develop' : CustomDevelopCommand }
118
124
119
125
try :
120
126
from wheel .bdist_wheel import bdist_wheel as _bdist_wheel
0 commit comments