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
735961b6
Commit
735961b6
authored
Apr 21, 2009
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed (obsolete on current trunk)
parent
f41b4623
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
71 deletions
+0
-71
inst/generate_externals.py
inst/generate_externals.py
+0
-71
No files found.
inst/generate_externals.py
deleted
100644 → 0
View file @
f41b4623
##############################################################################
#
# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################
""" Generate svn:external files (with help of the KGS)
Written by Andreas Jung, 2007
"""
import
sys
import
os
import
urllib2
from
ConfigParser
import
ConfigParser
,
NoOptionError
error
=
sys
.
stderr
# retrieve externals used in Zope 2
os
.
system
(
'svn propget svn:externals lib/python >lib_python.txt'
)
os
.
system
(
'svn propget svn:externals lib/python/zope >lib_python_zope.txt'
)
os
.
system
(
'svn propget svn:externals lib/python/zope/app >lib_python_zope_app.txt'
)
# download current KGS index
kgs_url
=
'http://download.zope.org/zope3.4/versions.cfg'
open
(
'kgs.ini'
,
'w'
).
write
(
urllib2
.
urlopen
(
kgs_url
).
read
())
CP
=
ConfigParser
()
CP
.
read
(
'kgs.ini'
)
for
name
,
prefix
in
((
'lib_python'
,
None
),
(
'lib_python_zope'
,
'zope'
),
(
'lib_python_zope_app'
,
'zope.app'
)):
outname
=
name
+
'.ext'
print
>>
error
,
'Generating externals file %s'
%
outname
fp
=
open
(
outname
,
'w'
)
for
line
in
open
(
name
+
'.txt'
):
line
=
line
.
strip
()
if
not
line
:
continue
module
,
url
=
line
.
split
(
' '
,
1
)
module
=
module
.
strip
()
url
=
url
.
strip
()
# generate full module name as it appear in the KGS idnex
full_mod_name
=
module
if
prefix
:
full_mod_name
=
'%s.%s'
%
(
prefix
,
module
)
try
:
tag
=
CP
.
get
(
'versions'
,
full_mod_name
)
n
=
'/'
.
join
(
full_mod_name
.
split
(
'.'
))
url
=
'svn://svn.zope.org/repos/main/%s/tags/%s/src/%s'
%
\
(
full_mod_name
,
tag
,
n
)
ok
=
True
except
NoOptionError
:
ok
=
False
print
>>
error
,
'WARN: KGS incomplete - %s not found'
%
full_mod_name
if
not
ok
:
print
>>
fp
,
'# warning: %s not found in KGS, using old URL for %s'
%
\
(
module
,
module
)
print
>>
fp
,
'%-20s %s'
%
(
module
,
url
)
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