fix: create Python symlink only during builds, and clean it up after (#2721)

* fix: create Python symlink only during builds, and clean it up after

Previously in b9ddcd5bbd this was created
during configuration, and the symlink persisted indefinitely. This
causes problems with many tools that do not expect a codebase to include
symlinks to external absolute paths.

This PR largely reverts that commit, and instead writes the path to
link to into the config, and then creates the symlink only temporarily
during the build process, always deleting it afterwards.

* assert install_path == self.output, f"{install_path} != {self.output}"

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
Tim Perry 2023-08-01 10:02:59 +02:00 committed by GitHub
parent 445c28fabc
commit 0f1f667b73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 33 deletions

View file

@ -16,9 +16,7 @@ const configure = requireInject('../lib/configure', {
mkdir: function (dir, options, cb) { cb() },
promises: {
writeFile: function (file, data) { return Promise.resolve(null) }
},
unlink: function (path, cb) { cb() },
symlink: function (target, path, cb) { cb() }
}
}
})