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
Ivan Tyagov
neoppod
Commits
8044c340
Commit
8044c340
authored
Jul 13, 2016
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master'
Conflicts: setup.py
parents
03db5a01
a4f34eaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
setup.py
setup.py
+8
-4
No files found.
setup.py
View file @
8044c340
...
@@ -15,10 +15,14 @@ Topic :: Software Development :: Libraries :: Python Modules
...
@@ -15,10 +15,14 @@ Topic :: Software Development :: Libraries :: Python Modules
"""
"""
if
not
os
.
path
.
exists
(
'mock.py'
):
if
not
os
.
path
.
exists
(
'mock.py'
):
import
cStringIO
,
hashlib
,
urllib
,
zipfile
import
cStringIO
,
hashlib
,
subprocess
,
urllib
,
zipfile
mock_py
=
zipfile
.
ZipFile
(
cStringIO
.
StringIO
(
urllib
.
urlopen
(
x
=
'pythonmock-0.1.0.zip'
'http://ufpr.dl.sourceforge.net/project/python-mock/python-mock/version%200.1.0/pythonmock-0.1.0.zip'
try
:
).
read
())).
read
(
'mock.py'
)
x
=
subprocess
.
check_output
((
'git'
,
'cat-file'
,
'blob'
,
x
))
except
(
OSError
,
subprocess
.
CalledProcessError
):
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'
:
if
hashlib
.
md5
(
mock_py
).
hexdigest
()
!=
'79f42f390678e5195d9ce4ae43bd18ec'
:
raise
EnvironmentError
(
"MD5 checksum mismatch downloading 'mock.py'"
)
raise
EnvironmentError
(
"MD5 checksum mismatch downloading 'mock.py'"
)
open
(
'mock.py'
,
'w'
).
write
(
mock_py
)
open
(
'mock.py'
,
'w'
).
write
(
mock_py
)
...
...
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