File tree Expand file tree Collapse file tree 6 files changed +12
-36
lines changed
Expand file tree Collapse file tree 6 files changed +12
-36
lines changed Original file line number Diff line number Diff line change 1+ v4.10.0
2+ =======
3+
4+ * #354: Removed ``Distribution._local `` factory. This
5+ functionality was created as a demonstration of the
6+ possible implementation. Now, the
7+ `pep517 <https://pypi.org/project/pep517 >`_ package
8+ provides this functionality directly through
9+ `pep517.meta.load <https://github.com/pypa/pep517/blob/a942316305395f8f757f210e2b16f738af73f8b8/pep517/meta.py#L63-L73 >`_.
10+
111v4.9.0
212======
313
Original file line number Diff line number Diff line change @@ -576,18 +576,6 @@ def _discover_resolvers():
576576 )
577577 return filter (None , declared )
578578
579- @classmethod
580- def _local (cls , root = '.' ):
581- from pep517 import build , meta
582-
583- system = build .compat_system (root )
584- builder = functools .partial (
585- meta .build ,
586- source_dir = root ,
587- system = system ,
588- )
589- return PathDistribution (zipp .Path (meta .build_as_zip (builder )))
590-
591579 @property
592580 def metadata (self ) -> _meta .PackageMetadata :
593581 """Return the parsed metadata for this Distribution.
Original file line number Diff line number Diff line change @@ -3,3 +3,5 @@ norecursedirs=dist build .tox .eggs
33addopts =--doctest-modules
44doctest_optionflags =ALLOW_UNICODE ELLIPSIS
55filterwarnings =
6+ # Suppress deprecation warning in flake8
7+ ignore:SelectableGroups dict interface is deprecated::flake8
Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ testing =
4646 # local
4747 importlib_resources>=1.3; python_version < "3.9"
4848 packaging
49- pep517
5049 pyfakefs
5150 flufl.flake8
5251 pytest-perf >= 0.9.2
Original file line number Diff line number Diff line change @@ -231,21 +231,6 @@ def setUp(self):
231231 build_files (EggInfoFile .files , prefix = self .site_dir )
232232
233233
234- class LocalPackage :
235- files : FilesDef = {
236- "setup.py" : """
237- import setuptools
238- setuptools.setup(name="local-pkg", version="2.0.1")
239- """ ,
240- }
241-
242- def setUp (self ):
243- self .fixtures = contextlib .ExitStack ()
244- self .addCleanup (self .fixtures .close )
245- self .fixtures .enter_context (tempdir_as_cwd ())
246- build_files (self .files )
247-
248-
249234def build_files (file_defs , prefix = pathlib .Path ()):
250235 """Build a set of files/directories, as described by the
251236
Original file line number Diff line number Diff line change 44
55from . import fixtures
66from importlib_metadata import (
7- Distribution ,
87 MetadataPathFinder ,
98 _compat ,
109 distributions ,
@@ -44,13 +43,6 @@ def __getattribute__(self, name):
4443 _compat .disable_stdlib_finder ()
4544
4645
47- class LocalProjectTests (fixtures .LocalPackage , unittest .TestCase ):
48- def test_find_local (self ):
49- dist = Distribution ._local ()
50- assert dist .metadata ['Name' ] == 'local-pkg'
51- assert dist .version == '2.0.1'
52-
53-
5446class DistSearch (unittest .TestCase ):
5547 def test_search_dist_dirs (self ):
5648 """
You can’t perform that action at this time.
0 commit comments