Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vincent Pelletier
neoppod
Commits
735fb9d1
Commit
735fb9d1
authored
May 12, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup.py: use SHA256 instead of MD5 to check the integrity of mock.py
parent
86b7ebbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
setup.py
setup.py
+4
-3
No files found.
setup.py
View file @
735fb9d1
...
...
@@ -16,7 +16,7 @@ Topic :: Software Development :: Libraries :: Python Modules
mock
=
'neo/tests/mock.py'
if
not
os
.
path
.
exists
(
mock
):
import
cStringIO
,
hashlib
,
subprocess
,
urllib
,
zipfile
import
cStringIO
,
hashlib
,
subprocess
,
urllib
,
zipfile
x
=
'pythonmock-0.1.0.zip'
try
:
x
=
subprocess
.
check_output
((
'git'
,
'cat-file'
,
'blob'
,
x
))
...
...
@@ -24,8 +24,9 @@ if not os.path.exists(mock):
x
=
urllib
.
urlopen
(
'http://downloads.sf.net/sourceforge/python-mock/'
+
x
).
read
()
mock_py
=
zipfile
.
ZipFile
(
cStringIO
.
StringIO
(
x
)).
read
(
'mock.py'
)
if
hashlib
.
md5
(
mock_py
).
hexdigest
()
!=
'79f42f390678e5195d9ce4ae43bd18ec'
:
raise
EnvironmentError
(
"MD5 checksum mismatch downloading 'mock.py'"
)
if
(
hashlib
.
sha256
(
mock_py
).
hexdigest
()
!=
'c6ed26e4312ed82160016637a9b6f8baa71cf31a67c555d44045a1ef1d60d1bc'
):
raise
EnvironmentError
(
"SHA checksum mismatch downloading 'mock.py'"
)
open
(
mock
,
'w'
).
write
(
mock_py
)
zodb_require
=
[
'ZODB3>=3.10dev'
]
...
...
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