Skip to main content

Mirror a pypi-style egg repository from a debian APT repository

Project description

Mirror a pypi-style egg repository from a debian APT repository

Disclaimer

This package depends on an as-yet-unreleased version of python-apt (0.8) for which it seems the only download location is debian’s experimental distribution. Currently the version there is 0.7.91.

While this code is tested for simple cases, a lot of the different failure modes have not been tested. So if it breaks for you, please add your failure to the automated tests and submit a patch!

Use

Doctest setup (so we can test the documentation):

>>> import tempfile, os
>>> tmp_dir = tempfile.mkdtemp()
>>> from van.reposync import tests
>>> tests_dir = os.path.dirname(tests.__file__)
>>> sources1_list = os.path.join(tmp_dir, 'sources1.list')
>>> open(sources1_list, 'w').write(open(os.path.join(tests_dir, 'sources1.list'), 'r').read() % {'tests_dir': tests_dir})

We provide one binary van-reposync which can be run to perform the synchronization. The first time it’s run, it requires an –apt-sources parameter pointing at an apt sources.list file containing the apt-repositories you wish to mirror. It is important that the .list file contain matching deb and deb-src lines (mirroring needs both binary and source packages):

>>> tests.runit('van-reposync sync --root %s --apt-sources %s' % (tmp_dir, sources1_list))

After it’s done, you will see that the directory you pointed the tool at contains an apt configuration, buildout configuration and tarballs linked into a pypi-style repository.

The next run does not require the apt-sources command, and should be a lot faster:

>>> tests.runit('van-reposync sync --root %s' % tmp_dir)

TearDown

>>> import shutil
>>> shutil.rmtree(tmp_dir)

Changes

1.0.1 (2009-06-15)

  • Fix buildout versions file syntax.

  • Use a very simple layout of pypi repository. All the tarballs in one directory.

1.0.0 (2009-06-15)

  • Initial Release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

van.reposync-1.0.1.tar.gz (279.9 kB view details)

Uploaded Source

File details

Details for the file van.reposync-1.0.1.tar.gz.

File metadata

File hashes

Hashes for van.reposync-1.0.1.tar.gz
Algorithm Hash digest
SHA256 350477f8ba91d70fcfaafdf76c35f3d023c47e407486a37e9de72e772a2e291d
MD5 c021e8e2e83383b2174c69357c242683
BLAKE2b-256 a5157646f1431f47a87aa67efdc197cd2afb93ada402305e07de0f7550aa20df

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page