Skip to content

Pick the NuGet feed with a source setting and skip mirror releases - #88

Merged
ryan-kipawa merged 1 commit into
masterfrom
build/native-mirror
Nov 11, 2026
Merged

ryan-kipawa merged 1 commit into
masterfrom
build/native-mirror

Conversation

@ryan-kipawa

Copy link
Copy Markdown
Collaborator

Summary

The build hook now picks its NuGet feed from a required source attribute in buildUtil/packages.config. The setting stays nuget.org and every pin stays at 23.0.3, so the wheel is the same as before.

-<packages>
+<packages source="nuget.org">   <!-- or "github-mirror" -->
 setup()
-  read_packages_config        -> packages
+  read_packages_config        -> feed, packages   # raises on a missing or unknown source
+  print("Downloading NuGet packages from {feed}")
   for each package
-    download from the nuget.org flat-container URL
+    download from FEEDS[feed]
  • nuget.org: the existing flat-container URL, with the id and version lowercased.
  • github-mirror: releases/download/nuget-packages-2026/{id}.{version}.nupkg on this repo, with the id cased as in the config.

"Build package" now skips both of its jobs (build and publish) for releases tagged nuget-packages-*. Those releases will only hold the mirror of the 2026 native packages, which aren't on nuget.org yet, so creating one must not publish to PyPI. A release: published event runs the workflow file from the tagged commit, so this guard has to be on master before the mirror release is created. Manual runs and v* releases work as before. On a manual run there's no release, so tag_name is null, which startsWith treats as ''.

Evidence

Checked by hand with uv sync --reinstall-package mikecore:

  • Before: the feed was hardcoded and the config had no source attribute.
  • After:
    • with source="nuget.org", the hook prints Downloading NuGet packages from nuget.org and fetches the same six api.nuget.org URLs as before.
    • with the attribute missing, the build stops with RuntimeError: buildUtil/packages.config: source must be one of nuget.org, github-mirror, got None.
    • with source="nuget", it stops with the same message ending in got 'nuget'.
  • Tests: 193 passed, 1 skipped, 8 xfailed on both master and this branch.
  • Lint and types: ruff is clean, and pyrefly reports 0 errors and 328 warnings (the limit is 330).

The mirror URL hasn't been tried, because that release doesn't exist yet.

Merge Danger

Door: two-way. Reverting is enough; the PR changes no published artifacts.

Blast Radius: release-workflow

A wrong if: expression could skip a real v* release, or let a nuget-packages-* release publish. Tests can't catch either, so watch the first run of each.

🤖 Generated with Claude Code

A required source attribute in buildUtil/packages.config chooses between
nuget.org and a GitHub release mirror, so switching feeds is a one-word
change. It stays nuget.org, so the wheel is unchanged.

The Build package workflow skips releases tagged nuget-packages-*, which
will only host the mirror.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ryan-kipawa
ryan-kipawa merged commit ed77049 into master Nov 11, 2026
10 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant