Mike Heald 4591e2abbc Mirror appropriate wheels in main mirror
Wheels get built for the OS that pypi-mirror is running
on, but the non arch specific wheels weren't going into
the main tarball mirror, which they should be able to.

This change puts the -any arch wheels into the main tarball
mirror. The method rename (_write_tarball_mirror to
_write_main_mirror) is to reflect that the mirror doesn't
just contain tarballs.

It also fixes an issue with the wheelhouse location.
Previously, the same wheelhouse location was used for
all mirror targets, but this could have easily led to
unwanted versions leaking.

Change-Id: I99223bd54c4512b142753d2b97f99275db82361f
2015-02-26 14:38:31 +00:00
2013-07-22 13:10:38 +04:00
2013-09-09 13:43:36 -05:00
2012-11-22 09:41:44 -08:00
2013-10-16 19:13:29 +00:00
2013-07-02 16:49:29 +00:00

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
Description
RETIRED, PyPI mirror builder
Readme 616 KiB