mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Revert "bpo-34977: Add Windows App Store package (GH-10245)" (GH-11019)
This reverts commit 468a15aaf9
.
This commit is contained in:
parent
8452ca15f4
commit
cb0b78a070
52 changed files with 331 additions and 3085 deletions
|
@ -1,44 +0,0 @@
|
|||
"""
|
||||
File generation for catalog signing non-binary contents.
|
||||
"""
|
||||
|
||||
__author__ = "Steve Dower <steve.dower@python.org>"
|
||||
__version__ = "3.8"
|
||||
|
||||
|
||||
import sys
|
||||
|
||||
__all__ = ["PYTHON_CAT_NAME", "PYTHON_CDF_NAME"]
|
||||
|
||||
|
||||
def public(f):
|
||||
__all__.append(f.__name__)
|
||||
return f
|
||||
|
||||
|
||||
PYTHON_CAT_NAME = "python.cat"
|
||||
PYTHON_CDF_NAME = "python.cdf"
|
||||
|
||||
|
||||
CATALOG_TEMPLATE = r"""[CatalogHeader]
|
||||
Name={target.stem}.cat
|
||||
ResultDir={target.parent}
|
||||
PublicVersion=1
|
||||
CatalogVersion=2
|
||||
HashAlgorithms=SHA256
|
||||
PageHashes=false
|
||||
EncodingType=
|
||||
|
||||
[CatalogFiles]
|
||||
"""
|
||||
|
||||
|
||||
def can_sign(file):
|
||||
return file.is_file() and file.stat().st_size
|
||||
|
||||
|
||||
@public
|
||||
def write_catalog(target, files):
|
||||
with target.open("w", encoding="utf-8") as cat:
|
||||
cat.write(CATALOG_TEMPLATE.format(target=target))
|
||||
cat.writelines("<HASH>{}={}\n".format(n, f) for n, f in files if can_sign(f))
|
Loading…
Add table
Add a link
Reference in a new issue