Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
fc7885b9
Commit
fc7885b9
authored
Jan 24, 2003
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change the mode of scripts in the build/scripts* directory to
executable.
parent
bfd05538
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
command/build_scripts.py
command/build_scripts.py
+12
-0
No files found.
command/build_scripts.py
View file @
fc7885b9
...
...
@@ -7,6 +7,7 @@ Implements the Distutils 'build_scripts' command."""
__revision__
=
"$Id$"
import
sys
,
os
,
re
from
stat
import
ST_MODE
from
distutils
import
sysconfig
from
distutils.core
import
Command
from
distutils.dep_util
import
newer
...
...
@@ -54,10 +55,12 @@ class build_scripts (Command):
line to refer to the current Python interpreter as we copy.
"""
self.mkpath(self.build_dir)
outfiles = []
for script in self.scripts:
adjust = 0
script = convert_path(script)
outfile = os.path.join(self.build_dir, os.path.basename(script))
outfiles.append(outfile)
if not self.force and not newer(script, outfile):
log.debug("
not
copying
%
s
(
up
-
to
-
date
)
", script)
...
...
@@ -106,6 +109,15 @@ class build_scripts (Command):
f
.
close
()
self
.
copy_file
(
script
,
outfile
)
if
os
.
name
==
'posix'
:
for
file
in
outfiles
:
if
self
.
dry_run
:
log
.
info
(
"changing mode of %s"
,
file
)
else
:
mode
=
((
os
.
stat
(
file
)[
ST_MODE
])
|
0555
)
&
07777
log
.
info
(
"changing mode of %s to %o"
,
file
,
mode
)
os
.
chmod
(
file
,
mode
)
# copy_scripts ()
# class build_scripts
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment