Skip to content

InstallCommand silently dying on me #6

@mxdev88

Description

@mxdev88

I've been trying to understand what I was doing wrong. The requirements.txt would not appear to be bundled in the egg.

Debugging the command, I found out that InstallCommand must be trying to re-open the NamedTemporaryFile which fails on Windows.

ERROR: Could not open requirements file: [Errno 13] Permission denied: 'C:\\Users\\home\\AppData\\Local\\Temp\\tmpgk4mrzyz''

The error is explained in the NamedTemporaryFile documentation :

whether the name can be used to open the file a second time, while the named temporary file is still open, varies across platforms (it can be so used on Unix; it cannot on Windows NT or later)

Changing to this worked.

if os.path.exists(self.requirements_file):
   install_command = InstallCommand('PyAssemblyInternalInstall', 'Installs package dependencies.', isolated=False)
   install_command.main(args=['-r', self.requirements_file, '-t', dist_dir])

This is not the solution off course but allowed me to understand where the issue came from.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions