[issue12394] packaging: generate scripts from callable (dotted paths)

Éric Araujo report at bugs.python.org
Sat Jul 23 11:45:31 CEST 2011


Éric Araujo <merwok at netwok.org> added the comment:

I confirm fixing 0o755 makes the tests pass for me.

Your code gives one warning:
build_scripts.py:241: BytesWarning: str() on a bytes instance
  hdr = "#!%(executable)s%(options)s\n" % locals()

The object with the name executable or options is bytes, which you should explicitly convert to a string with decode.  I also don’t like using locals(), but that’s a personal style thing.

Your test should catch stdout (see other packaging tests for how to do that), so that people or buildbots running the tests don’t see “Hello world!”, and so that you can run asserts for the output.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12394>
_______________________________________


More information about the Python-bugs-list mailing list