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
3a0310a3
Commit
3a0310a3
authored
Sep 13, 2000
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added --force (-f) option to force installation (including bytecode
compilation).
parent
1830b211
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
4 deletions
+20
-4
Lib/distutils/command/install.py
Lib/distutils/command/install.py
+4
-2
Lib/distutils/command/install_data.py
Lib/distutils/command/install_data.py
+3
-0
Lib/distutils/command/install_headers.py
Lib/distutils/command/install_headers.py
+6
-1
Lib/distutils/command/install_lib.py
Lib/distutils/command/install_lib.py
+3
-0
Lib/distutils/command/install_scripts.py
Lib/distutils/command/install_scripts.py
+4
-1
No files found.
Lib/distutils/command/install.py
View file @
3a0310a3
...
...
@@ -85,8 +85,9 @@ class install (Command):
(
'install-data='
,
None
,
"installation directory for data files"
),
# For lazy debuggers who just want to test the install
# commands without rerunning "build" all the time
# Miscellaneous control options
(
'force'
,
'f'
,
"force installation (overwrite any existing files)"
),
(
'skip-build'
,
None
,
"skip rebuilding everything (for testing/debugging)"
),
...
...
@@ -146,6 +147,7 @@ class install (Command):
self
.
extra_path
=
None
self
.
install_path_file
=
0
self
.
force
=
0
self
.
skip_build
=
0
# These are only here as a conduit from the 'build' command to the
...
...
Lib/distutils/command/install_data.py
View file @
3a0310a3
...
...
@@ -22,18 +22,21 @@ class install_data (Command):
"(default: installation base dir)"
),
(
'root='
,
None
,
"install everything relative to this alternate root directory"
),
(
'force'
,
'f'
,
"force installation (overwrite existing files)"
),
]
def
initialize_options
(
self
):
self
.
install_dir
=
None
self
.
outfiles
=
[]
self
.
root
=
None
self
.
force
=
0
self
.
data_files
=
self
.
distribution
.
data_files
def
finalize_options
(
self
):
self
.
set_undefined_options
(
'install'
,
(
'install_data'
,
'install_dir'
),
(
'root'
,
'root'
),
(
'force'
,
'force'
),
)
def
run
(
self
):
...
...
Lib/distutils/command/install_headers.py
View file @
3a0310a3
...
...
@@ -17,16 +17,21 @@ class install_headers (Command):
user_options
=
[(
'install-dir='
,
'd'
,
"directory to install header files to"
),
(
'force'
,
'f'
,
"force installation (overwrite existing files)"
),
]
def
initialize_options
(
self
):
self
.
install_dir
=
None
self
.
force
=
0
self
.
outfiles
=
[]
def
finalize_options
(
self
):
self
.
set_undefined_options
(
'install'
,
(
'install_headers'
,
'install_dir'
))
(
'install_headers'
,
'install_dir'
),
(
'force'
,
'force'
))
def
run
(
self
):
headers
=
self
.
distribution
.
headers
...
...
Lib/distutils/command/install_lib.py
View file @
3a0310a3
...
...
@@ -13,6 +13,7 @@ class install_lib (Command):
user_options
=
[
(
'install-dir='
,
'd'
,
"directory to install to"
),
(
'build-dir='
,
'b'
,
"build directory (where to install from)"
),
(
'force'
,
'f'
,
"force installation (overwrite existing files)"
),
(
'compile'
,
'c'
,
"compile .py to .pyc"
),
(
'optimize'
,
'o'
,
"compile .py to .pyo (optimized)"
),
(
'skip-build'
,
None
,
"skip the build steps"
),
...
...
@@ -23,6 +24,7 @@ class install_lib (Command):
# let the 'install' command dictate our installation directory
self
.
install_dir
=
None
self
.
build_dir
=
None
self
.
force
=
0
self
.
compile
=
1
self
.
optimize
=
1
self
.
skip_build
=
None
...
...
@@ -35,6 +37,7 @@ class install_lib (Command):
self
.
set_undefined_options
(
'install'
,
(
'build_lib'
,
'build_dir'
),
(
'install_lib'
,
'install_dir'
),
(
'force'
,
'force'
),
(
'compile_py'
,
'compile'
),
(
'optimize_py'
,
'optimize'
),
(
'skip_build'
,
'skip_build'
),
...
...
Lib/distutils/command/install_scripts.py
View file @
3a0310a3
...
...
@@ -18,11 +18,13 @@ class install_scripts (Command):
user_options
=
[
(
'install-dir='
,
'd'
,
"directory to install scripts to"
),
(
'build-dir='
,
'b'
,
"build directory (where to install from)"
),
(
'force'
,
'f'
,
"force installation (overwrite existing files)"
),
(
'skip-build'
,
None
,
"skip the build steps"
),
]
def
initialize_options
(
self
):
self
.
install_dir
=
None
self
.
force
=
0
self
.
build_dir
=
None
self
.
skip_build
=
None
...
...
@@ -30,13 +32,14 @@ class install_scripts (Command):
self
.
set_undefined_options
(
'build'
,
(
'build_scripts'
,
'build_dir'
))
self
.
set_undefined_options
(
'install'
,
(
'install_scripts'
,
'install_dir'
),
(
'force'
,
'force'
),
(
'skip_build'
,
'skip_build'
),
)
def
run
(
self
):
if
not
self
.
skip_build
:
self
.
run_command
(
'build_scripts'
)
self
.
outfiles
=
self
.
copy_tree
(
self
.
build_dir
,
self
.
install_dir
)
self
.
outfiles
=
self
.
copy_tree
(
self
.
build_dir
,
self
.
install_dir
)
if
os
.
name
==
'posix'
:
# Set the executable bits (owner, group, and world) on
# all the scripts we just installed.
...
...
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