Add docs for InstallError.
This commit is contained in:
parent
23f3f1adfe
commit
e9126baaab
1 changed files with 14 additions and 0 deletions
|
@ -1844,6 +1844,20 @@ dedicated process.
|
||||||
|
|
||||||
.. _prefix-objects:
|
.. _prefix-objects:
|
||||||
|
|
||||||
|
|
||||||
|
Failing the build
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
Sometimes you don't want a package to successfully install unless some
|
||||||
|
condition is true. You can explicitly cause the build to fail from
|
||||||
|
``install()`` by raising an ``InstallError``, for example:
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
if spec.architecture.startswith('darwin'):
|
||||||
|
raise InstallError('This package does not build on Mac OS X!')
|
||||||
|
|
||||||
|
|
||||||
Prefix objects
|
Prefix objects
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue