Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
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
6
Merge Requests
6
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
slapos.buildout
Commits
48923df7
Commit
48923df7
authored
Jan 20, 2013
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More helpful errors when we can't get a distribution in offline mode.
parent
f9e37369
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
src/zc/buildout/easy_install.py
src/zc/buildout/easy_install.py
+14
-2
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+25
-0
No files found.
src/zc/buildout/easy_install.py
View file @
48923df7
...
@@ -422,8 +422,13 @@ class Installer:
...
@@ -422,8 +422,13 @@ class Installer:
dist
,
avail
=
self
.
_satisfied
(
requirement
)
dist
,
avail
=
self
.
_satisfied
(
requirement
)
if
dist
is
None
:
if
dist
is
None
:
if
self
.
_dest
is
not
None
:
if
self
.
_dest
is
None
:
logger
.
info
(
*
__doing__
)
raise
zc
.
buildout
.
UserError
(
"We don't have a distribution for %s
\
n
"
"and can't install one in offline (no-install) mode.
\
n
"
%
requirement
)
logger
.
info
(
*
__doing__
)
# Retrieve the dist:
# Retrieve the dist:
if
avail
is
None
:
if
avail
is
None
:
...
@@ -616,6 +621,13 @@ class Installer:
...
@@ -616,6 +621,13 @@ class Installer:
"Couldn't find a source distribution for %r."
"Couldn't find a source distribution for %r."
%
str
(
requirement
))
%
str
(
requirement
))
if
self
.
_dest
is
None
:
raise
zc
.
buildout
.
UserError
(
"We don't have a distribution for %s
\
n
"
"and can't build one in offline (no-install) mode.
\
n
"
%
requirement
)
logger
.
debug
(
'Building %r'
,
spec
)
logger
.
debug
(
'Building %r'
,
spec
)
tmp
=
self
.
_download_cache
tmp
=
self
.
_download_cache
...
...
src/zc/buildout/tests.py
View file @
48923df7
...
@@ -2806,6 +2806,31 @@ def cant_use_install_from_cache_and_offline_together():
...
@@ -2806,6 +2806,31 @@ def cant_use_install_from_cache_and_offline_together():
<BLANKLINE>
<BLANKLINE>
"""
"""
def
error_installing_in_offline_mode_if_dont_have_needed_dist
():
r"""
>>> import zc.buildout.easy_install
>>> ws = zc.buildout.easy_install.install(
... ['demo==0.2'], None,
... links=[link_server], index=link_server+'index/')
Traceback (most recent call last):
...
UserError: We don't have a distribution for demo==0.2
and can't install one in offline (no-install) mode.
<BLANKLINE>
"""
def
error_building_in_offline_mode_if_dont_have_needed_dist
():
r"""
>>> zc.buildout.easy_install.build(
... 'extdemo', None,
... {}, links=[link_server], index=link_server+'index/')
Traceback (most recent call last):
...
UserError: We don't have a distribution for extdemo
and can't build one in offline (no-install) mode.
<BLANKLINE>
"""
######################################################################
######################################################################
...
...
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