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
874b7ef0
Commit
874b7ef0
authored
Feb 11, 2020
by
Jason R. Coombs
Committed by
GitHub
Feb 11, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1764 from venthur/fix/1557
Deprecated Eggsecutable Scripts
parents
a5dec2f1
ce8e3ee1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
1 deletion
+26
-1
changelog.d/1557.change.rst
changelog.d/1557.change.rst
+1
-0
docs/setuptools.txt
docs/setuptools.txt
+2
-0
setuptools/command/bdist_egg.py
setuptools/command/bdist_egg.py
+8
-1
setuptools/tests/test_bdist_egg.py
setuptools/tests/test_bdist_egg.py
+15
-0
No files found.
changelog.d/1557.change.rst
0 → 100644
View file @
874b7ef0
Deprecated eggsecutable scripts and updated docs.
docs/setuptools.txt
View file @
874b7ef0
...
...
@@ -560,6 +560,8 @@ Services and Plugins`_.
"Eggsecutable" Scripts
----------------------
.. deprecated:: 45.3.0
Occasionally, there are situations where it's desirable to make an ``.egg``
file directly executable. You can do this by including an entry point such
as the following::
...
...
setuptools/command/bdist_egg.py
View file @
874b7ef0
...
...
@@ -11,13 +11,14 @@ import os
import
re
import
textwrap
import
marshal
import
warnings
from
setuptools.extern
import
six
from
pkg_resources
import
get_build_platform
,
Distribution
,
ensure_directory
from
pkg_resources
import
EntryPoint
from
setuptools.extension
import
Library
from
setuptools
import
Command
from
setuptools
import
Command
,
SetuptoolsDeprecationWarning
try
:
# Python 2.7 or >=3.2
...
...
@@ -278,6 +279,12 @@ class bdist_egg(Command):
if ep is None:
return '
w
' # not an eggsecutable, do it the usual way.
warnings.warn(
"Eggsecutables are deprecated and will be removed in a future "
"version.",
SetuptoolsDeprecationWarning
)
if not ep.attrs or ep.extras:
raise DistutilsSetupError(
"eggsecutable entry point (%r) cannot have '
extras
' "
...
...
setuptools/tests/test_bdist_egg.py
View file @
874b7ef0
...
...
@@ -7,6 +7,7 @@ import zipfile
import
pytest
from
setuptools.dist
import
Distribution
from
setuptools
import
SetuptoolsDeprecationWarning
from
.
import
contexts
...
...
@@ -64,3 +65,17 @@ class Test:
names = list(zi.filename for zi in zip.filelist)
assert '
hi
.
pyc
' in names
assert '
hi
.
py
' not in names
def test_eggsecutable_warning(self, setup_context, user_override):
dist = Distribution(dict(
script_name='
setup
.
py
',
script_args=['
bdist_egg
'],
name='
foo
',
py_modules=['
hi
'],
entry_points={
'
setuptools
.
installation
':
['
eggsecutable
=
my_package
.
some_module
:
main_func
']},
))
dist.parse_command_line()
with pytest.warns(SetuptoolsDeprecationWarning):
dist.run_commands()
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