Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
33f7310c
Kaydet (Commit)
33f7310c
authored
Haz 24, 2016
tarafından
Steve Dower
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Adds scripts for producing Nuget packages.
üst
a0643829
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
12 deletions
+103
-12
make_zip.py
Tools/msi/make_zip.py
+16
-12
make_pkg.proj
Tools/nuget/make_pkg.proj
+51
-0
python.nuspec
Tools/nuget/python.nuspec
+18
-0
pythonx86.nuspec
Tools/nuget/pythonx86.nuspec
+18
-0
No files found.
Tools/msi/make_zip.py
Dosyayı görüntüle @
33f7310c
...
@@ -75,10 +75,12 @@ def include_in_tools(p):
...
@@ -75,10 +75,12 @@ def include_in_tools(p):
return
p
.
suffix
.
lower
()
in
{
'.py'
,
'.pyw'
,
'.txt'
}
return
p
.
suffix
.
lower
()
in
{
'.py'
,
'.pyw'
,
'.txt'
}
FULL_LAYOUT
=
[
FULL_LAYOUT
=
[
(
'/'
,
'PCBuild/$arch'
,
'python*.exe'
,
is_not_debug
),
(
'/'
,
'PCBuild/$arch'
,
'python.exe'
,
is_not_debug
),
(
'/'
,
'PCBuild/$arch'
,
'python*.dll'
,
is_not_debug
),
(
'/'
,
'PCBuild/$arch'
,
'pythonw.exe'
,
is_not_debug
),
(
'/'
,
'PCBuild/$arch'
,
'python{0.major}.dll'
.
format
(
sys
.
version_info
),
is_not_debug
),
(
'/'
,
'PCBuild/$arch'
,
'python{0.major}{0.minor}.dll'
.
format
(
sys
.
version_info
),
is_not_debug
),
(
'DLLs/'
,
'PCBuild/$arch'
,
'*.pyd'
,
is_not_debug
),
(
'DLLs/'
,
'PCBuild/$arch'
,
'*.pyd'
,
is_not_debug
),
(
'DLLs/'
,
'PCBuild/$arch'
,
'*.dll'
,
is_not_debug
),
(
'DLLs/'
,
'PCBuild/$arch'
,
'*.dll'
,
is_not_debug
_or_python
),
(
'include/'
,
'include'
,
'*.h'
,
None
),
(
'include/'
,
'include'
,
'*.h'
,
None
),
(
'include/'
,
'PC'
,
'pyconfig.h'
,
None
),
(
'include/'
,
'PC'
,
'pyconfig.h'
,
None
),
(
'Lib/'
,
'Lib'
,
'**/*'
,
include_in_lib
),
(
'Lib/'
,
'Lib'
,
'**/*'
,
include_in_lib
),
...
@@ -150,17 +152,17 @@ def rglob(root, pattern, condition):
...
@@ -150,17 +152,17 @@ def rglob(root, pattern, condition):
def
main
():
def
main
():
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'-s'
,
'--source'
,
metavar
=
'dir'
,
help
=
'The directory containing the repository root'
,
type
=
Path
)
parser
.
add_argument
(
'-s'
,
'--source'
,
metavar
=
'dir'
,
help
=
'The directory containing the repository root'
,
type
=
Path
)
parser
.
add_argument
(
'-o'
,
'--out'
,
metavar
=
'file'
,
help
=
'The name of the output self-extracting archive'
,
type
=
Path
,
required
=
Tru
e
)
parser
.
add_argument
(
'-o'
,
'--out'
,
metavar
=
'file'
,
help
=
'The name of the output self-extracting archive'
,
type
=
Path
,
default
=
Non
e
)
parser
.
add_argument
(
'-t'
,
'--temp'
,
metavar
=
'dir'
,
help
=
'A directory to temporarily extract files into'
,
type
=
Path
,
default
=
None
)
parser
.
add_argument
(
'-t'
,
'--temp'
,
metavar
=
'dir'
,
help
=
'A directory to temporarily extract files into'
,
type
=
Path
,
default
=
None
)
parser
.
add_argument
(
'-e'
,
'--embed'
,
help
=
'Create an embedding layout'
,
action
=
'store_true'
,
default
=
False
)
parser
.
add_argument
(
'-e'
,
'--embed'
,
help
=
'Create an embedding layout'
,
action
=
'store_true'
,
default
=
False
)
parser
.
add_argument
(
'-a'
,
'--arch'
,
help
=
'Specify the architecture to use (win32/amd64)'
,
type
=
str
,
default
=
"win32"
)
parser
.
add_argument
(
'-a'
,
'--arch'
,
help
=
'Specify the architecture to use (win32/amd64)'
,
type
=
str
,
default
=
"win32"
)
ns
=
parser
.
parse_args
()
ns
=
parser
.
parse_args
()
source
=
ns
.
source
or
(
Path
(
__file__
)
.
parent
.
parent
.
parent
)
source
=
ns
.
source
or
(
Path
(
__file__
)
.
resolve
()
.
parent
.
parent
.
parent
)
out
=
ns
.
out
out
=
ns
.
out
arch
=
ns
.
arch
arch
=
ns
.
arch
assert
isinstance
(
source
,
Path
)
assert
isinstance
(
source
,
Path
)
assert
isinstance
(
out
,
Path
)
assert
not
out
or
isinstance
(
out
,
Path
)
assert
isinstance
(
arch
,
str
)
assert
isinstance
(
arch
,
str
)
if
ns
.
temp
:
if
ns
.
temp
:
...
@@ -170,10 +172,11 @@ def main():
...
@@ -170,10 +172,11 @@ def main():
temp
=
Path
(
tempfile
.
mkdtemp
())
temp
=
Path
(
tempfile
.
mkdtemp
())
delete_temp
=
True
delete_temp
=
True
try
:
if
out
:
out
.
parent
.
mkdir
(
parents
=
True
)
try
:
except
FileExistsError
:
out
.
parent
.
mkdir
(
parents
=
True
)
pass
except
FileExistsError
:
pass
try
:
try
:
temp
.
mkdir
(
parents
=
True
)
temp
.
mkdir
(
parents
=
True
)
except
FileExistsError
:
except
FileExistsError
:
...
@@ -190,8 +193,9 @@ def main():
...
@@ -190,8 +193,9 @@ def main():
with
open
(
str
(
temp
/
'pyvenv.cfg'
),
'w'
)
as
f
:
with
open
(
str
(
temp
/
'pyvenv.cfg'
),
'w'
)
as
f
:
print
(
'applocal = true'
,
file
=
f
)
print
(
'applocal = true'
,
file
=
f
)
total
=
copy_to_layout
(
out
,
rglob
(
temp
,
'*'
,
None
))
if
out
:
print
(
'Wrote {} files to {}'
.
format
(
total
,
out
))
total
=
copy_to_layout
(
out
,
rglob
(
temp
,
'**/*'
,
None
))
print
(
'Wrote {} files to {}'
.
format
(
total
,
out
))
finally
:
finally
:
if
delete_temp
:
if
delete_temp
:
shutil
.
rmtree
(
temp
,
True
)
shutil
.
rmtree
(
temp
,
True
)
...
...
Tools/nuget/make_pkg.proj
0 → 100644
Dosyayı görüntüle @
33f7310c
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"4.0"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<ProjectGuid>
{10487945-15D1-4092-A214-338395C4116B}
</ProjectGuid>
<OutputName>
python
</OutputName>
<OutputName
Condition=
"$(Platform) == 'x86'"
>
$(OutputName)x86
</OutputName>
<OutputSuffix></OutputSuffix>
<SupportSigning>
false
</SupportSigning>
</PropertyGroup>
<Import
Project=
"..\msi\msi.props"
/>
<PropertyGroup>
<Nuget
Condition=
"$(Nuget) == ''"
>
$(ExternalsDir)\windows-installer\nuget\nuget.exe
</Nuget>
<NuspecVersion>
$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)
</NuspecVersion>
<SignOutput>
false
</SignOutput>
<TargetName>
$(OutputName).$(NuspecVersion)
</TargetName>
<TargetExt>
.nupkg
</TargetExt>
<TargetPath>
$(OutputPath)\en-us\$(TargetName)$(TargetExt)
</TargetPath>
<IntermediateOutputPath>
$(IntermediateOutputPath)\nuget_$(ArchName)
</IntermediateOutputPath>
<CleanCommand>
rmdir /q/s "$(IntermediateOutputPath)"
</CleanCommand>
<PythonArguments>
"$(PythonExe)" "$(MSBuildThisFileDirectory)\..\msi\make_zip.py"
</PythonArguments>
<PythonArguments>
$(PythonArguments) -t "$(IntermediateOutputPath)" -a $(ArchName)
</PythonArguments>
<NugetArguments>
"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).nuspec"
</NugetArguments>
<NugetArguments>
$(NugetArguments) -BasePath "$(IntermediateOutputPath)"
</NugetArguments>
<NugetArguments>
$(NugetArguments) -OutputDirectory "$(OutputPath)\en-us"
</NugetArguments>
<NugetArguments>
$(NugetArguments) -Version "$(NuspecVersion)"
</NugetArguments>
<NugetArguments>
$(NugetArguments) -NoPackageAnalysis -NonInteractive
</NugetArguments>
<Environment>
setlocal
set DOC_FILENAME=python$(PythonVersion).chm
set VCREDIST_PATH=$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT
</Environment>
</PropertyGroup>
<Target
Name=
"_NugetMissing"
BeforeTargets=
"_Build"
Condition=
"!Exists($(Nuget))"
>
<Error
Text=
"$(Nuget) could not be found. Either avoid specifying the property or update your externals/windows-installer files."
/>
</Target>
<Target
Name=
"_Build"
>
<Exec
Command=
"$(Environment)
$(CleanCommand)
$(PythonArguments)"
/>
<Exec
Command=
"$(NugetArguments)"
/>
</Target>
<Target
Name=
"AfterBuild"
/>
<Target
Name=
"Build"
DependsOnTargets=
"_Build;AfterBuild"
/>
</Project>
Tools/nuget/python.nuspec
0 → 100644
Dosyayı görüntüle @
33f7310c
<?xml version="1.0"?>
<package
>
<metadata>
<id>
python
</id>
<title>
Python
</title>
<version>
0.0.0.0
</version>
<authors>
Python Software Foundation
</authors>
<licenseUrl>
https://docs.python.org/3/license.html
</licenseUrl>
<projectUrl>
https://www.python.org/
</projectUrl>
<requireLicenseAcceptance>
false
</requireLicenseAcceptance>
<description>
Installs 64-bit Python for use in build scenarios.
</description>
<iconUrl>
https://www.python.org/static/favicon.ico
</iconUrl>
<tags>
python
</tags>
</metadata>
<files>
<file
src=
"**\*"
target=
"tools"
/>
</files>
</package>
Tools/nuget/pythonx86.nuspec
0 → 100644
Dosyayı görüntüle @
33f7310c
<?xml version="1.0"?>
<package
>
<metadata>
<id>
pythonx86
</id>
<title>
Python (32-bit)
</title>
<authors>
Python Software Foundation
</authors>
<version>
0.0.0.0
</version>
<licenseUrl>
https://docs.python.org/3/license.html
</licenseUrl>
<projectUrl>
https://www.python.org/
</projectUrl>
<requireLicenseAcceptance>
false
</requireLicenseAcceptance>
<description>
Installs 32-bit Python for use in build scenarios.
</description>
<iconUrl>
https://www.python.org/static/favicon.ico
</iconUrl>
<tags>
python
</tags>
</metadata>
<files>
<file
src=
"**\*"
target=
"tools"
/>
</files>
</package>
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