mirror of
https://github.com/actions/setup-python.git
synced 2026-07-17 21:59:58 +08:00
Remove the pip-install input (#1336)
* Remove the pip-install input * Resloves merge conflicts --------- Co-authored-by: gowridurgad <gowridurgad@gmail.com>
This commit is contained in:
parent
f8cf4291c8
commit
0f3a009f47
7 changed files with 0 additions and 175 deletions
16
dist/setup/index.js
vendored
16
dist/setup/index.js
vendored
|
|
@ -102864,24 +102864,12 @@ function getCacheDistributor(packageManager, pythonVersion, cacheDependencyPath)
|
|||
|
||||
|
||||
|
||||
|
||||
function isPyPyVersion(versionSpec) {
|
||||
return versionSpec.startsWith('pypy');
|
||||
}
|
||||
function isGraalPyVersion(versionSpec) {
|
||||
return versionSpec.startsWith('graalpy');
|
||||
}
|
||||
async function installPipPackages(pipInstall) {
|
||||
info(`Installing pip packages: ${pipInstall}`);
|
||||
try {
|
||||
const installArgs = pipInstall.trim().split(/\s+/);
|
||||
await exec_exec('python', ['-m', 'pip', 'install', ...installArgs]);
|
||||
info('Successfully installed pip packages');
|
||||
}
|
||||
catch {
|
||||
setFailed(`Failed to install pip packages from "${pipInstall}". Please verify that the package names, versions, or requirements files provided are correct and installable, that the specified packages and versions can be resolved from PyPI or the configured package index, and that your network connection is stable and allows access to the package index.`);
|
||||
}
|
||||
}
|
||||
async function cacheDependencies(cache, pythonVersion) {
|
||||
const cacheDependencyPath = getInput('cache-dependency-path') || undefined;
|
||||
const cacheDistributor = getCacheDistributor(cache, pythonVersion, cacheDependencyPath);
|
||||
|
|
@ -102966,10 +102954,6 @@ async function run() {
|
|||
if (cache && isCacheFeatureAvailable()) {
|
||||
await cacheDependencies(cache, pythonVersion);
|
||||
}
|
||||
const pipInstall = getInput('pip-install');
|
||||
if (pipInstall) {
|
||||
await installPipPackages(pipInstall);
|
||||
}
|
||||
}
|
||||
else {
|
||||
warning('The `python-version` input is not set. The version of Python currently in `PATH` will be used.');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue