NUSPEC_DATA = {
"PYTHON_TAG": VER_DOT,
"PYTHON_VERSION": os.getenv("PYTHON_NUSPEC_VERSION"),
- "FILELIST": r' <file src="**\*" target="tools" />',
+ "FILELIST": r' <file src="**\*" exclude="python.png" target="tools" />',
"GIT": sys._git,
}
VER_DOT, VER_MICRO, "-" if VER_SUFFIX else "", VER_SUFFIX
)
-FILELIST_WITH_PROPS = r""" <file src="**\*" exclude="python.props" target="tools" />
+FILELIST_WITH_PROPS = r""" <file src="**\*" exclude="python.png;python.props" target="tools" />
<file src="python.props" target="build\native" />"""
NUSPEC_TEMPLATE = r"""<?xml version="1.0"?>
<license type="file">tools\LICENSE.txt</license>
<projectUrl>https://www.python.org/</projectUrl>
<description>Installs {PYTHON_BITNESS} Python for use in build scenarios.</description>
- <icon>images\logox128.png</icon>
+ <icon>images\python.png</icon>
<iconUrl>https://www.python.org/static/favicon.ico</iconUrl>
<tags>python</tags>
<repository type="git" url="https://github.com/Python/CPython.git" commit="{GIT[2]}" />
</metadata>
<files>
- <file src="{LOGO}" target="images" />
+ <file src="python.png" target="images" />
{FILELIST}
</files>
</package>
data[k] = v
if ns.include_all or ns.include_props:
data["FILELIST"] = FILELIST_WITH_PROPS
- data["LOGO"] = ns.source / "PC" / "icons" / "logox128.png"
nuspec = NUSPEC_TEMPLATE.format_map(data)
yield "python.nuspec", ("python.nuspec", nuspec.encode("utf-8"))
+ yield "python.png", ns.source / "PC" / "icons" / "logox128.png"
<PackageArguments Condition="$(Packages) != ''">"$(IntermediateOutputPath)pkg\pip.exe" -B -m pip install -U $(Packages)</PackageArguments>
- <NugetPackCommand>"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).nuspec" -BasePath "$(IntermediateOutputPath)pkg"</NugetPackCommand>
+ <NugetPackCommand>"$(Nuget)" pack "$(IntermediateOutputPath)pkg\python.nuspec" -BasePath "$(IntermediateOutputPath)pkg"</NugetPackCommand>
<NugetPackSymbolsCommand Condition="Exists('$(MSBuildThisFileDirectory)\$(OutputName).symbols.nuspec')">"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).symbols.nuspec" -BasePath "$(BuildPath.TrimEnd(`\`))"</NugetPackSymbolsCommand>
<NugetArguments>$(NugetArguments) -OutputDirectory "$(OutputPath.Trim(`\`))"</NugetArguments>
<NugetArguments>$(NugetArguments) -Version "$(NuspecVersion)"</NugetArguments>