Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-38403: Update nuspec file for deprecated field and git repository (…
…GH-18657)

(cherry picked from commit d644891)

Co-authored-by: Steve Dower <steve.dower@python.org>
  • Loading branch information
zooba authored and miss-islington committed Feb 25, 2020
commit a7c3a8c1311b745348c89c9f472d7a0a69f90b54
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Package for nuget.org now includes repository reference and bundled icon
image.
1 change: 1 addition & 0 deletions PC/icons/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PC/icons/logox128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions PC/layout/support/nuspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""

import os
import sys

from .constants import *

Expand All @@ -14,6 +15,7 @@
"PYTHON_TAG": VER_DOT,
"PYTHON_VERSION": os.getenv("PYTHON_NUSPEC_VERSION"),
"FILELIST": r' <file src="**\*" />',
"GIT": sys._git,
}

NUSPEC_PLATFORM_DATA = dict(
Expand Down Expand Up @@ -42,10 +44,13 @@
<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>
<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}" />
{FILELIST}
</files>
</package>
Expand All @@ -68,5 +73,6 @@ def get_nuspec_layout(ns):
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"))