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
611d400a
Commit
611d400a
authored
Jun 05, 2010
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove obsolete script
parent
284b4da0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
64 deletions
+0
-64
inst/checknew.py
inst/checknew.py
+0
-64
No files found.
inst/checknew.py
deleted
100644 → 0
View file @
284b4da0
import
sys
def
main
():
import
pkg_resources
from
pkg_resources
import
parse_requirements
from
setuptools.package_index
import
PackageIndex
import
socket
print
'Setting socket time out to %d seconds'
%
3
socket
.
setdefaulttimeout
(
3
)
env
=
pkg_resources
.
Environment
()
env
.
scan
()
names
=
[]
installed
=
[]
for
name
in
env
:
if
name
==
'python'
:
continue
distributions
=
env
[
name
]
for
dist
in
distributions
:
name
=
dist
.
project_name
if
name
not
in
names
:
names
.
append
(
name
)
installed
.
append
(
dict
(
dist
=
dist
,
name
=
name
,
req
=
parse_requirements
(
name
).
next
(),
))
def
_key
(
value
):
return
value
[
'name'
]
installed
.
sort
(
key
=
_key
)
pi
=
PackageIndex
()
upgrade
=
False
for
info
in
installed
:
print
(
"Checking for new version of %s."
%
info
[
'name'
])
new_dist
=
pi
.
obtain
(
info
[
'req'
])
if
new_dist
.
parsed_version
>
info
[
'dist'
].
parsed_version
:
upgrade
=
True
print
()
print
(
"Newer version for %s found. Installed: %s - found: %s"
%
(
info
[
'name'
],
info
[
'dist'
].
version
,
new_dist
.
version
))
print
(
"Newer version available at: %s"
%
new_dist
.
location
)
print
()
if
not
upgrade
:
print
(
"No updates have been found. All packages use current versions."
)
def
help
():
print
(
"Use this script via ./bin/allpy inst/checknew.py."
)
print
(
"You need to use the alltests.cfg config file for buildout."
)
if
__name__
==
'__main__'
:
args
=
sys
.
argv
[
1
:]
if
'--help'
in
args
:
help
()
else
:
main
()
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