@@ -543,9 +543,9 @@ Note also the line `doCheck = false;`, we explicitly disabled running the test-s
543543It is highly encouraged to have testing as part of the package build. This
544544helps to avoid situations where the package was able to build and install,
545545but is not usable at runtime. Currently, all packages will use the `test`
546−command provided by the setup.py. However, this is currently deprecated
547−https://github.com/pypa/setuptools/pull/1878 and your package should provide
548−it's own checkPhase.
546+command provided by the setup.py (i.e. `python setup.py test`). However,
547+this is currently deprecated https://github.com/pypa/setuptools/pull/1878
548+and your package should provide its own checkPhase.
549549
550550*NOTE:* The `checkPhase` for python maps to the `installCheckPhase` on a
551551normal derivation. This is due to many python packages not behaving well
@@ -632,7 +632,29 @@ Trying to concatenate the related strings to disable tests in a regular checkPha
632632would be much harder to read. This also enables us to comment on why specific tests
633633are disabled.
634634
635−#### Develop local package
635+#### Using pythonImportsCheck
636+
637+Although unit tests are highly prefered to valid correctness of a package. Not
638+all packages have test suites that can be ran easily, and some have none at all.
639+To help ensure the package still works, `pythonImportsCheck` can attempt to import
640+the listed modules.
641+
642+```
643+ pythonImportsCheck = [ "requests" "urllib" ];
644+```
645+roughly translates to:
646+```
647+ postCheck = ''
648+ PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
649+ python -c "import requests; import urllib"
650+ '';
651+```
652+However, this is done in it's own phase, and not dependent on whether `doCheck = true;`
653+
654+This can also be useful in verifying that the package doesn't assume commonly
655+present packages (e.g. `setuptools`)
656+
657+### Develop local package
636658
637659As a Python developer you're likely aware of [development mode](http://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode)
638660(`python setup.py develop`); instead of installing the package this command