Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
70b1fd1a
Commit
70b1fd1a
authored
Sep 30, 2000
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved some things around for better organization.
parent
d15a9427
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
26 deletions
+36
-26
Lib/distutils/command/install.py
Lib/distutils/command/install.py
+36
-26
No files found.
Lib/distutils/command/install.py
View file @
70b1fd1a
...
...
@@ -173,6 +173,13 @@ class install (Command):
self
.
record
=
None
# -- Option finalizing methods -------------------------------------
# (This is rather more involved than for most commands,
# because this is where the policy for installing third-
# party Python modules on various platforms given a wide
# array of user input is decided. Yes, it's quite complex!)
def
finalize_options
(
self
):
# This method (and its pliant slaves, like 'finalize_unix()',
...
...
@@ -450,6 +457,8 @@ class install (Command):
setattr
(
self
,
attr
,
change_root
(
self
.
root
,
getattr
(
self
,
attr
)))
# -- Command execution methods -------------------------------------
def
run
(
self
):
# Obviously have to build before we can install
...
...
@@ -486,24 +495,18 @@ class install (Command):
# run ()
def
create_path_file
(
self
):
filename
=
os
.
path
.
join
(
self
.
install_libbase
,
self
.
path_file
+
".pth"
)
if
self
.
install_path_file
:
self
.
execute
(
write_file
,
(
filename
,
[
self
.
extra_dirs
]),
"creating %s"
%
filename
)
else
:
self
.
warn
(
"path file '%s' not created"
%
filename
)
# -- Predicates for sub-command list -------------------------------
def
has_lib
(
self
):
"""Return true if the current distribution has any Python
modules to install."""
return
(
self
.
distribution
.
has_pure_modules
()
or
self
.
distribution
.
has_ext_modules
())
def
has_headers
(
self
):
return
self
.
distribution
.
has_headers
()
def
has_scripts
(
self
):
return
self
.
distribution
.
has_scripts
()
def
has_data
(
self
):
return
self
.
distribution
.
has_data_files
()
# -- Reporting methods ---------------------------------------------
def
get_outputs
(
self
):
# This command doesn't have any outputs of its own, so just
...
...
@@ -515,7 +518,6 @@ class install (Command):
return
outputs
def
get_inputs
(
self
):
# XXX gee, this looks familiar ;-(
inputs
=
[]
...
...
@@ -526,15 +528,23 @@ class install (Command):
return
inputs
def
create_path_file
(
self
):
filename
=
os
.
path
.
join
(
self
.
install_libbase
,
self
.
path_file
+
".pth"
)
if
self
.
install_path_file
:
self
.
execute
(
write_file
,
(
filename
,
[
self
.
extra_dirs
]),
"creating %s"
%
filename
)
else
:
self
.
warn
(
"path file '%s' not created"
%
filename
)
# -- Predicates for sub-command list -------------------------------
def
has_lib
(
self
):
"""Return true if the current distribution has any Python
modules to install."""
return
(
self
.
distribution
.
has_pure_modules
()
or
self
.
distribution
.
has_ext_modules
())
def
has_headers
(
self
):
return
self
.
distribution
.
has_headers
()
def
has_scripts
(
self
):
return
self
.
distribution
.
has_scripts
()
def
has_data
(
self
):
return
self
.
distribution
.
has_data_files
()
# 'sub_commands': a list of commands this command might have to run to
# get its work done. See cmd.py for more info.
...
...
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