9aa8af0dcd
pip 1.5.1 removed options that pypi-mirror needed for reliable downloading, and pip 1.5.0 has problems with some proxies, so this change updates the tmp virtualenvs to use pip>6, uses the download only option, and parses the package names from the tarball filenames. Also, don't use the cached downloads as an extra search path when preparing the build virtualenvs, as older distributions will pick up newer versions of packages that the system can't yet install, until the pip and virtualenv has been upgraded inside the build virtualenv. Change-Id: I645938aa790ba5293a8c78d3b410c3fe339f383c |
||
---|---|---|
pypi_mirror | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
CONTRIBUTING.md | ||
MANIFEST.in | ||
README.rst | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini |
Partial PyPI Mirrors
Sometimes you want a PyPI mirror, but you don't want the whole thing. You certainly don't want external links. What you want are the things that you need and nothing more. What's more, you often know exactly what you need because you already have a pip requirements.txt file containing the list of things you expect to download from PyPI.
pypi-mirror will build a local static mirror for you based on requirements files in git repos.
Use with diskimage-builder
The config below shows a generic sample config. If you're using this mirror in conjunction with diskimage-builder, more specific notes (including some pre-requisites and installation instructions) can be found at https://git.openstack.org/cgit/openstack/diskimage-builder/tree/elements/pypi/README.md
Configuration
A YAML configuration is needed to create a mirror. Below is an example configuration. :
cache-root: /tmp/cache
mirrors:
- name: openstack
projects:
- https://git.openstack.org/openstack/requirements
output: /tmp/mirror/openstack
- name: openstack-infra
projects:
- https://git.openstack.org/openstack-infra/config
output: /tmp/mirror/openstack-infra
Creating a mirror
The run_mirror utility creates a mirror. :
run-mirror -c mirror.yaml