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
7b2992eb
Commit
7b2992eb
authored
Jun 01, 2000
by
Greg Ward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure that 'make_archive()' returns the name of the new archive file.
parent
0534a48d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
archive_util.py
archive_util.py
+5
-4
No files found.
archive_util.py
View file @
7b2992eb
...
...
@@ -127,7 +127,6 @@ def check_archive_formats (formats):
def
make_archive
(
base_name
,
format
,
root_dir
=
None
,
base_dir
=
None
,
verbose
=
0
,
dry_run
=
0
):
"""Create an archive file (eg. zip or tar). 'base_name' is the name
of the file to create, minus any format-specific extension; 'format'
is the archive format: one of "zip", "tar", "ztar", or "gztar".
...
...
@@ -136,8 +135,8 @@ def make_archive (base_name, format,
archive. 'base_dir' is the directory where we start archiving from;
ie. 'base_dir' will be the common prefix of all files and
directories in the archive. 'root_dir' and 'base_dir' both default
to the current directory.
"""
to the current directory.
Returns the name of the archive file.
"""
save_cwd
=
os
.
getcwd
()
if
root_dir
is
not
None
:
if
verbose
:
...
...
@@ -160,11 +159,13 @@ def make_archive (base_name, format,
func
=
format_info
[
0
]
for
(
arg
,
val
)
in
format_info
[
1
]:
kwargs
[
arg
]
=
val
apply
(
func
,
(
base_name
,
base_dir
),
kwargs
)
filename
=
apply
(
func
,
(
base_name
,
base_dir
),
kwargs
)
if
root_dir
is
not
None
:
if
verbose
:
print
"changing back to '%s'"
%
save_cwd
os
.
chdir
(
save_cwd
)
return
filename
# make_archive ()
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