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
3fdbb8f7
Commit
3fdbb8f7
authored
May 05, 2014
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use modern syntax for octal values
parent
574ed793
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
pkg_resources.py
pkg_resources.py
+2
-2
setuptools/command/easy_install.py
setuptools/command/easy_install.py
+5
-5
setuptools/command/install_scripts.py
setuptools/command/install_scripts.py
+1
-1
setuptools/sandbox.py
setuptools/sandbox.py
+1
-1
No files found.
pkg_resources.py
View file @
3fdbb8f7
...
...
@@ -77,7 +77,7 @@ try:
except
ImportError
:
pass
def
_bypass_ensure_directory
(
name
,
mode
=
0
x1FF
):
# 0777
def
_bypass_ensure_directory
(
name
,
mode
=
0
o777
):
# Sandbox-bypassing version of ensure_directory()
if
not
WRITE_SUPPORT
:
raise
IOError
(
'"os.mkdir" not supported on this platform.'
)
...
...
@@ -1061,7 +1061,7 @@ variable to point to an accessible directory.
if os.name == 'posix':
# Make the resource executable
mode = ((os.stat(tempname).st_mode) | 0
x16D) & 0xFFF # 0555, 0
7777
mode = ((os.stat(tempname).st_mode) | 0
o555) & 0o
7777
os.chmod(tempname, mode)
def set_extraction_path(self, path):
...
...
setuptools/command/easy_install.py
View file @
3fdbb8f7
...
...
@@ -770,7 +770,7 @@ Please make the appropriate changes for your system and try again.
f
=
open
(
target
,
"w"
+
mode
)
f
.
write
(
contents
)
f
.
close
()
chmod
(
target
,
0
x1FF
-
mask
)
# 0777
chmod
(
target
,
0
o777
-
mask
)
def
install_eggs
(
self
,
spec
,
dist_filename
,
tmpdir
):
# .egg dirs or files are already built, so just return them
...
...
@@ -1110,7 +1110,7 @@ See the setuptools documentation for the "develop" command for more info.
self
.
byte_compile
(
to_compile
)
if
not
self
.
dry_run
:
for
f
in
to_chmod
:
mode
=
((
os
.
stat
(
f
)[
stat
.
ST_MODE
])
|
0
x16D
)
&
0xFED
# 0555, 0
7755
mode
=
((
os
.
stat
(
f
)[
stat
.
ST_MODE
])
|
0
o555
)
&
0o
7755
chmod
(
f
,
mode
)
def
byte_compile
(
self
,
to_compile
):
...
...
@@ -1206,8 +1206,8 @@ Please make the appropriate changes for your system and try again."""
home
=
convert_path
(
os
.
path
.
expanduser
(
"~"
))
for
name
,
path
in
iteritems
(
self
.
config_vars
):
if
path
.
startswith
(
home
)
and
not
os
.
path
.
isdir
(
path
):
self
.
debug_print
(
"os.makedirs('%s', 0700)"
%
path
)
os
.
makedirs
(
path
,
0
x1C0
)
# 0700
self
.
debug_print
(
"os.makedirs('%s', 0
o
700)"
%
path
)
os
.
makedirs
(
path
,
0
o700
)
INSTALL_SCHEMES
=
dict
(
posix
=
dict
(
...
...
@@ -1873,7 +1873,7 @@ def rmtree(path, ignore_errors=False, onerror=auto_chmod):
onerror
(
os
.
rmdir
,
path
,
sys
.
exc_info
())
def
current_umask
():
tmp
=
os
.
umask
(
0
x12
)
# 022
tmp
=
os
.
umask
(
0
o022
)
os
.
umask
(
tmp
)
return
tmp
...
...
setuptools/command/install_scripts.py
View file @
3fdbb8f7
...
...
@@ -49,4 +49,4 @@ class install_scripts(orig.install_scripts):
f
=
open
(
target
,
"w"
+
mode
)
f
.
write
(
contents
)
f
.
close
()
chmod
(
target
,
0
x1FF
-
mask
)
# 0777
chmod
(
target
,
0
o777
-
mask
)
setuptools/sandbox.py
View file @
3fdbb8f7
...
...
@@ -268,7 +268,7 @@ class DirectorySandbox(AbstractSandbox):
self._violation(operation, src, dst, *args, **kw)
return (src,dst)
def open(self, file, flags, mode=0
x1FF, *args, **kw): # 0777
def open(self, file, flags, mode=0
o777, *args, **kw):
"""Called for low-level os.open()"""
if flags & WRITE_FLAGS and not self._ok(file):
self._violation("os.open", file, flags, mode, *args, **kw)
...
...
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