Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0f3a009

Browse filesBrowse files
gowridurgadgowridurgad
andauthored
Remove the pip-install input (#1336)
* Remove the pip-install input * Resloves merge conflicts --------- Co-authored-by: gowridurgad <gowridurgad@gmail.com>
1 parent f8cf429 commit 0f3a009
Copy full SHA for 0f3a009

7 files changed

-175Lines changed: 0 additions & 175 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/e2e-cache-freethreaded.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/e2e-cache-freethreaded.yml
-59Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -257,62 +257,3 @@ jobs:
257257
pip-version: '25.0.1'
258258
- name: Install dependencies
259259
run: pip install numpy pandas requests
260-
261-
python-pip-dependencies-caching-with-pip-install:
262-
name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }})
263-
runs-on: ${{ matrix.os }}
264-
strategy:
265-
fail-fast: false
266-
matrix:
267-
os:
268-
[
269-
ubuntu-22.04,
270-
ubuntu-latest,
271-
ubuntu-24.04-arm,
272-
windows-latest,
273-
windows-11-arm,
274-
macos-15-intel,
275-
macos-latest
276-
]
277-
python-version: [3.13.14t, 3.14.6t]
278-
exclude:
279-
- os: windows-11-arm
280-
python-version: 3.13.14t
281-
steps:
282-
- uses: actions/checkout@v6
283-
- name: Setup Python
284-
uses: ./
285-
with:
286-
python-version: ${{ matrix.python-version }}
287-
cache: 'pip'
288-
pip-install: numpy pandas requests
289-
290-
python-pip-dependencies-caching-path-with-pip-install:
291-
name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }}, caching path)
292-
runs-on: ${{ matrix.os }}
293-
strategy:
294-
fail-fast: false
295-
matrix:
296-
os:
297-
[
298-
ubuntu-22.04,
299-
ubuntu-latest,
300-
ubuntu-24.04-arm,
301-
windows-latest,
302-
windows-11-arm,
303-
macos-15-intel,
304-
macos-latest
305-
]
306-
python-version: [3.13.14t, 3.14.6t]
307-
exclude:
308-
- os: windows-11-arm
309-
python-version: 3.13.14t
310-
steps:
311-
- uses: actions/checkout@v6
312-
- name: Setup Python
313-
uses: ./
314-
with:
315-
python-version: ${{ matrix.python-version }}
316-
cache: 'pip'
317-
cache-dependency-path: __tests__/data/requirements.txt
318-
pip-install: numpy pandas requests
Collapse file

‎.github/workflows/e2e-cache.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/e2e-cache.yml
-59Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -300,62 +300,3 @@ jobs:
300300
pip-version: '25.0.1'
301301
- name: Install dependencies
302302
run: pip install numpy pandas requests
303-
304-
python-pip-dependencies-caching-with-pip-install:
305-
name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }})
306-
runs-on: ${{ matrix.os }}
307-
strategy:
308-
fail-fast: false
309-
matrix:
310-
os:
311-
[
312-
ubuntu-22.04,
313-
ubuntu-latest,
314-
ubuntu-24.04-arm,
315-
windows-latest,
316-
windows-11-arm,
317-
macos-15-intel,
318-
macos-latest
319-
]
320-
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
321-
exclude:
322-
- os: windows-11-arm
323-
python-version: '3.10'
324-
steps:
325-
- uses: actions/checkout@v6
326-
- name: Setup Python
327-
uses: ./
328-
with:
329-
python-version: ${{ matrix.python-version }}
330-
cache: 'pip'
331-
pip-install: numpy pandas requests
332-
333-
python-pip-dependencies-caching-path-with-pip-install:
334-
name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }}, caching path)
335-
runs-on: ${{ matrix.os }}
336-
strategy:
337-
fail-fast: false
338-
matrix:
339-
os:
340-
[
341-
ubuntu-22.04,
342-
ubuntu-latest,
343-
ubuntu-24.04-arm,
344-
windows-latest,
345-
windows-11-arm,
346-
macos-15-intel,
347-
macos-latest
348-
]
349-
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
350-
exclude:
351-
- os: windows-11-arm
352-
python-version: '3.10'
353-
steps:
354-
- uses: actions/checkout@v6
355-
- name: Setup Python
356-
uses: ./
357-
with:
358-
python-version: ${{ matrix.python-version }}
359-
cache: 'pip'
360-
cache-dependency-path: __tests__/data/requirements.txt
361-
pip-install: numpy pandas requests
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
-1Lines changed: 0 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ See examples of using `cache` and `cache-dependency-path` for `pipenv` and `poet
122122
- [Using `setup-python` on GHES](docs/advanced-usage.md#using-setup-python-on-ghes)
123123
- [Allow pre-releases](docs/advanced-usage.md#allow-pre-releases)
124124
- [Using the pip-version input](docs/advanced-usage.md#using-the-pip-version-input)
125-
- [Using the pip-install input](docs/advanced-usage.md#using-the-pip-install-input)
126125

127126
## Recommended permissions
128127

Collapse file

‎action.yml‎

Copy file name to clipboardExpand all lines: action.yml
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ inputs:
3131
default: false
3232
pip-version:
3333
description: "Used to specify the version of pip to install with the Python. Supported format: major[.minor][.patch]."
34-
pip-install:
35-
description: "Used to specify the packages to install with pip after setting up Python. Can be a requirements file or package names."
3634
outputs:
3735
python-version:
3836
description: "The installed Python or PyPy version. Useful when given a version range as input."
Collapse file

‎dist/setup/index.js‎

Copy file name to clipboardExpand all lines: dist/setup/index.js
-16Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -102864,24 +102864,12 @@ function getCacheDistributor(packageManager, pythonVersion, cacheDependencyPath)
102864102864

102865102865

102866102866

102867-
102868102867
function isPyPyVersion(versionSpec) {
102869102868
return versionSpec.startsWith('pypy');
102870102869
}
102871102870
function isGraalPyVersion(versionSpec) {
102872102871
return versionSpec.startsWith('graalpy');
102873102872
}
102874-
async function installPipPackages(pipInstall) {
102875-
info(`Installing pip packages: ${pipInstall}`);
102876-
try {
102877-
const installArgs = pipInstall.trim().split(/\s+/);
102878-
await exec_exec('python', ['-m', 'pip', 'install', ...installArgs]);
102879-
info('Successfully installed pip packages');
102880-
}
102881-
catch {
102882-
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.`);
102883-
}
102884-
}
102885102873
async function cacheDependencies(cache, pythonVersion) {
102886102874
const cacheDependencyPath = getInput('cache-dependency-path') || undefined;
102887102875
const cacheDistributor = getCacheDistributor(cache, pythonVersion, cacheDependencyPath);
@@ -102966,10 +102954,6 @@ async function run() {
102966102954
if (cache && isCacheFeatureAvailable()) {
102967102955
await cacheDependencies(cache, pythonVersion);
102968102956
}
102969-
const pipInstall = getInput('pip-install');
102970-
if (pipInstall) {
102971-
await installPipPackages(pipInstall);
102972-
}
102973102957
}
102974102958
else {
102975102959
warning('The `python-version` input is not set. The version of Python currently in `PATH` will be used.');
Collapse file

‎docs/advanced-usage.md‎

Copy file name to clipboardExpand all lines: docs/advanced-usage.md
-20Lines changed: 0 additions & 20 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
- [Using `setup-python` on GHES](advanced-usage.md#using-setup-python-on-ghes)
2424
- [Allow pre-releases](advanced-usage.md#allow-pre-releases)
2525
- [Using the pip-version input](advanced-usage.md#using-the-pip-version-input)
26-
- [Using the pip-install input](advanced-usage.md#using-the-pip-install-input)
2726

2827
## Using the `python-version` input
2928

@@ -673,22 +672,3 @@ The version of Pip should be specified in the format `major`, `major.minor`, or
673672
> The `pip-version` input is supported only with standard Python versions. It is not available when using PyPy or GraalPy.
674673

675674
> Using a specific or outdated version of pip may result in compatibility or security issues and can cause job failures. For best practices and guidance, refer to the official [pip documentation](https://pip.pypa.io/en/stable/).
676-
677-
## Using the pip-install input
678-
679-
The `pip-install` input allows you to install dependencies as part of the Python setup step.
680-
681-
682-
```yaml
683-
steps:
684-
- uses: actions/checkout@v6
685-
- name: Set up Python
686-
uses: actions/setup-python@v6
687-
with:
688-
python-version: '3.13'
689-
pip-install: -r requirements.txt
690-
```
691-
> Note: This feature is intended for standard pip-based dependency installations.
692-
For complex workflows, or alternative package managers (e.g., poetry, pipenv), we recommend using separate steps to maintain clarity and flexibility.
693-
694-
> The `pip-install` input mirrors the flexibility of a standard pip install command and supports most of its arguments.
Collapse file

‎src/setup-python.ts‎

Copy file name to clipboardExpand all lines: src/setup-python.ts
-18Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
getVersionInputFromFile,
1515
getVersionsInputFromPlainFile
1616
} from './utils.js';
17-
import {exec} from '@actions/exec';
1817

1918
function isPyPyVersion(versionSpec: string) {
2019
return versionSpec.startsWith('pypy');
@@ -24,19 +23,6 @@ function isGraalPyVersion(versionSpec: string) {
2423
return versionSpec.startsWith('graalpy');
2524
}
2625

27-
async function installPipPackages(pipInstall: string) {
28-
core.info(`Installing pip packages: ${pipInstall}`);
29-
try {
30-
const installArgs = pipInstall.trim().split(/\s+/);
31-
await exec('python', ['-m', 'pip', 'install', ...installArgs]);
32-
core.info('Successfully installed pip packages');
33-
} catch {
34-
core.setFailed(
35-
`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.`
36-
);
37-
}
38-
}
39-
4026
async function cacheDependencies(cache: string, pythonVersion: string) {
4127
const cacheDependencyPath =
4228
core.getInput('cache-dependency-path') || undefined;
@@ -160,10 +146,6 @@ async function run() {
160146
if (cache && isCacheFeatureAvailable()) {
161147
await cacheDependencies(cache, pythonVersion);
162148
}
163-
const pipInstall = core.getInput('pip-install');
164-
if (pipInstall) {
165-
await installPipPackages(pipInstall);
166-
}
167149
} else {
168150
core.warning(
169151
'The `python-version` input is not set. The version of Python currently in `PATH` will be used.'

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.