From 7469b5436f0584ad06ceb6bafb3150830a5f9027 Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Fri, 6 Jun 2025 18:39:01 +0530 Subject: [PATCH 01/17] logic to update install oath with --user flg --- dist/setup/index.js | 27 +++++++++++++++++++++++---- src/find-python.ts | 31 +++++++++++++++++++++++++------ 2 files changed, 48 insertions(+), 10 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index 4e3f2673..fd3d14a3 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -96164,13 +96164,32 @@ function useCpythonVersion(version, architecture, updateEnvironment, checkLatest core.addPath(installDir); core.addPath(_binDir); if (utils_1.IS_WINDOWS) { - // Add --user directory - // `installDir` from tool cache should look like $RUNNER_TOOL_CACHE/Python//x64/ - // So if `findLocalTool` succeeded above, we must have a conformant `installDir` + // Extract version details const version = path.basename(path.dirname(installDir)); const major = semver.major(version); const minor = semver.minor(version); - const userScriptsDir = path.join(process.env['APPDATA'] || '', 'Python', `Python${major}${minor}`, 'Scripts'); + const basePath = process.env['APPDATA'] || ''; + let versionSuffix = `${major}${minor}`; + // Append '-32' for x86 architecture if Python version is >= 3.10 + if (architecture === 'x86' && + (major > 3 || (major === 3 && minor >= 10))) { + versionSuffix += '-32'; + } + else if (architecture === 'arm64') { + versionSuffix += '-arm64'; + } + // Append 't' for freethreaded builds + if (freethreaded) { + versionSuffix += 't'; + if (architecture === 'x86-freethreaded') { + versionSuffix += '-32'; + } + else if (architecture === 'arm64-freethreaded') { + versionSuffix += '-arm64'; + } + } + // Add user Scripts path + const userScriptsDir = path.join(basePath, 'Python', `Python${versionSuffix}`, 'Scripts'); core.addPath(userScriptsDir); } // On Linux and macOS, pip will create the --user directory and add it to PATH as needed. diff --git a/src/find-python.ts b/src/find-python.ts index ddb027cb..2e317d9c 100644 --- a/src/find-python.ts +++ b/src/find-python.ts @@ -49,8 +49,8 @@ export async function useCpythonVersion( // Use the freethreaded version if it was specified in the input, e.g., 3.13t freethreaded = true; } - core.debug(`Semantic version spec of ${version} is ${semanticVersionSpec}`); + core.debug(`Semantic version spec of ${version} is ${semanticVersionSpec}`); if (freethreaded) { // Free threaded versions use an architecture suffix like `x64-freethreaded` core.debug(`Using freethreaded version of ${semanticVersionSpec}`); @@ -152,17 +152,36 @@ export async function useCpythonVersion( core.addPath(_binDir); if (IS_WINDOWS) { - // Add --user directory - // `installDir` from tool cache should look like $RUNNER_TOOL_CACHE/Python//x64/ - // So if `findLocalTool` succeeded above, we must have a conformant `installDir` + // Extract version details const version = path.basename(path.dirname(installDir)); const major = semver.major(version); const minor = semver.minor(version); + const basePath = process.env['APPDATA'] || ''; + let versionSuffix = `${major}${minor}`; + // Append '-32' for x86 architecture if Python version is >= 3.10 + if ( + architecture === 'x86' && + (major > 3 || (major === 3 && minor >= 10)) + ) { + versionSuffix += '-32'; + } else if (architecture === 'arm64') { + versionSuffix += '-arm64'; + } + // Append 't' for freethreaded builds + if (freethreaded) { + versionSuffix += 't'; + if (architecture === 'x86-freethreaded') { + versionSuffix += '-32'; + } else if (architecture === 'arm64-freethreaded') { + versionSuffix += '-arm64'; + } + } + // Add user Scripts path const userScriptsDir = path.join( - process.env['APPDATA'] || '', + basePath, 'Python', - `Python${major}${minor}`, + `Python${versionSuffix}`, 'Scripts' ); core.addPath(userScriptsDir); From 2e54943954f660f87e08d487bd6fcb3aa5556750 Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Fri, 6 Jun 2025 18:51:53 +0530 Subject: [PATCH 02/17] format update --- __tests__/verify_windows_install_path_user.py | 43 +++++++++++++++++++ dist/setup/index.js | 3 +- src/find-python.ts | 5 +-- 3 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 __tests__/verify_windows_install_path_user.py diff --git a/__tests__/verify_windows_install_path_user.py b/__tests__/verify_windows_install_path_user.py new file mode 100644 index 00000000..9ee8eb36 --- /dev/null +++ b/__tests__/verify_windows_install_path_user.py @@ -0,0 +1,43 @@ +import os +import sys + +def build_expected_path(architecture, freethreaded): + major = 3 + minor = 13 + version_suffix = f"{major}{minor}" + + if architecture == "x86" and (major > 3 or (major == 3 and minor >= 10)): + version_suffix += "-32" + elif architecture == "arm64": + version_suffix += "-arm64" + + if freethreaded == "true": + version_suffix += "t" + if architecture == "x86": + version_suffix += "-32" + elif architecture == "arm64": + version_suffix += "-arm64" + + base_path = os.getenv("APPDATA", "") + return os.path.join(base_path, "Python", f"Python{version_suffix}", "Scripts") + +def main(): + if len(sys.argv) != 3: + print("Usage: python verify_windows_install_path.py ") + sys.exit(1) + + architecture = sys.argv[1] + freethreaded = sys.argv[2] + + expected_path = build_expected_path(architecture, freethreaded) + print(f"Expected PATH entry: {expected_path}") + + path_env = os.getenv("PATH", "") + if expected_path.lower() not in path_env.lower(): + print("Expected path not found in PATH") + sys.exit(1) + else: + print("Correct path present in PATH") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/dist/setup/index.js b/dist/setup/index.js index fd3d14a3..491c85a8 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -96171,8 +96171,7 @@ function useCpythonVersion(version, architecture, updateEnvironment, checkLatest const basePath = process.env['APPDATA'] || ''; let versionSuffix = `${major}${minor}`; // Append '-32' for x86 architecture if Python version is >= 3.10 - if (architecture === 'x86' && - (major > 3 || (major === 3 && minor >= 10))) { + if (architecture === 'x86' && (major > 3 || (major === 3 && minor >= 10))) { versionSuffix += '-32'; } else if (architecture === 'arm64') { diff --git a/src/find-python.ts b/src/find-python.ts index 2e317d9c..58ec4347 100644 --- a/src/find-python.ts +++ b/src/find-python.ts @@ -160,10 +160,7 @@ export async function useCpythonVersion( const basePath = process.env['APPDATA'] || ''; let versionSuffix = `${major}${minor}`; // Append '-32' for x86 architecture if Python version is >= 3.10 - if ( - architecture === 'x86' && - (major > 3 || (major === 3 && minor >= 10)) - ) { + if (architecture === 'x86' && (major > 3 || (major === 3 && minor >= 10))){ versionSuffix += '-32'; } else if (architecture === 'arm64') { versionSuffix += '-arm64'; From 4c7c4b45a87b4469af18ce299b169f990f5d42f0 Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Fri, 6 Jun 2025 18:54:18 +0530 Subject: [PATCH 03/17] format update --- dist/setup/index.js | 3 ++- src/find-python.ts | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index 491c85a8..fd3d14a3 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -96171,7 +96171,8 @@ function useCpythonVersion(version, architecture, updateEnvironment, checkLatest const basePath = process.env['APPDATA'] || ''; let versionSuffix = `${major}${minor}`; // Append '-32' for x86 architecture if Python version is >= 3.10 - if (architecture === 'x86' && (major > 3 || (major === 3 && minor >= 10))) { + if (architecture === 'x86' && + (major > 3 || (major === 3 && minor >= 10))) { versionSuffix += '-32'; } else if (architecture === 'arm64') { diff --git a/src/find-python.ts b/src/find-python.ts index 58ec4347..2e317d9c 100644 --- a/src/find-python.ts +++ b/src/find-python.ts @@ -160,7 +160,10 @@ export async function useCpythonVersion( const basePath = process.env['APPDATA'] || ''; let versionSuffix = `${major}${minor}`; // Append '-32' for x86 architecture if Python version is >= 3.10 - if (architecture === 'x86' && (major > 3 || (major === 3 && minor >= 10))){ + if ( + architecture === 'x86' && + (major > 3 || (major === 3 && minor >= 10)) + ) { versionSuffix += '-32'; } else if (architecture === 'arm64') { versionSuffix += '-arm64'; From c25a6bd95d636e80b29451ea3e8efefd9f6ee71f Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Tue, 10 Jun 2025 18:47:49 +0530 Subject: [PATCH 04/17] update --- .github/workflows/e2e-tests.yml | 51 ++++++++++++++++++- __tests__/verify_windows_install_path_user.py | 21 +++++--- 2 files changed, 63 insertions(+), 9 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index fa478ac6..95f764e4 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -38,7 +38,7 @@ jobs: - name: Verify 3.9.13 run: python __tests__/verify-python.py 3.9.13 - - name: Run with setup-python 3.9.13 + - name: Run with setup-python 3.10.11 uses: ./ with: python-version: 3.10.11 @@ -89,7 +89,56 @@ jobs: python-version: '<3.13' - name: Verify <3.13 run: python __tests__/verify-python.py 3.12 + - name: Test Raw Endpoint Access run: | curl -L https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json | jq empty shell: bash + + verify-install-path: + name: Verify Install Path + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-11-arm] + architecture: [x86, arm64] + python-version: ['3.11', '3.12', '3.13.1', '3.14.0-beta.2'] + freethreaded: ['false'] + include: + - os: windows-11-arm + architecture: x86 + python-version: '3.13.1' + freethreaded: true + - os: windows-11-arm + architecture: arm64 + python-version: '3.13.1' + freethreaded: true + - os: windows-11-arm + architecture: x86 + python-version: '3.14.0-beta.2' + freethreaded: true + - os: windows-11-arm + architecture: arm64 + python-version: '3.14.0-beta.2' + freethreaded: true + - os: windows-latest + architecture: x86 + python-version: '3.10' + freethreaded: false + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: ./ + with: + python-version: ${{ matrix.python-version }} + architecture: ${{ matrix.architecture }} + freethreaded: ${{ matrix.freethreaded }} + + - name: Verify Install Path + shell: pwsh + run: python __tests__/verify-windows-install-path.py ` + -arch ${{ matrix.architecture }} ` + -freethreaded ${{ matrix.freethreaded }} \ No newline at end of file diff --git a/__tests__/verify_windows_install_path_user.py b/__tests__/verify_windows_install_path_user.py index 9ee8eb36..df539f99 100644 --- a/__tests__/verify_windows_install_path_user.py +++ b/__tests__/verify_windows_install_path_user.py @@ -1,9 +1,7 @@ import os import sys -def build_expected_path(architecture, freethreaded): - major = 3 - minor = 13 +def build_expected_path(architecture, freethreaded, major, minor): version_suffix = f"{major}{minor}" if architecture == "x86" and (major > 3 or (major == 3 and minor >= 10)): @@ -22,14 +20,20 @@ def build_expected_path(architecture, freethreaded): return os.path.join(base_path, "Python", f"Python{version_suffix}", "Scripts") def main(): - if len(sys.argv) != 3: - print("Usage: python verify_windows_install_path.py ") + # Expecting: -arch -freethreaded + if len(sys.argv) != 5: + print("Usage: python verify-windows-install-path.py -arch -freethreaded ") sys.exit(1) - architecture = sys.argv[1] - freethreaded = sys.argv[2] + args = dict(zip(sys.argv[1::2], sys.argv[2::2])) + architecture = args.get('-arch') + freethreaded = args.get('-freethreaded') - expected_path = build_expected_path(architecture, freethreaded) + # Get major and minor version from current Python + major = sys.version_info.major + minor = sys.version_info.minor + + expected_path = build_expected_path(architecture, freethreaded, major, minor) print(f"Expected PATH entry: {expected_path}") path_env = os.getenv("PATH", "") @@ -38,6 +42,7 @@ def main(): sys.exit(1) else: print("Correct path present in PATH") + print(f"Verified path: {expected_path}") if __name__ == "__main__": main() \ No newline at end of file From a49e508555b8513d77098866bbbae1ade47afee1 Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Wed, 11 Jun 2025 19:10:59 +0530 Subject: [PATCH 05/17] test job to validate --user flag installtion --- .github/workflows/e2e-tests.yml | 6 +++--- __tests__/verify_windows_install_path_user.py | 21 +++++++------------ 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 95f764e4..77671c39 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -139,6 +139,6 @@ jobs: - name: Verify Install Path shell: pwsh - run: python __tests__/verify-windows-install-path.py ` - -arch ${{ matrix.architecture }} ` - -freethreaded ${{ matrix.freethreaded }} \ No newline at end of file + run: python __tests__/verify-windows-install-path.py `` + -arch ${{ matrix.architecture }} ` + -freethreaded ${{ matrix.freethreaded }} ` diff --git a/__tests__/verify_windows_install_path_user.py b/__tests__/verify_windows_install_path_user.py index df539f99..9ee8eb36 100644 --- a/__tests__/verify_windows_install_path_user.py +++ b/__tests__/verify_windows_install_path_user.py @@ -1,7 +1,9 @@ import os import sys -def build_expected_path(architecture, freethreaded, major, minor): +def build_expected_path(architecture, freethreaded): + major = 3 + minor = 13 version_suffix = f"{major}{minor}" if architecture == "x86" and (major > 3 or (major == 3 and minor >= 10)): @@ -20,20 +22,14 @@ def build_expected_path(architecture, freethreaded, major, minor): return os.path.join(base_path, "Python", f"Python{version_suffix}", "Scripts") def main(): - # Expecting: -arch -freethreaded - if len(sys.argv) != 5: - print("Usage: python verify-windows-install-path.py -arch -freethreaded ") + if len(sys.argv) != 3: + print("Usage: python verify_windows_install_path.py ") sys.exit(1) - args = dict(zip(sys.argv[1::2], sys.argv[2::2])) - architecture = args.get('-arch') - freethreaded = args.get('-freethreaded') + architecture = sys.argv[1] + freethreaded = sys.argv[2] - # Get major and minor version from current Python - major = sys.version_info.major - minor = sys.version_info.minor - - expected_path = build_expected_path(architecture, freethreaded, major, minor) + expected_path = build_expected_path(architecture, freethreaded) print(f"Expected PATH entry: {expected_path}") path_env = os.getenv("PATH", "") @@ -42,7 +38,6 @@ def main(): sys.exit(1) else: print("Correct path present in PATH") - print(f"Verified path: {expected_path}") if __name__ == "__main__": main() \ No newline at end of file From ec0fcb0341d1906000f840dd9f4b15df879bcf20 Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Thu, 12 Jun 2025 11:54:26 +0530 Subject: [PATCH 06/17] updated the script --- .github/workflows/e2e-tests.yml | 9 ++--- __tests__/verify_windows_install_path_user.py | 33 +++++++++++-------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 77671c39..cb63e9b3 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -136,9 +136,10 @@ jobs: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.architecture }} freethreaded: ${{ matrix.freethreaded }} - - name: Verify Install Path shell: pwsh - run: python __tests__/verify-windows-install-path.py `` - -arch ${{ matrix.architecture }} ` - -freethreaded ${{ matrix.freethreaded }} ` + run: | + python __tests__/verify-windows-install-path.py ` + ${{ matrix.python-version }} ` + ${{ matrix.architecture }} ` + ${{ matrix.freethreaded }} diff --git a/__tests__/verify_windows_install_path_user.py b/__tests__/verify_windows_install_path_user.py index 9ee8eb36..c0f65c8b 100644 --- a/__tests__/verify_windows_install_path_user.py +++ b/__tests__/verify_windows_install_path_user.py @@ -1,35 +1,42 @@ import os import sys +import re -def build_expected_path(architecture, freethreaded): - major = 3 - minor = 13 +def build_expected_path(python_version, architecture, freethreaded): + # Extract major and minor from full version like "3.13.1" or "3.14.0-beta.2" + match = re.match(r"^(\d+)\.(\d+)", python_version) + if not match: + print(f"Invalid python version format: {python_version}") + sys.exit(1) + + major, minor = match.groups() version_suffix = f"{major}{minor}" - if architecture == "x86" and (major > 3 or (major == 3 and minor >= 10)): - version_suffix += "-32" - elif architecture == "arm64": - version_suffix += "-arm64" - if freethreaded == "true": version_suffix += "t" if architecture == "x86": version_suffix += "-32" elif architecture == "arm64": version_suffix += "-arm64" + else: + if architecture == "x86": + version_suffix += "-32" + elif architecture == "arm64": + version_suffix += "-arm64" base_path = os.getenv("APPDATA", "") return os.path.join(base_path, "Python", f"Python{version_suffix}", "Scripts") def main(): - if len(sys.argv) != 3: - print("Usage: python verify_windows_install_path.py ") + if len(sys.argv) != 4: + print("Usage: python verify_windows_install_path.py ") sys.exit(1) - architecture = sys.argv[1] - freethreaded = sys.argv[2] + python_version = sys.argv[1] + architecture = sys.argv[2] + freethreaded = sys.argv[3] - expected_path = build_expected_path(architecture, freethreaded) + expected_path = build_expected_path(python_version, architecture, freethreaded) print(f"Expected PATH entry: {expected_path}") path_env = os.getenv("PATH", "") From b3771251ebc0c695defc6f878c790b1555cdf7b7 Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Thu, 12 Jun 2025 12:00:17 +0530 Subject: [PATCH 07/17] updated the yaml --- .github/workflows/e2e-tests.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index cb63e9b3..1244ab5c 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -138,8 +138,7 @@ jobs: freethreaded: ${{ matrix.freethreaded }} - name: Verify Install Path shell: pwsh - run: | - python __tests__/verify-windows-install-path.py ` - ${{ matrix.python-version }} ` - ${{ matrix.architecture }} ` - ${{ matrix.freethreaded }} + run: python __tests__/verify-windows-install-path.py ` + -arch ${{ matrix.architecture }} ` + -freethreaded ${{ matrix.freethreaded }} ` + -version ${{ matrix.python-version }} From 5b5760d9678d0123f195d072a0693cf3c1beaacc Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Thu, 12 Jun 2025 13:35:37 +0530 Subject: [PATCH 08/17] update the inputs --- .github/workflows/e2e-tests.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 1244ab5c..9b94893b 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -136,9 +136,10 @@ jobs: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.architecture }} freethreaded: ${{ matrix.freethreaded }} + - name: Verify Install Path shell: pwsh run: python __tests__/verify-windows-install-path.py ` - -arch ${{ matrix.architecture }} ` - -freethreaded ${{ matrix.freethreaded }} ` - -version ${{ matrix.python-version }} + ${{ matrix.python-version }} ` + ${{ matrix.architecture }} ` + ${{ matrix.freethreaded }} From 9fee7449e605fce14084cd41f9b4a7bc3f874edc Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Fri, 13 Jun 2025 17:15:00 +0530 Subject: [PATCH 09/17] updated script --- __tests__/verify_windows_install_path_user.py | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/__tests__/verify_windows_install_path_user.py b/__tests__/verify_windows_install_path_user.py index c0f65c8b..46bf7883 100644 --- a/__tests__/verify_windows_install_path_user.py +++ b/__tests__/verify_windows_install_path_user.py @@ -3,7 +3,12 @@ import sys import re def build_expected_path(python_version, architecture, freethreaded): - # Extract major and minor from full version like "3.13.1" or "3.14.0-beta.2" + print("Inputs received:") + print(f" Python Version : {python_version}") + print(f" Architecture : {architecture}") + print(f" Freethreaded : {freethreaded}") + + # Extract major and minor from version like "3.13.1" or "3.14.0-beta.2" match = re.match(r"^(\d+)\.(\d+)", python_version) if not match: print(f"Invalid python version format: {python_version}") @@ -25,7 +30,9 @@ def build_expected_path(python_version, architecture, freethreaded): version_suffix += "-arm64" base_path = os.getenv("APPDATA", "") - return os.path.join(base_path, "Python", f"Python{version_suffix}", "Scripts") + full_path = os.path.join(base_path, "Python", f"Python{version_suffix}", "Scripts") + print(f"Constructed expected path: {full_path}") + return full_path def main(): if len(sys.argv) != 4: @@ -37,14 +44,14 @@ def main(): freethreaded = sys.argv[3] expected_path = build_expected_path(python_version, architecture, freethreaded) - print(f"Expected PATH entry: {expected_path}") + print("Validating against PATH environment variable...") path_env = os.getenv("PATH", "") - if expected_path.lower() not in path_env.lower(): + if expected_path.lower() in path_env.lower(): + print("Correct path present in PATH") + else: print("Expected path not found in PATH") sys.exit(1) - else: - print("Correct path present in PATH") if __name__ == "__main__": - main() \ No newline at end of file + main() From afa8c7e382d6ac498c8c643f0fe9f1de3962fb0a Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Fri, 13 Jun 2025 18:05:19 +0530 Subject: [PATCH 10/17] update the correct script file name --- .github/workflows/e2e-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 9b94893b..5bc06fb7 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -139,7 +139,7 @@ jobs: - name: Verify Install Path shell: pwsh - run: python __tests__/verify-windows-install-path.py ` + run: python __tests__/verify-windows-install-path_user.py ` ${{ matrix.python-version }} ` ${{ matrix.architecture }} ` ${{ matrix.freethreaded }} From 31046cc0c3f5fc3f213268f814b20d6ca69bfe6f Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Fri, 13 Jun 2025 19:21:00 +0530 Subject: [PATCH 11/17] updated script and yaml --- .github/workflows/e2e-tests.yml | 6 +++--- __tests__/verify_windows_install_path_user.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 5bc06fb7..6985938f 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -95,7 +95,7 @@ jobs: curl -L https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json | jq empty shell: bash - verify-install-path: + verify-install-path: name: Verify Install Path runs-on: ${{ matrix.os }} strategy: @@ -139,7 +139,7 @@ jobs: - name: Verify Install Path shell: pwsh - run: python __tests__/verify-windows-install-path_user.py ` + run: python __tests__/verify-windows-install-path.py ` ${{ matrix.python-version }} ` ${{ matrix.architecture }} ` - ${{ matrix.freethreaded }} + ${{ matrix.freethreaded }} \ No newline at end of file diff --git a/__tests__/verify_windows_install_path_user.py b/__tests__/verify_windows_install_path_user.py index 46bf7883..f97de924 100644 --- a/__tests__/verify_windows_install_path_user.py +++ b/__tests__/verify_windows_install_path_user.py @@ -54,4 +54,4 @@ def main(): sys.exit(1) if __name__ == "__main__": - main() + main() \ No newline at end of file From 17ae4807f30274c99c75927ef05fcb5bb38bd9bb Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Fri, 13 Jun 2025 19:27:34 +0530 Subject: [PATCH 12/17] npm run format-check --- .github/workflows/e2e-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 6985938f..012cda32 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -95,7 +95,7 @@ jobs: curl -L https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json | jq empty shell: bash - verify-install-path: + verify-install-path: name: Verify Install Path runs-on: ${{ matrix.os }} strategy: From 58a13b5975e8381abeb27779b138d80eb3d2948e Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Tue, 17 Jun 2025 14:13:01 +0530 Subject: [PATCH 13/17] fix-test failures --- .github/workflows/e2e-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 012cda32..9b94893b 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -142,4 +142,4 @@ jobs: run: python __tests__/verify-windows-install-path.py ` ${{ matrix.python-version }} ` ${{ matrix.architecture }} ` - ${{ matrix.freethreaded }} \ No newline at end of file + ${{ matrix.freethreaded }} From 4e8e48ae6782102cf3ddb6c7e7c60e5954666382 Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Tue, 17 Jun 2025 14:19:58 +0530 Subject: [PATCH 14/17] path update --- .github/workflows/e2e-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 9b94893b..95e2858c 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -139,7 +139,7 @@ jobs: - name: Verify Install Path shell: pwsh - run: python __tests__/verify-windows-install-path.py ` + run: python ./__tests__/verify-windows-install-path.py ` ${{ matrix.python-version }} ` ${{ matrix.architecture }} ` ${{ matrix.freethreaded }} From 99c37bc0b230068d6210759a611f29346023555d Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Tue, 17 Jun 2025 14:42:25 +0530 Subject: [PATCH 15/17] check failure fix --- .github/workflows/e2e-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 95e2858c..0a34aca9 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -139,7 +139,7 @@ jobs: - name: Verify Install Path shell: pwsh - run: python ./__tests__/verify-windows-install-path.py ` + run: python __tests__/verify_windows_install_path_user.py ` ${{ matrix.python-version }} ` ${{ matrix.architecture }} ` ${{ matrix.freethreaded }} From 512e05768d882e8cbf859bc07ec31eaddeb2965f Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Fri, 20 Jun 2025 18:33:14 +0530 Subject: [PATCH 16/17] updated test --- .github/workflows/e2e-tests.yml | 49 ---------------- __tests__/verify_windows_install_path_user.py | 57 ------------------- 2 files changed, 106 deletions(-) delete mode 100644 __tests__/verify_windows_install_path_user.py diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 0a34aca9..57c7851e 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -94,52 +94,3 @@ jobs: run: | curl -L https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json | jq empty shell: bash - - verify-install-path: - name: Verify Install Path - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [windows-11-arm] - architecture: [x86, arm64] - python-version: ['3.11', '3.12', '3.13.1', '3.14.0-beta.2'] - freethreaded: ['false'] - include: - - os: windows-11-arm - architecture: x86 - python-version: '3.13.1' - freethreaded: true - - os: windows-11-arm - architecture: arm64 - python-version: '3.13.1' - freethreaded: true - - os: windows-11-arm - architecture: x86 - python-version: '3.14.0-beta.2' - freethreaded: true - - os: windows-11-arm - architecture: arm64 - python-version: '3.14.0-beta.2' - freethreaded: true - - os: windows-latest - architecture: x86 - python-version: '3.10' - freethreaded: false - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Python - uses: ./ - with: - python-version: ${{ matrix.python-version }} - architecture: ${{ matrix.architecture }} - freethreaded: ${{ matrix.freethreaded }} - - - name: Verify Install Path - shell: pwsh - run: python __tests__/verify_windows_install_path_user.py ` - ${{ matrix.python-version }} ` - ${{ matrix.architecture }} ` - ${{ matrix.freethreaded }} diff --git a/__tests__/verify_windows_install_path_user.py b/__tests__/verify_windows_install_path_user.py deleted file mode 100644 index f97de924..00000000 --- a/__tests__/verify_windows_install_path_user.py +++ /dev/null @@ -1,57 +0,0 @@ -import os -import sys -import re - -def build_expected_path(python_version, architecture, freethreaded): - print("Inputs received:") - print(f" Python Version : {python_version}") - print(f" Architecture : {architecture}") - print(f" Freethreaded : {freethreaded}") - - # Extract major and minor from version like "3.13.1" or "3.14.0-beta.2" - match = re.match(r"^(\d+)\.(\d+)", python_version) - if not match: - print(f"Invalid python version format: {python_version}") - sys.exit(1) - - major, minor = match.groups() - version_suffix = f"{major}{minor}" - - if freethreaded == "true": - version_suffix += "t" - if architecture == "x86": - version_suffix += "-32" - elif architecture == "arm64": - version_suffix += "-arm64" - else: - if architecture == "x86": - version_suffix += "-32" - elif architecture == "arm64": - version_suffix += "-arm64" - - base_path = os.getenv("APPDATA", "") - full_path = os.path.join(base_path, "Python", f"Python{version_suffix}", "Scripts") - print(f"Constructed expected path: {full_path}") - return full_path - -def main(): - if len(sys.argv) != 4: - print("Usage: python verify_windows_install_path.py ") - sys.exit(1) - - python_version = sys.argv[1] - architecture = sys.argv[2] - freethreaded = sys.argv[3] - - expected_path = build_expected_path(python_version, architecture, freethreaded) - - print("Validating against PATH environment variable...") - path_env = os.getenv("PATH", "") - if expected_path.lower() in path_env.lower(): - print("Correct path present in PATH") - else: - print("Expected path not found in PATH") - sys.exit(1) - -if __name__ == "__main__": - main() \ No newline at end of file From 12428c633200884632d69d7d5b291420f8bc13f6 Mon Sep 17 00:00:00 2001 From: Aparna Jyothi Date: Fri, 27 Jun 2025 14:52:58 +0530 Subject: [PATCH 17/17] update free threaded version --- .github/workflows/e2e-cache-freethreaded.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-cache-freethreaded.yml b/.github/workflows/e2e-cache-freethreaded.yml index e3b298cc..234fdc1e 100644 --- a/.github/workflows/e2e-cache-freethreaded.yml +++ b/.github/workflows/e2e-cache-freethreaded.yml @@ -58,7 +58,7 @@ jobs: macos-latest, macos-13 ] - python-version: [3.13.0t, 3.13.1t, 3.13.2t] + python-version: [3.13.1t, 3.13.2t, 3.13.5t] steps: - uses: actions/checkout@v4 - name: Setup Python @@ -148,7 +148,7 @@ jobs: macos-latest, macos-13 ] - python-version: [3.13.0t, 3.13.1t, 3.13.2t] + python-version: [3.13.1t, 3.13.2t, 3.13.5t] steps: - uses: actions/checkout@v4 - name: Setup Python