从Debian APT仓库镜像pypi风格的egg仓库
项目描述
从Debian APT仓库镜像pypi风格的egg仓库
免责声明
此包依赖于尚未发布的python-apt(0.8)版本,似乎唯一的下载位置是Debian的实验性发行版。当前版本为0.7.91。
虽然此代码已针对简单情况进行测试,但许多不同的故障模式尚未测试。因此,如果它对您不起作用,请将您的故障添加到自动化测试中并提交补丁!
使用
Doctest设置(以便我们可以测试文档)
>>> 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})
我们提供了一个二进制文件van-reposync,可以运行以执行同步。第一次运行时,需要一个指向包含您希望镜像的apt仓库的apt sources.list文件的–apt-sources参数。.list文件必须包含匹配的deb和deb-src行(镜像需要二进制和源包)
>>> tests.runit('van-reposync sync --root %s --apt-sources %s' % (tmp_dir, sources1_list))
完成后,您将看到您指向的工具所在的目录包含apt配置、buildout配置以及链接到pypi风格仓库的tar包。
下一次运行不需要apt-sources命令,应该会快得多
>>> tests.runit('van-reposync sync --root %s' % tmp_dir)
拆卸
>>> import shutil >>> shutil.rmtree(tmp_dir)
更改
1.0.1 (2009-06-15)
修复buildout版本文件语法。
使用非常简单的pypi仓库布局。所有tar包都在一个目录中。
1.0.0 (2009-06-15)
初始发布。