@@ -494,32 +494,27 @@ def build(self, directory: Path) -> pathlib.Path:
494
494
# ensure project is built
495
495
self ._project .build ()
496
496
497
- # install project in temporary destination directory
498
- with tempfile .TemporaryDirectory () as destdir :
499
- self ._project .install (destdir )
500
-
501
- wheel_file = pathlib .Path (directory , f'{ self .name } .whl' )
502
-
503
- with mesonpy ._wheelfile .WheelFile (wheel_file , 'w' ) as whl :
504
- self ._wheel_write_metadata (whl )
497
+ wheel_file = pathlib .Path (directory , f'{ self .name } .whl' )
498
+ with mesonpy ._wheelfile .WheelFile (wheel_file , 'w' ) as whl :
499
+ self ._wheel_write_metadata (whl )
505
500
506
- with mesonpy ._util .cli_counter (sum (len (x ) for x in self ._wheel_files .values ())) as counter :
501
+ with mesonpy ._util .cli_counter (sum (len (x ) for x in self ._wheel_files .values ())) as counter :
507
502
508
- root = 'purelib' if self .is_pure else 'platlib'
503
+ root = 'purelib' if self .is_pure else 'platlib'
509
504
510
- for path , entries in self ._wheel_files .items ():
511
- for dst , src in entries :
512
- counter .update (src )
505
+ for path , entries in self ._wheel_files .items ():
506
+ for dst , src in entries :
507
+ counter .update (src )
513
508
514
- if path == root :
515
- pass
516
- elif path == 'mesonpy-libs' :
517
- # custom installation path for bundled libraries
518
- dst = pathlib .Path (f'.{ self ._project .name } .mesonpy.libs' , dst )
519
- else :
520
- dst = pathlib .Path (self .data_dir , path , dst )
509
+ if path == root :
510
+ pass
511
+ elif path == 'mesonpy-libs' :
512
+ # custom installation path for bundled libraries
513
+ dst = pathlib .Path (f'.{ self ._project .name } .mesonpy.libs' , dst )
514
+ else :
515
+ dst = pathlib .Path (self .data_dir , path , dst )
521
516
522
- self ._install_path (whl , src , dst )
517
+ self ._install_path (whl , src , dst )
523
518
524
519
return wheel_file
525
520
@@ -812,11 +807,6 @@ def build(self) -> None:
812
807
"""Build the Meson project."""
813
808
self ._run (self ._build_command )
814
809
815
- def install (self , destdir : Path ) -> None :
816
- """Install the Meson project."""
817
- destdir = os .fspath (destdir )
818
- self ._run (['meson' , 'install' , '--quiet' , '--no-rebuild' , '--destdir' , destdir , * self ._meson_args ['install' ]])
819
-
820
810
@functools .lru_cache ()
821
811
def _info (self , name : str ) -> Any :
822
812
"""Read info from meson-info directory."""
0 commit comments