Skip to content

gh-152919: Ensure nuget.org source exist before python install#152919

Merged
zooba merged 1 commit into
python:mainfrom
bartvdbraak:patch-1
Jul 3, 2026
Merged

gh-152919: Ensure nuget.org source exist before python install#152919
zooba merged 1 commit into
python:mainfrom
bartvdbraak:patch-1

Conversation

@bartvdbraak

Copy link
Copy Markdown
Contributor

On certain ARM64 installations of Windows the instantiation of NuGet may not actually add a package source for nuget.org

I found this out when trying to build library dependencies for Blender on Windows ARM64:

...
  Downloading nuget...
  Installing Python via nuget...
  Feeds used:

  Installing package 'pythonx86' to 'C:\db\build\S\VS1564R\build\python\src\external_python\externals'.
  Unable to find package 'pythonx86'
...

Additional info:

Empty nuget.config files
blender@WIN-2P7GKQMK9N3 C:\Users\blender>dir C:\nuget.exe /s /b
C:\db\build\S\VS1564R\build\python\src\external_python\externals\nuget.exe

blender@WIN-2P7GKQMK9N3 C:\Users\blender>dir C:\NuGet.Config /s /b
C:\Documents and Settings\blender\AppData\Roaming\NuGet\nuget.config
C:\Documents and Settings\blender\Application Data\NuGet\nuget.config
C:\Users\blender\AppData\Roaming\NuGet\nuget.config
C:\Users\blender\Application Data\NuGet\nuget.config

blender@WIN-2P7GKQMK9N3 C:\Users\blender>type "C:\Documents and Settings\blender\AppData\Roaming\NuGet\nuget.config"
<?xml version="1.0"?>
<configuration>
  <packageSources>
  </packageSources>
</configuration>
blender@WIN-2P7GKQMK9N3 C:\Users\blender>type "C:\Documents and Settings\blender\Application Data\NuGet\nuget.config"
<?xml version="1.0"?>
<configuration>
  <packageSources>
  </packageSources>
</configuration>
blender@WIN-2P7GKQMK9N3 C:\Users\blender>type "C:\Documents and Settings\blender\Application Data\NuGet\nuget.config"
<?xml version="1.0"?>
<configuration>
  <packageSources>
  </packageSources>
</configuration>
blender@WIN-2P7GKQMK9N3 C:\Users\blender>type "C:\Users\blender\AppData\Roaming\NuGet\nuget.config"
<?xml version="1.0"?>
<configuration>
  <packageSources>
  </packageSources>
</configuration>
blender@WIN-2P7GKQMK9N3 C:\Users\blender>type "C:\Users\blender\Application Data\NuGet\nuget.config"

<?xml version="1.0"?>
<configuration>
  <packageSources>
  </packageSources>
</configuration>
Contrast with Windows x64 install

Build logs should be as follows:

  Downloading nuget...
  Installing Python via nuget...
  Feeds used:
    https://api.nuget.org/v3/index.json

  Installing package 'pythonx86' to 'C:\db\build\S\VS1564R\build\python\src\external_python\externals'.
    GET https://api.nuget.org/v3/registration5-gz-semver2/pythonx86/index.json
    OK https://api.nuget.org/v3/registration5-gz-semver2/pythonx86/index.json 130ms
    GET https://api.nuget.org/v3/registration5-gz-semver2/pythonx86/page/3.5.2/3.8.1-c1.json
    GET https://api.nuget.org/v3/registration5-gz-semver2/pythonx86/page/3.8.1/3.10.4.json
    GET https://api.nuget.org/v3/registration5-gz-semver2/pythonx86/page/3.10.5/3.13.0-b2.json
    GET https://api.nuget.org/v3/registration5-gz-semver2/pythonx86/page/3.13.0-b3/3.15.0-b3.json
    OK https://api.nuget.org/v3/registration5-gz-semver2/pythonx86/page/3.5.2/3.8.1-c1.json 126ms
    OK https://api.nuget.org/v3/registration5-gz-semver2/pythonx86/page/3.8.1/3.10.4.json 152ms
    OK https://api.nuget.org/v3/registration5-gz-semver2/pythonx86/page/3.13.0-b3/3.15.0-b3.json 168ms
    OK https://api.nuget.org/v3/registration5-gz-semver2/pythonx86/page/3.10.5/3.13.0-b2.json 188ms


  Attempting to gather dependency information for package 'pythonx86.3.14.6' with respect to project 'C:\db\build\S\VS1564R\build\python\src\external_python\externals', targeting 'Any,Version=v0.0'
  Gathering dependency information took 29 ms
  Attempting to resolve dependencies for package 'pythonx86.3.14.6' with DependencyBehavior 'Lowest'
  Resolving dependency information took 0 ms
  Resolving actions to install package 'pythonx86.3.14.6'
  Resolved actions to install package 'pythonx86.3.14.6'
  Retrieving package 'pythonx86 3.14.6' from 'nuget.org'.
  Adding package 'pythonx86.3.14.6' to folder 'C:\db\build\S\VS1564R\build\python\src\external_python\externals'
  Added package 'pythonx86.3.14.6' to folder 'C:\db\build\S\VS1564R\build\python\src\external_python\externals'
  Successfully installed 'pythonx86 3.14.6' to C:\db\build\S\VS1564R\build\python\src\external_python\externals
  Executing nuget actions took 2.62 sec
  Using "C:\db\build\S\VS1564R\build\python\src\external_python\PCbuild\\..\externals\pythonx86\tools\python.exe" (found on nuget.org)
  Using ""C:\db\build\S\VS1564R\build\python\src\external_python\PCbuild\\..\externals\pythonx86\tools\python.exe"" (from environment)

nuget.config files should be populated as follows:

blender@WINDOWS-X64 C:\Users\blender>dir C:\nuget.exe /s /b
C:\db\build\S\VS1564R\build\python\src\external_python\externals\nuget.exe

blender@WINDOWS-X64 C:\Users\blender>dir C:\NuGet.Config /s /b
C:\Documents and Settings\blender\AppData\Roaming\NuGet\NuGet.Config
C:\Documents and Settings\blender\Application Data\NuGet\NuGet.Config
C:\Users\blender\AppData\Roaming\NuGet\NuGet.Config
C:\Users\blender\Application Data\NuGet\NuGet.Config

blender@WINDOWS-X64 C:\Users\blender>type "C:\Documents and Settings\blender\AppData\Roaming\NuGet\nuget.config"
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
</configuration>
blender@WINDOWS-X64 C:\Users\blender>type "C:\Documents and Settings\blender\Application Data\NuGet\nuget.config"
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
</configuration>
blender@WINDOWS-X64 C:\Users\blender>type "C:\Documents and Settings\blender\Application Data\NuGet\nuget.config"
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
</configuration>
blender@WINDOWS-X64 C:\Users\blender>type "C:\Users\blender\AppData\Roaming\NuGet\nuget.config"
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
</configuration>
blender@WINDOWS-X64 C:\Users\blender>type "C:\Users\blender\Application Data\NuGet\nuget.config"
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
</configuration>

On certain ARM64 installations of Windows the instantiation of NuGet may not actually add a package source for `nuget.org`
@bartvdbraak bartvdbraak requested a review from a team as a code owner July 2, 2026 22:02
@bedevere-app

bedevere-app Bot commented Jul 2, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@python-cla-bot

python-cla-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bartvdbraak bartvdbraak changed the title gh-NNNNNN: Ensure nuget.org source exist before python install gh-152919: Ensure nuget.org source exist before python install Jul 2, 2026
@zooba zooba added OS-windows skip news build The build process and cross-build needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip issue labels Jul 2, 2026
@zooba

zooba commented Jul 2, 2026

Copy link
Copy Markdown
Member

That's a fairly weird situation, but the fix is safe enough. I expect CI will be happy with it, so it should be good to merge when it is.

@bartvdbraak

Copy link
Copy Markdown
Contributor Author

That's a fairly weird situation, but the fix is safe enough. I expect CI will be happy with it, so it should be good to merge when it is.

I agree this is a strange occurrence...

@bartvdbraak

Copy link
Copy Markdown
Contributor Author

@zooba not too familiar with the process, but should I also create separate PRs for backporting to each tagged version?

@zooba

zooba commented Jul 3, 2026

Copy link
Copy Markdown
Member

We have a bot that will do the backports automatically, so it's only if there are conflicts (which I doubt in this case).

@zooba zooba merged commit 8c35afa into python:main Jul 3, 2026
64 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @bartvdbraak for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jul 3, 2026

Copy link
Copy Markdown

GH-152933 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 3, 2026
@bedevere-app

bedevere-app Bot commented Jul 3, 2026

Copy link
Copy Markdown

GH-152932 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 3, 2026
@bedevere-app

bedevere-app Bot commented Jul 3, 2026

Copy link
Copy Markdown

GH-152934 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jul 3, 2026
zooba pushed a commit that referenced this pull request Jul 3, 2026
…GH-152919)

(cherry picked from commit 8c35afa)

Co-authored-by: Bart van der Braak <bartvdbraak@gmail.com>
zooba pushed a commit that referenced this pull request Jul 3, 2026
…GH-152919)

(cherry picked from commit 8c35afa)

Co-authored-by: Bart van der Braak <bartvdbraak@gmail.com>
zooba pushed a commit that referenced this pull request Jul 3, 2026
…GH-152919)

(cherry picked from commit 8c35afa)

Co-authored-by: Bart van der Braak <bartvdbraak@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build The build process and cross-build OS-windows skip issue skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants