@@ -10,19 +10,13 @@ class NodejsInstallerConan(ConanFile):
10
10
url = "https://github.com/conan-io/conan-center-index"
11
11
homepage = "https://nodejs.org"
12
12
license = "MIT"
13
- settings = "os_build" , "arch_build"
13
+ settings = { "os_build" : [ "Windows" , "Linux" , "Macos" ], " arch_build": [ "x86_64" ]}
14
14
no_copy_source = True
15
15
16
16
@property
17
17
def _source_subfolder (self ):
18
18
return os .path .join (self .source_folder , "source_subfolder" )
19
19
20
- def configure (self ):
21
- if self .settings .arch_build == "x86" and self .settings .os_build == "Linux" :
22
- raise ConanInvalidConfiguration ("Linux x86 is not support by nodejs" )
23
- if self .settings .os_build not in ["Windows" , "Macos" , "Windows" ]:
24
- raise ConanInvalidConfiguration ("The OS '%s' is not support by nodejs" % str (self .settings .os_build ))
25
-
26
20
def source (self ):
27
21
for data in self .conan_data ["sources" ][self .version ]:
28
22
oss , sha , url = data .values ()
@@ -40,6 +34,6 @@ def package(self):
40
34
self .copy (pattern = "npx" , src = self ._source_subfolder , dst = "bin" )
41
35
42
36
def package_info (self ):
43
- bin_dir = self . package_folder if tools . os_info . is_windows else os .path .join (self .package_folder , "bin" )
37
+ bin_dir = os .path .join (self .package_folder , "bin" )
44
38
self .output .info ('Appending PATH environment variable: {}' .format (bin_dir ))
45
39
self .env_info .PATH .append (bin_dir )
0 commit comments