Figured it out based on some other SO answers - the following works:
class my_install_lib(distutils.command.install_lib.install_lib):
def run(self):
distutils.command.install_lib.install_lib.run(self)
for fn in self.get_outputs():
if <this is one of the binaries I want to be executable>:
# copied from distutils source - make the binaries executable
mode = ((os.stat(fn).st_mode) | 0555) & 07777
distutils.log.info("changing mode of %s to %o", fn, mode)
os.chmod(fn, mode)
and then pass cmdclass={'install_lib':my_install_lib}
to setup
.