def __init__( self, nix: Nix, project_directory: str, extra_build_inputs: List[str], extra_env: str, verbose: int, wheels_cache: List[str], target_platform: TargetPlatform, ): self.nix = nix self.project_directory = project_directory self.extra_build_inputs = extra_build_inputs self.extra_env = extra_env self.build_output: str = "" self.verbose = verbose self.wheels_cache = wheels_cache self.target_platform = target_platform output = self.nix.evaluate_expression( 'let pkgs = import <nixpkgs> {}; in "%s"' % escape_double_quotes(extra_env)) # trim quotes self.extra_env = output[1:-1] self.wheel_cache_dir = os.path.join(self.project_directory, "cache", "wheels") self.default_lib_directory = os.path.join(self.project_directory, "lib") self.download_cache_directory = os.path.join(self.project_directory, "cache", "download")
def __init__( self, nix: Nix, project_directory: str, extra_build_inputs: List[str], extra_env: str, wheels_cache: List[str], target_platform: TargetPlatform, logger: Logger, requirement_parser: RequirementParser, ): self.nix = nix self.project_directory = project_directory self.extra_build_inputs = extra_build_inputs self.extra_env = extra_env self.build_output: str = "" self.wheels_cache = wheels_cache self.target_platform = target_platform self.logger = logger self.requirement_parser = requirement_parser output = self.nix.evaluate_expression( 'let pkgs = import <nixpkgs> {}; in "%s"' % escape_double_quotes(extra_env) ) # trim quotes self.extra_env = output[1:-1] self.default_lib_directory = os.path.join(self.project_directory, "lib") self.download_cache_directory = os.path.join(self.project_directory, "cache")