Skip to content

Commit 0cf5fc5

Browse files
committed
fix issue #10 by removing warning and using an error at runtime
1 parent 5551a4a commit 0cf5fc5

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

docsource/history.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
Release History
33
===============
44

5+
1.18
6+
7+
- Remove warning during installation if sphinxcontrib.paverutils is not installed. (#10)
8+
59
1.17
610

711
- Added documentation updates provided by Steve Steiner.

pavement.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
try:
2424
from sphinxcontrib import paverutils
2525
except:
26-
import warnings
27-
warnings.warn('sphinxcontrib.paverutils was not found, you will not be able to produce documentation')
26+
paverutils = None
2827

2928
# What project are we building?
3029
PROJECT = 'virtualenvwrapper'
@@ -122,6 +121,8 @@
122121

123122
@task
124123
def html(options):
124+
if paverutils is None:
125+
raise RuntimeError('Building HTML documentation requires the sphinxcontrib.paverutils package')
125126
# Build the docs
126127
paverutils.html(options)
127128
# Move them into place for packaging
@@ -135,6 +136,8 @@ def html(options):
135136
def website(options):
136137
"""Create local copy of website files.
137138
"""
139+
if paverutils is None:
140+
raise RuntimeError('Building the website requires the sphinxcontrib.paverutils package')
138141
# Make sure the base template is updated
139142
dest = path(options.website.template_dest).expanduser()
140143
src = path(options.website.template_source).expanduser()

0 commit comments

Comments
 (0)