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
0eeebfda
Commit
0eeebfda
authored
May 28, 2000
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved warnings out of 'finalize_options()' into 'run()'.
Added a warning for 'bdist_base' directory.
parent
95811443
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
Lib/distutils/command/clean.py
Lib/distutils/command/clean.py
+13
-7
No files found.
Lib/distutils/command/clean.py
View file @
0eeebfda
...
...
@@ -34,13 +34,6 @@ class clean (Command):
self
.
all
=
None
def
finalize_options
(
self
):
if
self
.
build_lib
and
not
os
.
path
.
exists
(
self
.
build_lib
):
self
.
warn
(
"'%s' does not exist -- can't clean it"
%
self
.
build_lib
)
if
self
.
build_temp
and
not
os
.
path
.
exists
(
self
.
build_temp
):
self
.
warn
(
"'%s' does not exist -- can't clean it"
%
self
.
build_temp
)
self
.
set_undefined_options
(
'build'
,
(
'build_base'
,
'build_base'
),
(
'build_lib'
,
'build_lib'
),
...
...
@@ -53,11 +46,21 @@ class clean (Command):
# gone)
if
os
.
path
.
exists
(
self
.
build_temp
):
remove_tree
(
self
.
build_temp
,
self
.
verbose
,
self
.
dry_run
)
else
:
self
.
warn
(
"'%s' does not exist -- can't clean it"
%
self
.
build_temp
)
if
self
.
all
:
# remove the module build directory (unless already gone)
if
os
.
path
.
exists
(
self
.
build_lib
):
remove_tree
(
self
.
build_lib
,
self
.
verbose
,
self
.
dry_run
)
else
:
self
.
warn
(
"'%s' does not exist -- can't clean it"
%
self
.
build_lib
)
# remove the temporary directory used for creating built
# distributions (default "build/bdist") -- eg. type of
# built distribution will have its own subdirectory under
...
...
@@ -65,6 +68,9 @@ class clean (Command):
# 'remove_tree()'.
if
os
.
path
.
exists
(
self
.
bdist_base
):
remove_tree
(
self
.
bdist_base
,
self
.
verbose
,
self
.
dry_run
)
else
:
self
.
warn
(
"'%s' does not exist -- can't clean it"
%
self
.
bdist_base
)
# just for the heck of it, try to remove the base build directory:
# we might have emptied it right now, but if not we don't care
...
...
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