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
d6501f3c
Commit
d6501f3c
authored
Jun 14, 2020
by
Ofek Lev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address
parent
01121d05
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
setuptools/command/easy_install.py
setuptools/command/easy_install.py
+2
-4
setuptools/tests/test_easy_install.py
setuptools/tests/test_easy_install.py
+2
-4
No files found.
setuptools/command/easy_install.py
View file @
d6501f3c
...
...
@@ -2070,9 +2070,7 @@ class ScriptWriter:
gui apps.
"""
try
:
from
importlib.metadata
import
distribution
# noqa: F401
if
sys
.
version_info
>=
(
3
,
8
):
template
=
textwrap
.
dedent
(
r"""
# EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r
__requires__ = %(spec)r
...
...
@@ -2086,7 +2084,7 @@ class ScriptWriter:
if entry_point.group == %(group)r and entry_point.name == %(name)r:
sys.exit(entry_point.load()())
"""
).
lstrip
()
# noqa: E501
e
xcept
ImportError
:
e
lse
:
template
=
textwrap
.
dedent
(
r"""
# EASY-INSTALL-ENTRY-SCRIPT: %(spec)r,%(group)r,%(name)r
__requires__ = %(spec)r
...
...
setuptools/tests/test_easy_install.py
View file @
d6501f3c
...
...
@@ -71,9 +71,7 @@ class TestEasyInstallTest:
def
test_get_script_args
(
self
):
header
=
ei
.
CommandSpec
.
best
().
from_environment
().
as_header
()
try
:
from
importlib.metadata
import
distribution
# noqa: F401
if
sys
.
version_info
>=
(
3
,
8
):
expected
=
header
+
DALS
(
r"""
# EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name'
__requires__ = 'spec'
...
...
@@ -87,7 +85,7 @@ class TestEasyInstallTest:
if entry_point.group == 'console_scripts' and entry_point.name == 'name':
sys.exit(entry_point.load()())
"""
)
# noqa: E501
e
xcept
ImportError
:
e
lse
:
expected
=
header
+
DALS
(
r"""
# EASY-INSTALL-ENTRY-SCRIPT: 'spec','console_scripts','name'
__requires__ = 'spec'
...
...
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