now that we are going to have wheels, py source code might be not be installed

and the resulting genscript is useless

--HG--
branch : pluggy1
This commit is contained in:
holger krekel 2015-05-04 14:42:01 +02:00
parent 25963e0544
commit 920b5afe45
2 changed files with 11 additions and 0 deletions

View File

@ -34,6 +34,9 @@ def pkg_to_mapping(name):
for pyfile in toplevel.visit('*.py'):
pkg = pkgname(name, toplevel, pyfile)
name2src[pkg] = pyfile.read()
# with wheels py source code might be not be installed
# and the resulting genscript is useless, just bail out.
assert name2src, "no source code found for %r at %r" %(name, toplevel)
return name2src
def compress_mapping(mapping):

View File

@ -169,6 +169,14 @@ You can tell people to download the script and then e.g. run it like this::
python runtests.py
.. note::
You must have pytest and its dependencies installed as an sdist, not
as wheels because genscript need the source code for generating a
standalone script.
Integrating with distutils / ``python setup.py test``
--------------------------------------------------------