Commits

Vinay Sajip committed f6b7570 Draft

Closes #32: Default to setting mode bits on POSIX.

Comments (0)

Files changed (3)

       rather than absolute method. This fixes a problem for pip, where
       distlib is kept in the pip.vendor.distlib package.
 
-- _backports/sysconfig
+- _backport/sysconfig
 
     - The analogous change to that made for scripts, described above.
 

distlib/scripts.py

         self.add_launchers = add_launchers
         self.force = False
         self.clobber = False
-        self.set_mode = False
+        # It only makes sense to set mode bits on POSIX.
+        self.set_mode = (os.name == 'posix')
         self.variants = set(('', 'X.Y'))
         self._fileop = fileop or FileOperator(dry_run)
 

tests/test_scripts.py

 
     @unittest.skipUnless(os.name == 'posix', 'Test only valid for POSIX')
     def test_mode(self):
+        self.maker.set_mode = False
         files = self.maker.make('foo = foo:main')
         self.assertEqual(len(files), 2)
         for f in files: