e160f5bac40087c77b46b81dfc7f979229d66b06
[g-pypi.git] / tests / entire_index.py
1 #!/usr/bin/env python
2
3
4 """
5
6 *** WARNING ***
7 *** WARNING ***
8 *** WARNING ***
9
10 This will attempt to create an ebuild for every single release on PyPI
11 which obviously will take a long time and require a decent amount of bandwidth
12
13 *** WARNING ***
14 *** WARNING ***
15 *** WARNING ***
16
17 """
18
19 import pickle
20 import os
21
22 from yolk.pypi import CheeseShop
23
24
25 cheeseshop = CheeseShop()
26 PKG_INDEX = "pkg_index"
27
28 if os.path.exists(PKG_INDEX):
29     full_index = pickle.load(open(PKG_INDEX, 'r'))
30 else:
31     full_index = cheeseshop.search({"name":"foo"}, "or")
32     pickle.dump(full_index, open(PKG_INDEX, "w"))
33
34 for pkg in full_index:
35     os.system('echo Testing %s' % pkg['name'].encode('utf-8'))
36     os.system('g-pypi -qo %s' % pkg['name'])
37     #os.system('echo %s' % ('-' * 79))