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
b2847255
Commit
b2847255
authored
May 27, 2015
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disallow path separators in script names. Fixes #390
parent
7ee56c52
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
setuptools/command/easy_install.py
setuptools/command/easy_install.py
+10
-0
No files found.
setuptools/command/easy_install.py
View file @
b2847255
...
...
@@ -2024,11 +2024,21 @@ class ScriptWriter(object):
for
type_
in
'console'
,
'gui'
:
group
=
type_
+
'_scripts'
for
name
,
ep
in
dist
.
get_entry_map
(
group
).
items
():
cls
.
_ensure_safe_name
(
name
)
script_text
=
cls
.
template
%
locals
()
args
=
cls
.
_get_script_args
(
type_
,
name
,
header
,
script_text
)
for
res
in
args
:
yield
res
@
staticmethod
def
_ensure_safe_name
(
name
):
"""
Prevent paths in *_scripts entry point names.
"""
has_path_sep
=
re
.
search
(
r'[\\/]'
,
name
)
if
has_path_sep
:
raise
ValueError
(
"Path separators not allowed in script names"
)
@
classmethod
def
get_writer
(
cls
,
force_windows
):
# for backward compatibility
...
...
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