Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
c34f8161
Commit
c34f8161
authored
Apr 21, 2009
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
basic generator script for easy_install support
parent
be5b2c2d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
inst/generate_index.py
inst/generate_index.py
+30
-0
No files found.
inst/generate_index.py
0 → 100644
View file @
c34f8161
"""
Generate an index file based on the version.cfg file of Zope 2
in order to provide a version specific index page generated to be used
in combination with easy_install -i <some_url>/index.html
"""
import
sys
from
xmlrpclib
import
Server
from
ConfigParser
import
ConfigParser
CP
=
ConfigParser
()
CP
.
read
([
'versions.cfg'
])
server
=
Server
(
'http://pypi.python.org/pypi'
)
links
=
list
()
for
package
in
CP
.
options
(
'versions'
):
version
=
CP
.
get
(
'versions'
,
package
)
print
>>
sys
.
stderr
,
'Package %s==%s'
%
(
package
,
version
)
for
d
in
server
.
package_urls
(
package
,
version
):
links
.
append
(
'<a href="%s">%s</a>'
%
(
d
[
'url'
],
d
[
'filename'
]))
fp
=
file
(
'index.html'
,
'w'
)
print
>>
fp
,
'<html><body>'
for
link
in
links
:
print
>>
fp
,
link
print
>>
fp
,
'<br/>'
print
>>
fp
,
'</body></html>'
fp
.
close
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment