mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-46474: Apply changes from importlib_metadata 4.10.0 (GH-30802)
This commit is contained in:
parent
d888ff5381
commit
443dec6c9a
3 changed files with 3 additions and 28 deletions
|
@ -12,7 +12,7 @@ from test.support import requires_zlib
|
|||
from typing import Dict, Union
|
||||
|
||||
try:
|
||||
from importlib import resources
|
||||
from importlib import resources # type: ignore
|
||||
|
||||
getattr(resources, 'files')
|
||||
getattr(resources, 'as_file')
|
||||
|
@ -232,21 +232,6 @@ class EggInfoFile(OnSysPath, SiteDir):
|
|||
build_files(EggInfoFile.files, prefix=self.site_dir)
|
||||
|
||||
|
||||
class LocalPackage:
|
||||
files: FilesDef = {
|
||||
"setup.py": """
|
||||
import setuptools
|
||||
setuptools.setup(name="local-pkg", version="2.0.1")
|
||||
""",
|
||||
}
|
||||
|
||||
def setUp(self):
|
||||
self.fixtures = contextlib.ExitStack()
|
||||
self.addCleanup(self.fixtures.close)
|
||||
self.fixtures.enter_context(tempdir_as_cwd())
|
||||
build_files(self.files)
|
||||
|
||||
|
||||
def build_files(file_defs, prefix=pathlib.Path()):
|
||||
"""Build a set of files/directories, as described by the
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue