Skip to content →

Jacob Henner Posts

PyPI mirror support in pipenv

As of June 25th, pipenv supports overriding PyPI urls with mirror indices. This is useful for developers who want to use a PyPI mirror or proxy repository with a pipenv-managed project, without the need to repeatedly modify the Pipfile to point to the mirror.

Usage

The --pypi-mirror parameter has been added to all commands which depend upon connectivity to PyPI.

If you’d like to override the default PyPI index urls with the url for a PyPI mirror, you can use the following:

$ pipenv install --pypi-mirror <mirror_url>

$ pipenv update --pypi-mirror <mirror_url>

$ pipenv sync --pypi-mirror <mirror_url>

$ pipenv lock --pypi-mirror <mirror_url>

$ pipenv uninstall --pypi-mirror <mirror_url>

Alternatively, you can set the PIPENV_PYPI_MIRROR environment variable.

Background

Since November 2017, pipenv has been the PyPA and PSF recommended dependency manager for Python projects. After using it for a bit, I noticed it lacked the ability to specify a PyPI mirror, a feature necessary for corporate adoption. In many corporate environments:

Leave a Comment

Puppet module repository naming

Recently, I have been working on developing a few Puppet modules. When I started using puppet-lint to perform linting on my code, and puppet strings to generate documentation, I encountered related issues. To ensure that these issues were not specific to my project, I cloned Puppet’s ntp module, which is frequently used by the examples in Puppet’s documentation. I was able to reproduce both issues.

Leave a Comment

New PGP Key

Hello folks, After contemplating the security of my (former) PGP key, 0x26BD94C2, I decided that some upgrading was in order. 0x26BD94C2 used a 1024 bit DSA signing (primary) key, which I no longer consider suitable in my threat model. I had generated a Curve25519 key a little while back, and…

Leave a Comment