File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
tools/perspective-scripts Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1212
1313import { execSync } from "node:child_process" ;
1414import * as fs from "node:fs" ;
15+ import * as path from "node:path" ;
16+ import pkg from "../../package.json" assert { type : "json " } ;
17+
18+ const __dirname = new URL ( "." , import . meta. url ) . pathname ;
1519
1620const wheel_file = fs . readdirSync ( "." ) . filter ( ( x ) => x . endsWith ( ".whl" ) ) [ 0 ] ;
1721const pkg_name = wheel_file . split ( "-" ) . slice ( 0 , 2 ) . join ( "-" ) ;
1822execSync ( `wheel unpack ${ wheel_file } ` ) ;
1923
2024fs . cpSync (
21- "rust/perspective-python/perspective.data" ,
22- `${ pkg_name } /perspective.data` ,
25+ path . join ( __dirname , "../../rust/perspective-python/perspective.data" ) ,
26+ `${ pkg_name } /perspective_python-${ pkg . version . replace ( / - r c \. \d + / , ( x ) =>
27+ x . replace ( "-" , "" ) . replace ( "." , "" )
28+ ) } .data`,
2329 { recursive : true }
2430) ;
2531
You can’t perform that action at this time.
0 commit comments