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
fa81391f
Commit
fa81391f
authored
Jan 20, 2021
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove eggsecutable
parent
8222d6f7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
74 deletions
+2
-74
setup.py
setup.py
+0
-2
setuptools/command/bdist_egg.py
setuptools/command/bdist_egg.py
+2
-47
setuptools/command/easy_install.py
setuptools/command/easy_install.py
+0
-10
setuptools/tests/test_bdist_egg.py
setuptools/tests/test_bdist_egg.py
+0
-15
No files found.
setup.py
View file @
fa81391f
...
...
@@ -171,8 +171,6 @@ setup_params = dict(
"dependency_links.txt = setuptools.command.egg_info:overwrite_arg"
,
],
"console_scripts"
:
list
(
_gen_console_scripts
()),
"setuptools.installation"
:
[
'eggsecutable = setuptools.command.easy_install:bootstrap'
],
},
dependency_links
=
[
pypi_link
(
...
...
setuptools/command/bdist_egg.py
View file @
fa81391f
...
...
@@ -2,7 +2,6 @@
Build .egg distributions"""
from
distutils.errors
import
DistutilsSetupError
from
distutils.dir_util
import
remove_tree
,
mkpath
from
distutils
import
log
from
types
import
CodeType
...
...
@@ -11,12 +10,10 @@ import os
import
re
import
textwrap
import
marshal
import
warnings
from
pkg_resources
import
get_build_platform
,
Distribution
,
ensure_directory
from
pkg_resources
import
EntryPoint
from
setuptools.extension
import
Library
from
setuptools
import
Command
,
SetuptoolsDeprecationWarning
from
setuptools
import
Command
from
sysconfig
import
get_path
,
get_python_version
...
...
@@ -268,49 +265,7 @@ class bdist_egg(Command):
return analyze_egg(self.bdist_dir, self.stubs)
def gen_header(self):
epm = EntryPoint.parse_map(self.distribution.entry_points or '')
ep = epm.get('
setuptools
.
installation
', {}).get('
eggsecutable
')
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
' "
"or refer to a module" % (ep,)
)
pyver = '
{}.{}
'.format(*sys.version_info)
pkg = ep.module_name
full = '
.
'.join(ep.attrs)
base = ep.attrs[0]
basename = os.path.basename(self.egg_output)
header = (
"#!/bin/sh
\
n
"
'
if
[
`basename $0`
=
"%(basename)s"
]
\
n
'
'
then
exec
python
%
(
pyver
)
s
-
c
"'
"
import
sys
,
os
;
sys
.
path
.
insert
(
0
,
os
.
path
.
abspath
(
'$0'
));
"
"
from
%
(
pkg
)
s
import
%
(
base
)
s
;
sys
.
exit
(
%
(
full
)
s
())
"
'"
"$@"
\
n
'
'
else
\
n
'
'
echo
$
0
is
not
the
correct
name
for
this
egg
file
.
\
n
'
'
echo
Please
rename
it
back
to
%
(
basename
)
s
and
try
again
.
\
n
'
'
exec
false
\
n
'
'
fi
\
n
'
) % locals()
if not self.dry_run:
mkpath(os.path.dirname(self.egg_output), dry_run=self.dry_run)
f = open(self.egg_output, '
w
')
f.write(header)
f.close()
return '
a
'
return '
w
'
def copy_metadata_to(self, target_dir):
"Copy metadata (egg info) to the target_dir"
...
...
setuptools/command/easy_install.py
View file @
fa81391f
...
...
@@ -2284,16 +2284,6 @@ def current_umask():
return
tmp
def
bootstrap
():
# This function is called when setuptools*.egg is run using /bin/sh
import
setuptools
argv0
=
os
.
path
.
dirname
(
setuptools
.
__path__
[
0
])
sys
.
argv
[
0
]
=
argv0
sys
.
argv
.
append
(
argv0
)
main
()
def
main
(
argv
=
None
,
**
kw
):
from
setuptools
import
setup
from
setuptools.dist
import
Distribution
...
...
setuptools/tests/test_bdist_egg.py
View file @
fa81391f
...
...
@@ -7,7 +7,6 @@ import zipfile
import
pytest
from
setuptools.dist
import
Distribution
from
setuptools
import
SetuptoolsDeprecationWarning
from
.
import
contexts
...
...
@@ -65,17 +64,3 @@ 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