Skip to content

Ensure the correct source URL is stored with an install. #433

Ensure the correct source URL is stored with an install.

Ensure the correct source URL is stored with an install. #433

Workflow file for this run

name: 'Build and Test'
on: [push, pull_request, workflow_dispatch]
env:
COVERAGE_CORE: sysmon
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: true
PIP_NO_INPUT: true
PIP_PROGRESS_BAR: off
PIP_REQUIRE_VIRTUALENV: false
PIP_VERBOSE: true
PYMSBUILD_VERBOSE: true
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: 'Remove existing PyManager install'
run: |
# Ensure we aren't currently installed
$msix = Get-AppxPackage PythonSoftwareFoundation.PythonManager -EA SilentlyContinue
if ($msix) {
"Removing $($msix.Name)"
Remove-AppxPackage $msix
}
shell: powershell
#- name: Set up Python 3.14
# uses: actions/setup-python@v5
# with:
# python-version: 3.14-dev
# We move faster than GitHub's Python runtimes, so use NuGet instead
# One day we can use ourselves to download Python, but not yet...
- name: Set up NuGet
uses: nuget/setup-nuget@v2.0.1
- name: Set up Python 3.14.2
run: |
nuget install python -Version 3.14.2 -x -o .
$py = Get-Item python\tools
Write-Host "Adding $py to PATH"
"$py" | Out-File $env:GITHUB_PATH -Encoding UTF8 -Append
working-directory: ${{ runner.temp }}
- name: Check Python version is 3.14.2
run: >
python -c "import sys;
print(sys.version);
print(sys.executable);
sys.exit(0 if sys.version_info[:5] == (3, 14, 2, 'final', 0) else 1)"
- name: Install build dependencies
run: python -m pip install "pymsbuild>=1.2.0b1"
- name: 'Install test runner'
run: python -m pip install pytest pytest-cov
- name: 'Build test module'
run: python -m pymsbuild -c _msbuild_test.py
- name: 'Run pre-test'
shell: bash
run: |
python -m pytest -vv \
--cov src \
--cov tests \
--cov-report term \
--cov-report xml
- name: 'Upload coverage'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_ORG_TOKEN }}
- name: 'Build package'
run: python make.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Build MSIX package'
run: python make-msix.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Build MSI package'
run: python make-msi.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Register unsigned MSIX'
run: |
$msix = dir "${env:PYMSBUILD_DIST_DIR}\*.msix" `
| ?{ -not ($_.BaseName -match '.+-store') } `
| select -first 1
cp $msix "${msix}.zip"
Expand-Archive "${msix}.zip" (mkdir -Force $env:TEST_MSIX_DIR)
Add-AppxPackage -Register "${env:TEST_MSIX_DIR}\appxmanifest.xml"
Get-AppxPackage PythonSoftwareFoundation.PythonManager
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
shell: powershell
- name: 'Ensure global commands are present'
run: |
gcm pymanager
gcm pywmanager
# These are likely present due to the machine configuration,
# but we'll check for them anyway.
gcm py
gcm python
gcm pyw
gcm pythonw
- name: 'Show help output'
run: pymanager help
- name: 'Install default runtime'
run: pymanager install default
env:
PYMANAGER_DEBUG: true
- name: 'List installed runtimes'
run: pymanager list
env:
PYMANAGER_DEBUG: true
- name: 'List installed runtimes (legacy)'
run: pymanager --list-paths
env:
PYMANAGER_DEBUG: true
- name: 'Launch default runtime'
run: pymanager exec -m site
env:
PYMANAGER_DEBUG: true
- name: 'Uninstall runtime'
run: pymanager uninstall -y default
env:
PYMANAGER_DEBUG: true
- name: 'Emulate first launch'
run: |
$i = (mkdir -force test_installs)
ConvertTo-Json @{
install_dir="$i";
download_dir="$i\_cache";
global_dir="$i\_bin";
} | Out-File $env:PYTHON_MANAGER_CONFIG -Encoding utf8
pymanager install --configure -y
if ($?) { pymanager list }
env:
PYTHON_MANAGER_INCLUDE_UNMANAGED: false
PYTHON_MANAGER_CONFIG: .\test-config.json
PYMANAGER_DEBUG: true
- name: 'Validate entrypoint scripts'
run: |
$env:PYTHON_MANAGER_CONFIG = (gi $env:PYTHON_MANAGER_CONFIG).FullName
pymanager exec tests\run-eptest.py
env:
PYTHON_MANAGER_INCLUDE_UNMANAGED: false
PYTHON_MANAGER_CONFIG: .\test-config.json
PYMANAGER_DEBUG: true
shell: powershell
- name: 'Offline bundle download and install'
run: |
pymanager list --online 3 3-32 3-64 3-arm64
pymanager install --download .\bundle 3 3-32 3-64 3-arm64
pymanager list --source .\bundle
pymanager install --source .\bundle 3 3-32 3-64 3-arm64
env:
PYMANAGER_DEBUG: true
- name: 'Remove MSIX'
run: |
Get-AppxPackage PythonSoftwareFoundation.PythonManager | Remove-AppxPackage
shell: powershell
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Ensure the correct source URL is stored with an install. · python/pymanager@e6e5d83 · GitHub
Skip to content

Ensure the correct source URL is stored with an install. #433

Ensure the correct source URL is stored with an install.

Ensure the correct source URL is stored with an install. #433

Workflow file for this run

name: 'Build and Test'
on: [push, pull_request, workflow_dispatch]
env:
COVERAGE_CORE: sysmon
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: true
PIP_NO_INPUT: true
PIP_PROGRESS_BAR: off
PIP_REQUIRE_VIRTUALENV: false
PIP_VERBOSE: true
PYMSBUILD_VERBOSE: true
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: 'Remove existing PyManager install'
run: |
# Ensure we aren't currently installed
$msix = Get-AppxPackage PythonSoftwareFoundation.PythonManager -EA SilentlyContinue
if ($msix) {
"Removing $($msix.Name)"
Remove-AppxPackage $msix
}
shell: powershell
#- name: Set up Python 3.14
# uses: actions/setup-python@v5
# with:
# python-version: 3.14-dev
# We move faster than GitHub's Python runtimes, so use NuGet instead
# One day we can use ourselves to download Python, but not yet...
- name: Set up NuGet
uses: nuget/setup-nuget@v2.0.1
- name: Set up Python 3.14.2
run: |
nuget install python -Version 3.14.2 -x -o .
$py = Get-Item python\tools
Write-Host "Adding $py to PATH"
"$py" | Out-File $env:GITHUB_PATH -Encoding UTF8 -Append
working-directory: ${{ runner.temp }}
- name: Check Python version is 3.14.2
run: >
python -c "import sys;
print(sys.version);
print(sys.executable);
sys.exit(0 if sys.version_info[:5] == (3, 14, 2, 'final', 0) else 1)"
- name: Install build dependencies
run: python -m pip install "pymsbuild>=1.2.0b1"
- name: 'Install test runner'
run: python -m pip install pytest pytest-cov
- name: 'Build test module'
run: python -m pymsbuild -c _msbuild_test.py
- name: 'Run pre-test'
shell: bash
run: |
python -m pytest -vv \
--cov src \
--cov tests \
--cov-report term \
--cov-report xml
- name: 'Upload coverage'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_ORG_TOKEN }}
- name: 'Build package'
run: python make.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Build MSIX package'
run: python make-msix.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Build MSI package'
run: python make-msi.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Register unsigned MSIX'
run: |
$msix = dir "${env:PYMSBUILD_DIST_DIR}\*.msix" `
| ?{ -not ($_.BaseName -match '.+-store') } `
| select -first 1
cp $msix "${msix}.zip"
Expand-Archive "${msix}.zip" (mkdir -Force $env:TEST_MSIX_DIR)
Add-AppxPackage -Register "${env:TEST_MSIX_DIR}\appxmanifest.xml"
Get-AppxPackage PythonSoftwareFoundation.PythonManager
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
shell: powershell
- name: 'Ensure global commands are present'
run: |
gcm pymanager
gcm pywmanager
# These are likely present due to the machine configuration,
# but we'll check for them anyway.
gcm py
gcm python
gcm pyw
gcm pythonw
- name: 'Show help output'
run: pymanager help
- name: 'Install default runtime'
run: pymanager install default
env:
PYMANAGER_DEBUG: true
- name: 'List installed runtimes'
run: pymanager list
env:
PYMANAGER_DEBUG: true
- name: 'List installed runtimes (legacy)'
run: pymanager --list-paths
env:
PYMANAGER_DEBUG: true
- name: 'Launch default runtime'
run: pymanager exec -m site
env:
PYMANAGER_DEBUG: true
- name: 'Uninstall runtime'
run: pymanager uninstall -y default
env:
PYMANAGER_DEBUG: true
- name: 'Emulate first launch'
run: |
$i = (mkdir -force test_installs)
ConvertTo-Json @{
install_dir="$i";
download_dir="$i\_cache";
global_dir="$i\_bin";
} | Out-File $env:PYTHON_MANAGER_CONFIG -Encoding utf8
pymanager install --configure -y
if ($?) { pymanager list }
env:
PYTHON_MANAGER_INCLUDE_UNMANAGED: false
PYTHON_MANAGER_CONFIG: .\test-config.json
PYMANAGER_DEBUG: true
- name: 'Validate entrypoint scripts'
run: |
$env:PYTHON_MANAGER_CONFIG = (gi $env:PYTHON_MANAGER_CONFIG).FullName
pymanager exec tests\run-eptest.py
env:
PYTHON_MANAGER_INCLUDE_UNMANAGED: false
PYTHON_MANAGER_CONFIG: .\test-config.json
PYMANAGER_DEBUG: true
shell: powershell
- name: 'Offline bundle download and install'
run: |
pymanager list --online 3 3-32 3-64 3-arm64
pymanager install --download .\bundle 3 3-32 3-64 3-arm64
pymanager list --source .\bundle
pymanager install --source .\bundle 3 3-32 3-64 3-arm64
env:
PYMANAGER_DEBUG: true
- name: 'Remove MSIX'
run: |
Get-AppxPackage PythonSoftwareFoundation.PythonManager | Remove-AppxPackage
shell: powershell
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Ensure the correct source URL is stored with an install. · python/pymanager@e6e5d83 · GitHub
Skip to content

Ensure the correct source URL is stored with an install. #433

Ensure the correct source URL is stored with an install.

Ensure the correct source URL is stored with an install. #433

Workflow file for this run

name: 'Build and Test'
on: [push, pull_request, workflow_dispatch]
env:
COVERAGE_CORE: sysmon
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: true
PIP_NO_INPUT: true
PIP_PROGRESS_BAR: off
PIP_REQUIRE_VIRTUALENV: false
PIP_VERBOSE: true
PYMSBUILD_VERBOSE: true
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: 'Remove existing PyManager install'
run: |
# Ensure we aren't currently installed
$msix = Get-AppxPackage PythonSoftwareFoundation.PythonManager -EA SilentlyContinue
if ($msix) {
"Removing $($msix.Name)"
Remove-AppxPackage $msix
}
shell: powershell
#- name: Set up Python 3.14
# uses: actions/setup-python@v5
# with:
# python-version: 3.14-dev
# We move faster than GitHub's Python runtimes, so use NuGet instead
# One day we can use ourselves to download Python, but not yet...
- name: Set up NuGet
uses: nuget/setup-nuget@v2.0.1
- name: Set up Python 3.14.2
run: |
nuget install python -Version 3.14.2 -x -o .
$py = Get-Item python\tools
Write-Host "Adding $py to PATH"
"$py" | Out-File $env:GITHUB_PATH -Encoding UTF8 -Append
working-directory: ${{ runner.temp }}
- name: Check Python version is 3.14.2
run: >
python -c "import sys;
print(sys.version);
print(sys.executable);
sys.exit(0 if sys.version_info[:5] == (3, 14, 2, 'final', 0) else 1)"
- name: Install build dependencies
run: python -m pip install "pymsbuild>=1.2.0b1"
- name: 'Install test runner'
run: python -m pip install pytest pytest-cov
- name: 'Build test module'
run: python -m pymsbuild -c _msbuild_test.py
- name: 'Run pre-test'
shell: bash
run: |
python -m pytest -vv \
--cov src \
--cov tests \
--cov-report term \
--cov-report xml
- name: 'Upload coverage'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_ORG_TOKEN }}
- name: 'Build package'
run: python make.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Build MSIX package'
run: python make-msix.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Build MSI package'
run: python make-msi.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Register unsigned MSIX'
run: |
$msix = dir "${env:PYMSBUILD_DIST_DIR}\*.msix" `
| ?{ -not ($_.BaseName -match '.+-store') } `
| select -first 1
cp $msix "${msix}.zip"
Expand-Archive "${msix}.zip" (mkdir -Force $env:TEST_MSIX_DIR)
Add-AppxPackage -Register "${env:TEST_MSIX_DIR}\appxmanifest.xml"
Get-AppxPackage PythonSoftwareFoundation.PythonManager
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
shell: powershell
- name: 'Ensure global commands are present'
run: |
gcm pymanager
gcm pywmanager
# These are likely present due to the machine configuration,
# but we'll check for them anyway.
gcm py
gcm python
gcm pyw
gcm pythonw
- name: 'Show help output'
run: pymanager help
- name: 'Install default runtime'
run: pymanager install default
env:
PYMANAGER_DEBUG: true
- name: 'List installed runtimes'
run: pymanager list
env:
PYMANAGER_DEBUG: true
- name: 'List installed runtimes (legacy)'
run: pymanager --list-paths
env:
PYMANAGER_DEBUG: true
- name: 'Launch default runtime'
run: pymanager exec -m site
env:
PYMANAGER_DEBUG: true
- name: 'Uninstall runtime'
run: pymanager uninstall -y default
env:
PYMANAGER_DEBUG: true
- name: 'Emulate first launch'
run: |
$i = (mkdir -force test_installs)
ConvertTo-Json @{
install_dir="$i";
download_dir="$i\_cache";
global_dir="$i\_bin";
} | Out-File $env:PYTHON_MANAGER_CONFIG -Encoding utf8
pymanager install --configure -y
if ($?) { pymanager list }
env:
PYTHON_MANAGER_INCLUDE_UNMANAGED: false
PYTHON_MANAGER_CONFIG: .\test-config.json
PYMANAGER_DEBUG: true
- name: 'Validate entrypoint scripts'
run: |
$env:PYTHON_MANAGER_CONFIG = (gi $env:PYTHON_MANAGER_CONFIG).FullName
pymanager exec tests\run-eptest.py
env:
PYTHON_MANAGER_INCLUDE_UNMANAGED: false
PYTHON_MANAGER_CONFIG: .\test-config.json
PYMANAGER_DEBUG: true
shell: powershell
- name: 'Offline bundle download and install'
run: |
pymanager list --online 3 3-32 3-64 3-arm64
pymanager install --download .\bundle 3 3-32 3-64 3-arm64
pymanager list --source .\bundle
pymanager install --source .\bundle 3 3-32 3-64 3-arm64
env:
PYMANAGER_DEBUG: true
- name: 'Remove MSIX'
run: |
Get-AppxPackage PythonSoftwareFoundation.PythonManager | Remove-AppxPackage
shell: powershell
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Ensure the correct source URL is stored with an install. · python/pymanager@e6e5d83 · GitHub
Skip to content

Ensure the correct source URL is stored with an install. #433

Ensure the correct source URL is stored with an install.

Ensure the correct source URL is stored with an install. #433

Workflow file for this run

name: 'Build and Test'
on: [push, pull_request, workflow_dispatch]
env:
COVERAGE_CORE: sysmon
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: true
PIP_NO_INPUT: true
PIP_PROGRESS_BAR: off
PIP_REQUIRE_VIRTUALENV: false
PIP_VERBOSE: true
PYMSBUILD_VERBOSE: true
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: 'Remove existing PyManager install'
run: |
# Ensure we aren't currently installed
$msix = Get-AppxPackage PythonSoftwareFoundation.PythonManager -EA SilentlyContinue
if ($msix) {
"Removing $($msix.Name)"
Remove-AppxPackage $msix
}
shell: powershell
#- name: Set up Python 3.14
# uses: actions/setup-python@v5
# with:
# python-version: 3.14-dev
# We move faster than GitHub's Python runtimes, so use NuGet instead
# One day we can use ourselves to download Python, but not yet...
- name: Set up NuGet
uses: nuget/setup-nuget@v2.0.1
- name: Set up Python 3.14.2
run: |
nuget install python -Version 3.14.2 -x -o .
$py = Get-Item python\tools
Write-Host "Adding $py to PATH"
"$py" | Out-File $env:GITHUB_PATH -Encoding UTF8 -Append
working-directory: ${{ runner.temp }}
- name: Check Python version is 3.14.2
run: >
python -c "import sys;
print(sys.version);
print(sys.executable);
sys.exit(0 if sys.version_info[:5] == (3, 14, 2, 'final', 0) else 1)"
- name: Install build dependencies
run: python -m pip install "pymsbuild>=1.2.0b1"
- name: 'Install test runner'
run: python -m pip install pytest pytest-cov
- name: 'Build test module'
run: python -m pymsbuild -c _msbuild_test.py
- name: 'Run pre-test'
shell: bash
run: |
python -m pytest -vv \
--cov src \
--cov tests \
--cov-report term \
--cov-report xml
- name: 'Upload coverage'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_ORG_TOKEN }}
- name: 'Build package'
run: python make.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Build MSIX package'
run: python make-msix.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Build MSI package'
run: python make-msi.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Register unsigned MSIX'
run: |
$msix = dir "${env:PYMSBUILD_DIST_DIR}\*.msix" `
| ?{ -not ($_.BaseName -match '.+-store') } `
| select -first 1
cp $msix "${msix}.zip"
Expand-Archive "${msix}.zip" (mkdir -Force $env:TEST_MSIX_DIR)
Add-AppxPackage -Register "${env:TEST_MSIX_DIR}\appxmanifest.xml"
Get-AppxPackage PythonSoftwareFoundation.PythonManager
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
shell: powershell
- name: 'Ensure global commands are present'
run: |
gcm pymanager
gcm pywmanager
# These are likely present due to the machine configuration,
# but we'll check for them anyway.
gcm py
gcm python
gcm pyw
gcm pythonw
- name: 'Show help output'
run: pymanager help
- name: 'Install default runtime'
run: pymanager install default
env:
PYMANAGER_DEBUG: true
- name: 'List installed runtimes'
run: pymanager list
env:
PYMANAGER_DEBUG: true
- name: 'List installed runtimes (legacy)'
run: pymanager --list-paths
env:
PYMANAGER_DEBUG: true
- name: 'Launch default runtime'
run: pymanager exec -m site
env:
PYMANAGER_DEBUG: true
- name: 'Uninstall runtime'
run: pymanager uninstall -y default
env:
PYMANAGER_DEBUG: true
- name: 'Emulate first launch'
run: |
$i = (mkdir -force test_installs)
ConvertTo-Json @{
install_dir="$i";
download_dir="$i\_cache";
global_dir="$i\_bin";
} | Out-File $env:PYTHON_MANAGER_CONFIG -Encoding utf8
pymanager install --configure -y
if ($?) { pymanager list }
env:
PYTHON_MANAGER_INCLUDE_UNMANAGED: false
PYTHON_MANAGER_CONFIG: .\test-config.json
PYMANAGER_DEBUG: true
- name: 'Validate entrypoint scripts'
run: |
$env:PYTHON_MANAGER_CONFIG = (gi $env:PYTHON_MANAGER_CONFIG).FullName
pymanager exec tests\run-eptest.py
env:
PYTHON_MANAGER_INCLUDE_UNMANAGED: false
PYTHON_MANAGER_CONFIG: .\test-config.json
PYMANAGER_DEBUG: true
shell: powershell
- name: 'Offline bundle download and install'
run: |
pymanager list --online 3 3-32 3-64 3-arm64
pymanager install --download .\bundle 3 3-32 3-64 3-arm64
pymanager list --source .\bundle
pymanager install --source .\bundle 3 3-32 3-64 3-arm64
env:
PYMANAGER_DEBUG: true
- name: 'Remove MSIX'
run: |
Get-AppxPackage PythonSoftwareFoundation.PythonManager | Remove-AppxPackage
shell: powershell
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' Ensure the correct source URL is stored with an install. · python/pymanager@e6e5d83 · GitHub
Skip to content

Ensure the correct source URL is stored with an install. #433

Ensure the correct source URL is stored with an install.

Ensure the correct source URL is stored with an install. #433

Workflow file for this run

name: 'Build and Test'
on: [push, pull_request, workflow_dispatch]
env:
COVERAGE_CORE: sysmon
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: true
PIP_NO_INPUT: true
PIP_PROGRESS_BAR: off
PIP_REQUIRE_VIRTUALENV: false
PIP_VERBOSE: true
PYMSBUILD_VERBOSE: true
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: 'Remove existing PyManager install'
run: |
# Ensure we aren't currently installed
$msix = Get-AppxPackage PythonSoftwareFoundation.PythonManager -EA SilentlyContinue
if ($msix) {
"Removing $($msix.Name)"
Remove-AppxPackage $msix
}
shell: powershell
#- name: Set up Python 3.14
# uses: actions/setup-python@v5
# with:
# python-version: 3.14-dev
# We move faster than GitHub's Python runtimes, so use NuGet instead
# One day we can use ourselves to download Python, but not yet...
- name: Set up NuGet
uses: nuget/setup-nuget@v2.0.1
- name: Set up Python 3.14.2
run: |
nuget install python -Version 3.14.2 -x -o .
$py = Get-Item python\tools
Write-Host "Adding $py to PATH"
"$py" | Out-File $env:GITHUB_PATH -Encoding UTF8 -Append
working-directory: ${{ runner.temp }}
- name: Check Python version is 3.14.2
run: >
python -c "import sys;
print(sys.version);
print(sys.executable);
sys.exit(0 if sys.version_info[:5] == (3, 14, 2, 'final', 0) else 1)"
- name: Install build dependencies
run: python -m pip install "pymsbuild>=1.2.0b1"
- name: 'Install test runner'
run: python -m pip install pytest pytest-cov
- name: 'Build test module'
run: python -m pymsbuild -c _msbuild_test.py
- name: 'Run pre-test'
shell: bash
run: |
python -m pytest -vv \
--cov src \
--cov tests \
--cov-report term \
--cov-report xml
- name: 'Upload coverage'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_ORG_TOKEN }}
- name: 'Build package'
run: python make.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Build MSIX package'
run: python make-msix.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Build MSI package'
run: python make-msi.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Register unsigned MSIX'
run: |
$msix = dir "${env:PYMSBUILD_DIST_DIR}\*.msix" `
| ?{ -not ($_.BaseName -match '.+-store') } `
| select -first 1
cp $msix "${msix}.zip"
Expand-Archive "${msix}.zip" (mkdir -Force $env:TEST_MSIX_DIR)
Add-AppxPackage -Register "${env:TEST_MSIX_DIR}\appxmanifest.xml"
Get-AppxPackage PythonSoftwareFoundation.PythonManager
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
shell: powershell
- name: 'Ensure global commands are present'
run: |
gcm pymanager
gcm pywmanager
# These are likely present due to the machine configuration,
# but we'll check for them anyway.
gcm py
gcm python
gcm pyw
gcm pythonw
- name: 'Show help output'
run: pymanager help
- name: 'Install default runtime'
run: pymanager install default
env:
PYMANAGER_DEBUG: true
- name: 'List installed runtimes'
run: pymanager list
env:
PYMANAGER_DEBUG: true
- name: 'List installed runtimes (legacy)'
run: pymanager --list-paths
env:
PYMANAGER_DEBUG: true
- name: 'Launch default runtime'
run: pymanager exec -m site
env:
PYMANAGER_DEBUG: true
- name: 'Uninstall runtime'
run: pymanager uninstall -y default
env:
PYMANAGER_DEBUG: true
- name: 'Emulate first launch'
run: |
$i = (mkdir -force test_installs)
ConvertTo-Json @{
install_dir="$i";
download_dir="$i\_cache";
global_dir="$i\_bin";
} | Out-File $env:PYTHON_MANAGER_CONFIG -Encoding utf8
pymanager install --configure -y
if ($?) { pymanager list }
env:
PYTHON_MANAGER_INCLUDE_UNMANAGED: false
PYTHON_MANAGER_CONFIG: .\test-config.json
PYMANAGER_DEBUG: true
- name: 'Validate entrypoint scripts'
run: |
$env:PYTHON_MANAGER_CONFIG = (gi $env:PYTHON_MANAGER_CONFIG).FullName
pymanager exec tests\run-eptest.py
env:
PYTHON_MANAGER_INCLUDE_UNMANAGED: false
PYTHON_MANAGER_CONFIG: .\test-config.json
PYMANAGER_DEBUG: true
shell: powershell
- name: 'Offline bundle download and install'
run: |
pymanager list --online 3 3-32 3-64 3-arm64
pymanager install --download .\bundle 3 3-32 3-64 3-arm64
pymanager list --source .\bundle
pymanager install --source .\bundle 3 3-32 3-64 3-arm64
env:
PYMANAGER_DEBUG: true
- name: 'Remove MSIX'
run: |
Get-AppxPackage PythonSoftwareFoundation.PythonManager | Remove-AppxPackage
shell: powershell
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Ensure the correct source URL is stored with an install. · python/pymanager@e6e5d83 · GitHub
Skip to content

Ensure the correct source URL is stored with an install. #433

Ensure the correct source URL is stored with an install.

Ensure the correct source URL is stored with an install. #433

Workflow file for this run

name: 'Build and Test'
on: [push, pull_request, workflow_dispatch]
env:
COVERAGE_CORE: sysmon
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: true
PIP_NO_INPUT: true
PIP_PROGRESS_BAR: off
PIP_REQUIRE_VIRTUALENV: false
PIP_VERBOSE: true
PYMSBUILD_VERBOSE: true
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: 'Remove existing PyManager install'
run: |
# Ensure we aren't currently installed
$msix = Get-AppxPackage PythonSoftwareFoundation.PythonManager -EA SilentlyContinue
if ($msix) {
"Removing $($msix.Name)"
Remove-AppxPackage $msix
}
shell: powershell
#- name: Set up Python 3.14
# uses: actions/setup-python@v5
# with:
# python-version: 3.14-dev
# We move faster than GitHub's Python runtimes, so use NuGet instead
# One day we can use ourselves to download Python, but not yet...
- name: Set up NuGet
uses: nuget/setup-nuget@v2.0.1
- name: Set up Python 3.14.2
run: |
nuget install python -Version 3.14.2 -x -o .
$py = Get-Item python\tools
Write-Host "Adding $py to PATH"
"$py" | Out-File $env:GITHUB_PATH -Encoding UTF8 -Append
working-directory: ${{ runner.temp }}
- name: Check Python version is 3.14.2
run: >
python -c "import sys;
print(sys.version);
print(sys.executable);
sys.exit(0 if sys.version_info[:5] == (3, 14, 2, 'final', 0) else 1)"
- name: Install build dependencies
run: python -m pip install "pymsbuild>=1.2.0b1"
- name: 'Install test runner'
run: python -m pip install pytest pytest-cov
- name: 'Build test module'
run: python -m pymsbuild -c _msbuild_test.py
- name: 'Run pre-test'
shell: bash
run: |
python -m pytest -vv \
--cov src \
--cov tests \
--cov-report term \
--cov-report xml
- name: 'Upload coverage'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_ORG_TOKEN }}
- name: 'Build package'
run: python make.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Build MSIX package'
run: python make-msix.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Build MSI package'
run: python make-msi.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Register unsigned MSIX'
run: |
$msix = dir "${env:PYMSBUILD_DIST_DIR}\*.msix" `
| ?{ -not ($_.BaseName -match '.+-store') } `
| select -first 1
cp $msix "${msix}.zip"
Expand-Archive "${msix}.zip" (mkdir -Force $env:TEST_MSIX_DIR)
Add-AppxPackage -Register "${env:TEST_MSIX_DIR}\appxmanifest.xml"
Get-AppxPackage PythonSoftwareFoundation.PythonManager
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
shell: powershell
- name: 'Ensure global commands are present'
run: |
gcm pymanager
gcm pywmanager
# These are likely present due to the machine configuration,
# but we'll check for them anyway.
gcm py
gcm python
gcm pyw
gcm pythonw
- name: 'Show help output'
run: pymanager help
- name: 'Install default runtime'
run: pymanager install default
env:
PYMANAGER_DEBUG: true
- name: 'List installed runtimes'
run: pymanager list
env:
PYMANAGER_DEBUG: true
- name: 'List installed runtimes (legacy)'
run: pymanager --list-paths
env:
PYMANAGER_DEBUG: true
- name: 'Launch default runtime'
run: pymanager exec -m site
env:
PYMANAGER_DEBUG: true
- name: 'Uninstall runtime'
run: pymanager uninstall -y default
env:
PYMANAGER_DEBUG: true
- name: 'Emulate first launch'
run: |
$i = (mkdir -force test_installs)
ConvertTo-Json @{
install_dir="$i";
download_dir="$i\_cache";
global_dir="$i\_bin";
} | Out-File $env:PYTHON_MANAGER_CONFIG -Encoding utf8
pymanager install --configure -y
if ($?) { pymanager list }
env:
PYTHON_MANAGER_INCLUDE_UNMANAGED: false
PYTHON_MANAGER_CONFIG: .\test-config.json
PYMANAGER_DEBUG: true
- name: 'Validate entrypoint scripts'
run: |
$env:PYTHON_MANAGER_CONFIG = (gi $env:PYTHON_MANAGER_CONFIG).FullName
pymanager exec tests\run-eptest.py
env:
PYTHON_MANAGER_INCLUDE_UNMANAGED: false
PYTHON_MANAGER_CONFIG: .\test-config.json
PYMANAGER_DEBUG: true
shell: powershell
- name: 'Offline bundle download and install'
run: |
pymanager list --online 3 3-32 3-64 3-arm64
pymanager install --download .\bundle 3 3-32 3-64 3-arm64
pymanager list --source .\bundle
pymanager install --source .\bundle 3 3-32 3-64 3-arm64
env:
PYMANAGER_DEBUG: true
- name: 'Remove MSIX'
run: |
Get-AppxPackage PythonSoftwareFoundation.PythonManager | Remove-AppxPackage
shell: powershell
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Ensure the correct source URL is stored with an install. · python/pymanager@e6e5d83 · GitHub
Skip to content

Ensure the correct source URL is stored with an install. #433

Ensure the correct source URL is stored with an install.

Ensure the correct source URL is stored with an install. #433

Workflow file for this run

name: 'Build and Test'
on: [push, pull_request, workflow_dispatch]
env:
COVERAGE_CORE: sysmon
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: true
PIP_NO_INPUT: true
PIP_PROGRESS_BAR: off
PIP_REQUIRE_VIRTUALENV: false
PIP_VERBOSE: true
PYMSBUILD_VERBOSE: true
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: 'Remove existing PyManager install'
run: |
# Ensure we aren't currently installed
$msix = Get-AppxPackage PythonSoftwareFoundation.PythonManager -EA SilentlyContinue
if ($msix) {
"Removing $($msix.Name)"
Remove-AppxPackage $msix
}
shell: powershell
#- name: Set up Python 3.14
# uses: actions/setup-python@v5
# with:
# python-version: 3.14-dev
# We move faster than GitHub's Python runtimes, so use NuGet instead
# One day we can use ourselves to download Python, but not yet...
- name: Set up NuGet
uses: nuget/setup-nuget@v2.0.1
- name: Set up Python 3.14.2
run: |
nuget install python -Version 3.14.2 -x -o .
$py = Get-Item python\tools
Write-Host "Adding $py to PATH"
"$py" | Out-File $env:GITHUB_PATH -Encoding UTF8 -Append
working-directory: ${{ runner.temp }}
- name: Check Python version is 3.14.2
run: >
python -c "import sys;
print(sys.version);
print(sys.executable);
sys.exit(0 if sys.version_info[:5] == (3, 14, 2, 'final', 0) else 1)"
- name: Install build dependencies
run: python -m pip install "pymsbuild>=1.2.0b1"
- name: 'Install test runner'
run: python -m pip install pytest pytest-cov
- name: 'Build test module'
run: python -m pymsbuild -c _msbuild_test.py
- name: 'Run pre-test'
shell: bash
run: |
python -m pytest -vv \
--cov src \
--cov tests \
--cov-report term \
--cov-report xml
- name: 'Upload coverage'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_ORG_TOKEN }}
- name: 'Build package'
run: python make.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Build MSIX package'
run: python make-msix.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Build MSI package'
run: python make-msi.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Register unsigned MSIX'
run: |
$msix = dir "${env:PYMSBUILD_DIST_DIR}\*.msix" `
| ?{ -not ($_.BaseName -match '.+-store') } `
| select -first 1
cp $msix "${msix}.zip"
Expand-Archive "${msix}.zip" (mkdir -Force $env:TEST_MSIX_DIR)
Add-AppxPackage -Register "${env:TEST_MSIX_DIR}\appxmanifest.xml"
Get-AppxPackage PythonSoftwareFoundation.PythonManager
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
shell: powershell
- name: 'Ensure global commands are present'
run: |
gcm pymanager
gcm pywmanager
# These are likely present due to the machine configuration,
# but we'll check for them anyway.
gcm py
gcm python
gcm pyw
gcm pythonw
- name: 'Show help output'
run: pymanager help
- name: 'Install default runtime'
run: pymanager install default
env:
PYMANAGER_DEBUG: true
- name: 'List installed runtimes'
run: pymanager list
env:
PYMANAGER_DEBUG: true
- name: 'List installed runtimes (legacy)'
run: pymanager --list-paths
env:
PYMANAGER_DEBUG: true
- name: 'Launch default runtime'
run: pymanager exec -m site
env:
PYMANAGER_DEBUG: true
- name: 'Uninstall runtime'
run: pymanager uninstall -y default
env:
PYMANAGER_DEBUG: true
- name: 'Emulate first launch'
run: |
$i = (mkdir -force test_installs)
ConvertTo-Json @{
install_dir="$i";
download_dir="$i\_cache";
global_dir="$i\_bin";
} | Out-File $env:PYTHON_MANAGER_CONFIG -Encoding utf8
pymanager install --configure -y
if ($?) { pymanager list }
env:
PYTHON_MANAGER_INCLUDE_UNMANAGED: false
PYTHON_MANAGER_CONFIG: .\test-config.json
PYMANAGER_DEBUG: true
- name: 'Validate entrypoint scripts'
run: |
$env:PYTHON_MANAGER_CONFIG = (gi $env:PYTHON_MANAGER_CONFIG).FullName
pymanager exec tests\run-eptest.py
env:
PYTHON_MANAGER_INCLUDE_UNMANAGED: false
PYTHON_MANAGER_CONFIG: .\test-config.json
PYMANAGER_DEBUG: true
shell: powershell
- name: 'Offline bundle download and install'
run: |
pymanager list --online 3 3-32 3-64 3-arm64
pymanager install --download .\bundle 3 3-32 3-64 3-arm64
pymanager list --source .\bundle
pymanager install --source .\bundle 3 3-32 3-64 3-arm64
env:
PYMANAGER_DEBUG: true
- name: 'Remove MSIX'
run: |
Get-AppxPackage PythonSoftwareFoundation.PythonManager | Remove-AppxPackage
shell: powershell
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); Ensure the correct source URL is stored with an install. · python/pymanager@e6e5d83 · GitHub
Skip to content

Ensure the correct source URL is stored with an install. #433

Ensure the correct source URL is stored with an install.

Ensure the correct source URL is stored with an install. #433

Workflow file for this run

name: 'Build and Test'
on: [push, pull_request, workflow_dispatch]
env:
COVERAGE_CORE: sysmon
FORCE_COLOR: 1
PIP_DISABLE_PIP_VERSION_CHECK: true
PIP_NO_INPUT: true
PIP_PROGRESS_BAR: off
PIP_REQUIRE_VIRTUALENV: false
PIP_VERBOSE: true
PYMSBUILD_VERBOSE: true
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: 'Remove existing PyManager install'
run: |
# Ensure we aren't currently installed
$msix = Get-AppxPackage PythonSoftwareFoundation.PythonManager -EA SilentlyContinue
if ($msix) {
"Removing $($msix.Name)"
Remove-AppxPackage $msix
}
shell: powershell
#- name: Set up Python 3.14
# uses: actions/setup-python@v5
# with:
# python-version: 3.14-dev
# We move faster than GitHub's Python runtimes, so use NuGet instead
# One day we can use ourselves to download Python, but not yet...
- name: Set up NuGet
uses: nuget/setup-nuget@v2.0.1
- name: Set up Python 3.14.2
run: |
nuget install python -Version 3.14.2 -x -o .
$py = Get-Item python\tools
Write-Host "Adding $py to PATH"
"$py" | Out-File $env:GITHUB_PATH -Encoding UTF8 -Append
working-directory: ${{ runner.temp }}
- name: Check Python version is 3.14.2
run: >
python -c "import sys;
print(sys.version);
print(sys.executable);
sys.exit(0 if sys.version_info[:5] == (3, 14, 2, 'final', 0) else 1)"
- name: Install build dependencies
run: python -m pip install "pymsbuild>=1.2.0b1"
- name: 'Install test runner'
run: python -m pip install pytest pytest-cov
- name: 'Build test module'
run: python -m pymsbuild -c _msbuild_test.py
- name: 'Run pre-test'
shell: bash
run: |
python -m pytest -vv \
--cov src \
--cov tests \
--cov-report term \
--cov-report xml
- name: 'Upload coverage'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_ORG_TOKEN }}
- name: 'Build package'
run: python make.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Build MSIX package'
run: python make-msix.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Build MSI package'
run: python make-msi.py
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
- name: 'Register unsigned MSIX'
run: |
$msix = dir "${env:PYMSBUILD_DIST_DIR}\*.msix" `
| ?{ -not ($_.BaseName -match '.+-store') } `
| select -first 1
cp $msix "${msix}.zip"
Expand-Archive "${msix}.zip" (mkdir -Force $env:TEST_MSIX_DIR)
Add-AppxPackage -Register "${env:TEST_MSIX_DIR}\appxmanifest.xml"
Get-AppxPackage PythonSoftwareFoundation.PythonManager
env:
PYMSBUILD_TEMP_DIR: ${{ runner.temp }}/bin
PYMSBUILD_DIST_DIR: ${{ runner.temp }}/dist
PYMSBUILD_LAYOUT_DIR: ${{ runner.temp }}/layout
TEST_MSIX_DIR: ${{ runner.temp }}/test_msix
shell: powershell
- name: 'Ensure global commands are present'
run: |
gcm pymanager
gcm pywmanager
# These are likely present due to the machine configuration,
# but we'll check for them anyway.
gcm py
gcm python
gcm pyw
gcm pythonw
- name: 'Show help output'
run: pymanager help
- name: 'Install default runtime'
run: pymanager install default
env:
PYMANAGER_DEBUG: true
- name: 'List installed runtimes'
run: pymanager list
env:
PYMANAGER_DEBUG: true
- name: 'List installed runtimes (legacy)'
run: pymanager --list-paths
env:
PYMANAGER_DEBUG: true
- name: 'Launch default runtime'
run: pymanager exec -m site
env:
PYMANAGER_DEBUG: true
- name: 'Uninstall runtime'
run: pymanager uninstall -y default
env:
PYMANAGER_DEBUG: true
- name: 'Emulate first launch'
run: |
$i = (mkdir -force test_installs)
ConvertTo-Json @{
install_dir="$i";
download_dir="$i\_cache";
global_dir="$i\_bin";
} | Out-File $env:PYTHON_MANAGER_CONFIG -Encoding utf8
pymanager install --configure -y
if ($?) { pymanager list }
env:
PYTHON_MANAGER_INCLUDE_UNMANAGED: false
PYTHON_MANAGER_CONFIG: .\test-config.json
PYMANAGER_DEBUG: true
- name: 'Validate entrypoint scripts'
run: |
$env:PYTHON_MANAGER_CONFIG = (gi $env:PYTHON_MANAGER_CONFIG).FullName
pymanager exec tests\run-eptest.py
env:
PYTHON_MANAGER_INCLUDE_UNMANAGED: false
PYTHON_MANAGER_CONFIG: .\test-config.json
PYMANAGER_DEBUG: true
shell: powershell
- name: 'Offline bundle download and install'
run: |
pymanager list --online 3 3-32 3-64 3-arm64
pymanager install --download .\bundle 3 3-32 3-64 3-arm64
pymanager list --source .\bundle
pymanager install --source .\bundle 3 3-32 3-64 3-arm64
env:
PYMANAGER_DEBUG: true
- name: 'Remove MSIX'
run: |
Get-AppxPackage PythonSoftwareFoundation.PythonManager | Remove-AppxPackage
shell: powershell