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
19ee148e
Commit
19ee148e
authored
May 02, 2015
by
Steve Dower
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaces use of WinRAR to generate ZIP file with Python script
parent
ad98e7d0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
24 deletions
+6
-24
Tools/msi/buildrelease.bat
Tools/msi/buildrelease.bat
+1
-8
Tools/msi/make_zip.proj
Tools/msi/make_zip.proj
+0
-1
Tools/msi/make_zip.py
Tools/msi/make_zip.py
+4
-14
Tools/msi/uploadrelease.proj
Tools/msi/uploadrelease.proj
+1
-1
No files found.
Tools/msi/buildrelease.bat
View file @
19ee148e
...
...
@@ -64,13 +64,6 @@ for %%f in (%_DLLTOOL_PATH%) do set PATH=%PATH%;%%~dpf
set
_DLLTOOL_PATH
=
:skipdlltoolsearch
where
rar
/q
&&
goto
skiprarsearch
set
_RAR_PATH
=
where
/R
"
%ProgramFiles%
\WinRAR"
rar
>
"
%TEMP%
\rar.loc"
2
>
nul
&&
set
/P
_RAR_PATH
=
<
"
%TEMP%
\rar.loc"
&
del
"
%TEMP%
\rar.loc"
where
/R
"
%ProgramFiles
(x86)
%
\WinRAR"
rar
>
"
%TEMP%
\rar.loc"
2
>
nul
&&
set
/P
_RAR_PATH
=
<
"
%TEMP%
\rar.loc"
&
del
"
%TEMP%
\rar.loc"
if
not
exist
"
%_RAR_PATH%
"
echo
Cannot
find
WinRAR
on
PATH
or
in
external
&&
pause
:skiprarsearch
if
defined
BUILDX86
(
call
:build
x86
if
errorlevel
1
exit
/B
...
...
@@ -142,7 +135,7 @@ if errorlevel 1 exit /B
msbuild
"
%D%
bundle\releaseweb.wixproj"
/t
:Rebuild
%BUILDOPTS%
%CERTOPTS%
/p
:RebuildAll
=
false
if
errorlevel
1
exit
/B
if
defined
_RAR_PATH
msbuild
"
%D%
make_zip.proj"
/t
:Build
%BUILDOPTS%
%CERTOPTS%
"/p:RAR=
%_RAR_PATH%
"
msbuild
"
%D%
make_zip.proj"
/t
:Build
%BUILDOPTS%
%CERTOPTS%
if
not
"
%OUTDIR%
"
EQU
""
(
mkdir
"
%OUTDIR%
\
%OUTDIR_PLAT%
"
...
...
Tools/msi/make_zip.proj
View file @
19ee148e
...
...
@@ -15,7 +15,6 @@
<TargetPath>
$(OutputPath)\en-us\$(TargetName)$(TargetExt)
</TargetPath>
<Arguments>
"$(PythonExe)" "$(MSBuildThisFileDirectory)\make_zip.py"
</Arguments>
<Arguments>
$(Arguments) -e -o "$(TargetPath)" -t "$(IntermediateOutputPath)\zip_$(ArchName)" -a $(ArchName)
</Arguments>
<Arguments
Condition=
"Exists('$(RAR)')"
>
$(Arguments) --rar "$(RAR)"
</Arguments>
<Environment>
set DOC_FILENAME=python$(PythonVersion).chm
</Environment>
</PropertyGroup>
...
...
Tools/msi/make_zip.py
View file @
19ee148e
...
...
@@ -72,7 +72,7 @@ EMBED_LAYOUT = [
('
python35
.
zip
', '
Lib
', '
**/*
', include_in_lib),
]
def copy_to_layout(target,
source,
rel_sources):
def copy_to_layout(target, rel_sources):
count = 0
if target.suffix.lower() == '
.
zip
':
...
...
@@ -146,21 +146,11 @@ def main():
try:
for t, s, p, c in layout:
s = source / s.replace("$arch", arch)
copied = copy_to_layout(
temp / t.rstrip('
/
'),
source,
rglob(s, p, c)
)
copied = copy_to_layout(temp / t.rstrip('
/
'), rglob(s, p, c))
print('
Copied
{}
files
'.format(copied))
if rar and rar.is_file():
subprocess.check_call([
str(rar),
"a",
"-ed", "-ep1", "-s", "-r",
str(out),
str(temp / '
*
')
])
total = copy_to_layout(out, rglob(temp, '
*
', None))
print('
Wrote
{}
files
to
{}
'.format(total, out))
finally:
if delete_temp:
shutil.rmtree(temp, True)
...
...
Tools/msi/uploadrelease.proj
View file @
19ee148e
...
...
@@ -23,7 +23,7 @@
<File
Include=
"$(OutputPath)\*.msi;$(OutputPath)\*.msu"
>
<CopyTo>
$(MSITarget)
</CopyTo>
</File>
<File
Include=
"$(OutputPath)\*.exe"
>
<File
Include=
"$(OutputPath)\*.exe
;$(OutputPath)\*.zip
"
>
<CopyTo>
$(EXETarget)
</CopyTo>
</File>
<File
Include=
"$(PySourcePath)Doc\build\htmlhelp\python$(MajorVersionNumber)$(MinorVersionNumber)$(MicroVersionNumber)$(ReleaseLevelName).chm"
Condition=
"$(IncludeDoc)"
>
...
...
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