This question is a bit old by now, but I hope my answer will be useful to anyone who happens to find it just as I did.
I've had the same problem with my package. Apparently, neither setuptools nor pip (my pip is 1.5.6) handle permissions explicitly. Your option is either change permissions manually, or migrate from scripts parameter to entry_points.
1) Change file permissions manually
This is tricky and kludgy enough, but should work. The idea is, if the installation process puts your executable to /usr/local/bin, it also has permissions to chmod the file to include executable flags. From setup.py, after your setup() clause, run something like:
execpath = '/usr/local/bin/yourexec'
if os.name is 'posix' and os.path.exists(execpath):
os.chmod(execpath, int('755', 8))
2) Migrate to entry_points
setuptools offers an option for your setup() named entry_points. It accepts a dictionary with keys console_scripts and gui_scripts, which you can use as follows:
setup(
# Package name, version, author, links, classifiers, etc
entry_points = {
'console_scripts': [
'myexecfile = mypackage.mymainmodule:mymainfunction'
]
}
)
This statement will automatically generate myexecfile executable which calls mymainfunction from mymainmodule of mypackage, which can easily be the package you're distributing.
The catch you should know is that entry point functions (mymainfunction in this example) may not have any arguments. If you passed sys.argv to your main function from your executable as an argument, you should rewrite the function to retrieve and parse sys.argv by itself.
Chris Warrick wrote a good article on this feature called Python Apps The Right Way, you might find it useful.