mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
bpo-43926: Cleaner metadata with PEP 566 JSON support. (GH-25565)
* bpo-43926: Cleaner metadata with PEP 566 JSON support. * Add blurb * Add versionchanged and versionadded declarations for changes to metadata. * Use descriptor for PEP 566
This commit is contained in:
parent
0ad1e0384c
commit
37e0c7850d
12 changed files with 254 additions and 26 deletions
|
@ -1,5 +1,6 @@
|
|||
import os
|
||||
import sys
|
||||
import copy
|
||||
import shutil
|
||||
import pathlib
|
||||
import tempfile
|
||||
|
@ -108,6 +109,16 @@ class DistInfoPkg(OnSysPath, SiteDir):
|
|||
super(DistInfoPkg, self).setUp()
|
||||
build_files(DistInfoPkg.files, self.site_dir)
|
||||
|
||||
def make_uppercase(self):
|
||||
"""
|
||||
Rewrite metadata with everything uppercase.
|
||||
"""
|
||||
shutil.rmtree(self.site_dir / "distinfo_pkg-1.0.0.dist-info")
|
||||
files = copy.deepcopy(DistInfoPkg.files)
|
||||
info = files["distinfo_pkg-1.0.0.dist-info"]
|
||||
info["METADATA"] = info["METADATA"].upper()
|
||||
build_files(files, self.site_dir)
|
||||
|
||||
|
||||
class DistInfoPkgWithDot(OnSysPath, SiteDir):
|
||||
files: FilesDef = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue