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
ad6f21da
Commit
ad6f21da
authored
Apr 22, 2009
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support for external packages
parent
4f29cfee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
inst/generate_index.py
inst/generate_index.py
+12
-4
No files found.
inst/generate_index.py
View file @
ad6f21da
...
...
@@ -6,6 +6,7 @@ in combination with easy_install -i <some_url>
import
os
import
sys
import
urlparse
from
xmlrpclib
import
Server
from
ConfigParser
import
RawConfigParser
as
ConfigParser
...
...
@@ -23,12 +24,19 @@ def write_index(package, version):
fp
=
file
(
index_html
,
'w'
)
print
>>
fp
,
'<html><body>'
lst
=
server
.
package_urls
(
package
,
version
)
if
not
lst
:
raise
RuntimeError
(
'Package contains no release files: %s==%s'
%
(
package
,
version
))
if
lst
:
for
d
in
lst
:
link
=
'<a href="%s">%s</a>'
%
(
d
[
'url'
],
d
[
'filename'
])
print
>>
fp
,
link
print
>>
fp
,
'<br/>'
else
:
rel_data
=
server
.
release_data
(
package
,
version
)
download_url
=
rel_data
[
'download_url'
]
filename
=
os
.
path
.
basename
(
urlparse
.
urlparse
(
download_url
)[
2
])
link
=
'<a href="%s">%s</a>'
%
(
download_url
,
filename
)
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