Executable files in templates do not have permissions preserved

Issue #2 new
created an issue

I don't know if this is by design, but files that are executable in my template do not have their permissions preserved. Checked with PasteScript

As a workaround, I have this in my Template subclass:

    def post(self, command, output_dir, vars):
        """Make some files executable.
        Pastescript forgets to do so,
        if command.command_name == 'create':
            # not sure if there's a better thing to check.
            import os.path
            package_dir = os.path.join(output_dir, vars['project'])
            for fname in ('manage.py', 'manage.sh'):
                f = os.path.join(package_dir, fname)
                os.chmod(f, 0770)

Comments (2)

  1. Log in to comment