Skip to content

feat(pypi): support the vcs, archive and directory pylock.toml sources - #12

Draft
aignas wants to merge 2 commits into
feat.aignas.pycross-parity-09-pylockfrom
feat.aignas.pycross-parity-10-pylock-sources
Draft

aignas wants to merge 2 commits into
feat.aignas.pycross-parity-09-pylockfrom
feat.aignas.pycross-parity-10-pylock-sources

Conversation

@aignas

@aignas aignas commented Nov 19, 2026

Copy link
Copy Markdown
Owner

The pylock.toml support fails for the packages from vcs, archive and
directory sources, which are common in the lock files exported from
pdm and poetry projects.

This adds them:

  • vcs sources (git, hg, svn, bzr with a url and a commit-id) are built
    by pip from a direct reference pinned to the commit.
  • archive sources that are wheels (by the URL file name) are used like the
    other wheels. The other archives are built by pip from a direct reference
    with the locked hash, so that the download is verified and pip does not
    use a wheel from the index instead; a subdirectory is passed on too.
  • directory sources are the local projects, which are ignored like the
    virtual and editable roots of a uv.lock.

Work towards bazel-contrib#2787.

Stack (fork test PRs): on top of #11.

The git sources and the archives with a subdirectory are built by pip from a
direct reference, the other archives are used as wheels or sdists (named
after the package so that they can be built) and the directory sources, the
local projects, are ignored.

Work towards bazel-contrib#2787.
pip could use a wheel from the index instead of the downloaded archive and the
archives with a subdirectory were not verified, so build all of the archives
that are not wheels from a direct reference with the hash. Also support the
other VCS types and log the ignored local projects.
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