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
b16a6dd2
Commit
b16a6dd2
authored
Feb 18, 2015
by
Arfrever Frehtes Taifersar Arahesis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete some dead code.
parent
47cbdc52
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
27 deletions
+3
-27
setuptools/command/bdist_egg.py
setuptools/command/bdist_egg.py
+2
-11
setuptools/command/build_py.py
setuptools/command/build_py.py
+1
-16
No files found.
setuptools/command/bdist_egg.py
View file @
b16a6dd2
...
...
@@ -2,7 +2,6 @@
Build .egg distributions"""
# This module should be kept compatible with Python 2.3
from
distutils.errors
import
DistutilsSetupError
from
distutils.dir_util
import
remove_tree
,
mkpath
from
distutils
import
log
...
...
@@ -406,10 +405,6 @@ def scan_module(egg_dir, base, name, stubs):
if
bad
in
symbols
:
log
.
warn
(
"%s: module MAY be using inspect.%s"
,
module
,
bad
)
safe
=
False
if
'__name__'
in
symbols
and
'__main__'
in
symbols
and
'.'
not
in
module
:
if
sys
.
version
[:
3
]
==
"2.4"
:
# -m works w/zipfiles in 2.5
log
.
warn
(
"%s: top-level module may be 'python -m' script"
,
module
)
safe
=
False
return
safe
...
...
@@ -441,7 +436,7 @@ INSTALL_DIRECTORY_ATTRS = [
]
def
make_zipfile
(
zip_filename
,
base_dir
,
verbose
=
0
,
dry_run
=
0
,
compress
=
Non
e
,
def
make_zipfile
(
zip_filename
,
base_dir
,
verbose
=
0
,
dry_run
=
0
,
compress
=
Tru
e
,
mode
=
'w'
):
"""Create a zip file from all the files under 'base_dir'. The output
zip file will be named 'base_dir' + ".zip". Uses either the "zipfile"
...
...
@@ -463,11 +458,7 @@ def make_zipfile(zip_filename, base_dir, verbose=0, dry_run=0, compress=None,
z
.
write
(
path
,
p
)
log
.
debug
(
"adding '%s'"
%
p
)
if
compress
is
None
:
# avoid 2.3 zipimport bug when 64 bits
compress
=
(
sys
.
version
>=
"2.4"
)
compression
=
[
zipfile
.
ZIP_STORED
,
zipfile
.
ZIP_DEFLATED
][
bool
(
compress
)]
compression
=
zipfile
.
ZIP_DEFLATED
if
compress
else
zipfile
.
ZIP_STORED
if
not
dry_run
:
z
=
zipfile
.
ZipFile
(
zip_filename
,
mode
,
compression
=
compression
)
for
dirname
,
dirs
,
files
in
os
.
walk
(
base_dir
):
...
...
setuptools/command/build_py.py
View file @
b16a6dd2
...
...
@@ -136,22 +136,7 @@ class build_py(orig.build_py, Mixin2to3):
mf
.
setdefault
(
src_dirs
[
d
],
[]).
append
(
path
)
def
get_data_files
(
self
):
pass
# kludge 2.4 for lazy computation
if
sys
.
version
<
"2.4"
:
# Python 2.4 already has this code
def
get_outputs
(
self
,
include_bytecode
=
1
):
"""Return complete list of files copied to the build directory
This includes both '.py' files and data files, as well as '.pyc'
and '.pyo' files if 'include_bytecode' is true. (This method is
needed for the 'install_lib' command to do its job properly, and to
generate a correct installation manifest.)
"""
return
orig
.
build_py
.
get_outputs
(
self
,
include_bytecode
)
+
[
os
.
path
.
join
(
build_dir
,
filename
)
for
package
,
src_dir
,
build_dir
,
filenames
in
self
.
data_files
for
filename
in
filenames
]
pass
# Lazily compute data files in _get_data_files() function.
def
check_package
(
self
,
package
,
package_dir
):
"""Check namespace packages' __init__ for declare_namespace"""
...
...
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