File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed
Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ all: c csharp elixir go java nim nodejs python rust
33
44.PHONY : c
55c :
6- @make -C src
6+ @$( MAKE ) -C src
77
88.PHONY : csharp
99csharp :
10- @make -C bindings/csharp
10+ @$( MAKE ) -C bindings/csharp
1111
1212.PHONY : elixir
1313elixir :
1919
2020.PHONY : java
2121java :
22- @make -C bindings/java build test
22+ @$( MAKE ) -C bindings/java build test
2323
2424.PHONY : nim
2525nim :
2626 @cd bindings/nim && nim test
2727
2828.PHONY : nodejs
2929nodejs :
30- @make -C bindings/node.js
30+ @$( MAKE ) -C bindings/node.js
3131
3232.PHONY : python
3333python :
34- @make -C bindings/python
34+ @$( MAKE ) -C bindings/python
3535
3636.PHONY : rust
3737rust :
Original file line number Diff line number Diff line change 1- from os import chdir
1+ from os import chdir , environ
22from pathlib import Path
33from platform import system
4+ from shutil import which
45from setuptools import setup , Extension
56from setuptools .command .build_ext import build_ext
67from subprocess import check_call
78
89
10+ def get_make ():
11+ """Get the GNU make command. Honors $MAKE if set."""
12+ if "MAKE" in environ :
13+ return environ ["MAKE" ]
14+ if system () == "FreeBSD" :
15+ if not which ("gmake" ):
16+ raise RuntimeError ("GNU make (gmake) is required on FreeBSD" )
17+ return "gmake"
18+ return "make"
19+
20+
921class CustomBuild (build_ext ):
1022 def run (self ):
1123 if system () == "Windows" :
1224 try :
1325 check_call (["blst\\ build.bat" ])
1426 except Exception :
1527 pass
16- check_call (["make" , "-C" , "src" , "blst" ])
28+ check_call ([get_make () , "-C" , "src" , "blst" ])
1729 super ().run ()
1830
1931
You can’t perform that action at this time.
0 commit comments