Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
9af2f4c5
Commit
9af2f4c5
authored
Apr 18, 2009
by
kenton@google.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update ez_setup.py to latest version, so it works with Python 2.6.
parent
a8e8ccf2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
ez_setup.py
python/ez_setup.py
+9
-5
No files found.
python/ez_setup.py
View file @
9af2f4c5
...
...
@@ -2,7 +2,7 @@
# This file was obtained from:
# http://peak.telecommunity.com/dist/ez_setup.py
# on 200
8/7/1
.
# on 200
9/4/17
.
"""Bootstrap setuptools installation
...
...
@@ -19,7 +19,7 @@ the appropriate options to ``use_setuptools()``.
This file can also be run as a script to install or upgrade setuptools.
"""
import
sys
DEFAULT_VERSION
=
"0.6c
8
"
DEFAULT_VERSION
=
"0.6c
9
"
DEFAULT_URL
=
"http://pypi.python.org/packages/
%
s/s/setuptools/"
%
sys
.
version
[:
3
]
md5_data
=
{
...
...
@@ -53,13 +53,18 @@ md5_data = {
'setuptools-0.6c8-py2.3.egg'
:
'50759d29b349db8cfd807ba8303f1902'
,
'setuptools-0.6c8-py2.4.egg'
:
'cba38d74f7d483c06e9daa6070cce6de'
,
'setuptools-0.6c8-py2.5.egg'
:
'1721747ee329dc150590a58b3e1ac95b'
,
'setuptools-0.6c9-py2.3.egg'
:
'a83c4020414807b496e4cfbe08507c03'
,
'setuptools-0.6c9-py2.4.egg'
:
'260a2be2e5388d66bdaee06abec6342a'
,
'setuptools-0.6c9-py2.5.egg'
:
'fe67c3e5a17b12c0e7c541b7ea43a8e6'
,
'setuptools-0.6c9-py2.6.egg'
:
'ca37b1ff16fa2ede6e19383e7b59245a'
,
}
import
sys
,
os
try
:
from
hashlib
import
md5
except
ImportError
:
from
md5
import
md5
def
_validate_md5
(
egg_name
,
data
):
if
egg_name
in
md5_data
:
from
md5
import
md5
digest
=
md5
(
data
)
.
hexdigest
()
if
digest
!=
md5_data
[
egg_name
]:
print
>>
sys
.
stderr
,
(
...
...
@@ -69,7 +74,6 @@ def _validate_md5(egg_name, data):
sys
.
exit
(
2
)
return
data
def
use_setuptools
(
version
=
DEFAULT_VERSION
,
download_base
=
DEFAULT_URL
,
to_dir
=
os
.
curdir
,
download_delay
=
15
...
...
@@ -238,7 +242,6 @@ def update_md5(filenames):
"""Update our built-in md5 registry"""
import
re
from
md5
import
md5
for
name
in
filenames
:
base
=
os
.
path
.
basename
(
name
)
...
...
@@ -275,3 +278,4 @@ if __name__=='__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