[Pypi-checkins] r794 - trunk/pypi/tools
richard
python-checkins at python.org
Sat Jul 24 13:00:44 CEST 2010
Author: richard
Date: Sat Jul 24 13:00:44 2010
New Revision: 794
Removed:
trunk/pypi/tools/demodata
Log:
rename for convenience
Deleted: /trunk/pypi/tools/demodata
==============================================================================
--- /trunk/pypi/tools/demodata Sat Jul 24 13:00:44 2010
+++ (empty file)
@@ -1,54 +0,0 @@
-#!/usr/bin/python
-import sys, os, urllib
-
-root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-sys.path.append(root)
-import admin, store, config
-
-cfg = config.Config(root+'/config.ini')
-st = store.Store(cfg)
-
-# classifiers
-for c in urllib.urlopen("http://pypi.python.org/pypi?%3Aaction=list_classifiers").read().splitlines():
- admin.add_classifier(st, c)
-
-# Demo data starts here
-
-# an admin
-otk = st.store_user('fred', 'fredpw', 'fred at python.test')
-st.delete_otk(otk)
-st.add_role('fred', 'Admin', None)
-# an owner
-otk = st.store_user('barney', 'barneypw', 'barney at python.test')
-st.delete_otk(otk)
-
-# package spam
-st.set_user('barney', '127.0.0.1', True)
-for version in ('0.8', '0.9', '1.0'):
- st.store_package('spam', version, {
- 'author':'Barney Geroellheimer',
- 'author_email':'barney at python.test',
- 'homepage':'http://spam.python.test/',
- 'license':'GPL',
- 'summary':'The spam package',
- 'description':'Does anybody want to provide real data here?',
- 'classifiers':["Development Status :: 6 - Mature",
- "Programming Language :: Python :: 2"],
- '_pypi_hidden':False
- })
-
-# package eggs
-for version in ('0.1', '0.2', '0.3', '0.4'):
- st.store_package('eggs', version, {
- 'author':'Barney Geroellheimer',
- 'author_email':'barney at python.test',
- 'homepage':'http://eggs.python.test/',
- 'license':'GPL',
- 'summary':'The eggs package',
- 'description':'Does anybody want to provide real data here?',
- 'classifiers':["Development Status :: 3 - Alpha",
- "Programming Language :: Python :: 3"],
- '_pypi_hidden':version!='0.4'
- })
-
-st.commit()
More information about the Pypi-checkins
mailing list