Skip to content

Commit d644891

Browse files
authored
bpo-38403: Update nuspec file for deprecated field and git repository (GH-18657)
1 parent eb8ac57 commit d644891

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Package for nuget.org now includes repository reference and bundled icon
2+
image.

PC/icons/logo.svg

Lines changed: 1 addition & 0 deletions
Loading

PC/icons/logox128.png

1.17 KB
Loading

PC/layout/support/nuspec.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""
44

55
import os
6+
import sys
67

78
from .constants import *
89

@@ -14,6 +15,7 @@
1415
"PYTHON_TAG": VER_DOT,
1516
"PYTHON_VERSION": os.getenv("PYTHON_NUSPEC_VERSION"),
1617
"FILELIST": r' <file src="**\*" target="tools" />',
18+
"GIT": sys._git,
1719
}
1820

1921
NUSPEC_PLATFORM_DATA = dict(
@@ -42,10 +44,13 @@
4244
<license type="file">tools\LICENSE.txt</license>
4345
<projectUrl>https://www.python.org/</projectUrl>
4446
<description>Installs {PYTHON_BITNESS} Python for use in build scenarios.</description>
47+
<icon>images\logox128.png</icon>
4548
<iconUrl>https://www.python.org/static/favicon.ico</iconUrl>
4649
<tags>python</tags>
50+
<repository type="git" url="https://github.com/Python/CPython.git" commit="{GIT[2]}" />
4751
</metadata>
4852
<files>
53+
<file src="{LOGO}" target="images" />
4954
{FILELIST}
5055
</files>
5156
</package>
@@ -68,5 +73,6 @@ def get_nuspec_layout(ns):
6873
data[k] = v
6974
if ns.include_all or ns.include_props:
7075
data["FILELIST"] = FILELIST_WITH_PROPS
76+
data["LOGO"] = ns.source / "PC" / "icons" / "logox128.png"
7177
nuspec = NUSPEC_TEMPLATE.format_map(data)
7278
yield "python.nuspec", ("python.nuspec", nuspec.encode("utf-8"))

0 commit comments

Comments
 (0)