astral-sh / packse

Python packaging scenarios
Apache License 2.0
106 stars 8 forks source link

Add strict and offline index support #36

Closed zanieb closed 10 months ago

zanieb commented 10 months ago

Creates two separate indexes, packages/local and packages/all instead of just packages/all. packages/all inherits from root/pypi and packages/local. packages/local does not allow packages to be downloaded from PyPI.

All of the "build" dependencies must be published to packages/local for it to be used to install source distributions. This pull request vendors all of the needed dependencies.

Additionally, there is an --offline flag for packse index up which does not allow any PyPI access. This is kind of nice when you are not planning on using fallback to PyPI as it prevents the devpi server from doing any additional indexing of the real PyPI.

This was tested by installing a scenario published to the strict and offline indexes.

zanieb commented 10 months ago

The vendored deps are 2.7MB with 2.1 of that being the setuptools sdist. Seems okay for now.

zanieb commented 10 months ago

Instead of vendoring, we could download with pip and publish to devpi but this seems simpler for now.