summaryrefslogtreecommitdiffstats
path: root/PC/layout/support/nuspec.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-02-25 20:24:48 (GMT)
committerGitHub <noreply@github.com>2020-02-25 20:24:48 (GMT)
commit1bbb81b251bcc8b05e0cd33cd36aef55481b13db (patch)
tree5b37e894abddb4c1c1b1329b9a3510797e1c634f /PC/layout/support/nuspec.py
parenteb4a3dfbb9b797d4b2ecf70cb36ac08219ed065a (diff)
downloadcpython-1bbb81b251bcc8b05e0cd33cd36aef55481b13db.zip
cpython-1bbb81b251bcc8b05e0cd33cd36aef55481b13db.tar.gz
cpython-1bbb81b251bcc8b05e0cd33cd36aef55481b13db.tar.bz2
bpo-38403: Update nuspec file for deprecated field and git repository (GH-18657)
(cherry picked from commit d6448919702142123d937a54f20a81aeaf8d2acc) Co-authored-by: Steve Dower <steve.dower@python.org>
Diffstat (limited to 'PC/layout/support/nuspec.py')
-rw-r--r--PC/layout/support/nuspec.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/PC/layout/support/nuspec.py b/PC/layout/support/nuspec.py
index b85095c..9c6a9a9 100644
--- a/PC/layout/support/nuspec.py
+++ b/PC/layout/support/nuspec.py
@@ -3,6 +3,7 @@ Provides .props file.
"""
import os
+import sys
from .constants import *
@@ -14,6 +15,7 @@ NUSPEC_DATA = {
"PYTHON_TAG": VER_DOT,
"PYTHON_VERSION": os.getenv("PYTHON_NUSPEC_VERSION"),
"FILELIST": r' <file src="**\*" target="tools" />',
+ "GIT": sys._git,
}
NUSPEC_PLATFORM_DATA = dict(
@@ -42,10 +44,13 @@ 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>
<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" />
{FILELIST}
</files>
</package>
@@ -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"))