File tree Expand file tree Collapse file tree 5 files changed +17
-24
lines changed Expand file tree Collapse file tree 5 files changed +17
-24
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ Restored license declaration in package metadata. See jaraco/skeleton#171.
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ classifiers = [
2222 " Topic :: Utilities" ,
2323]
2424requires-python = " >=3.9"
25+ license = " MIT"
2526dependencies = [
2627]
2728keywords = [" CPAN PyPI distutils eggs package management" ]
Original file line number Diff line number Diff line change @@ -471,12 +471,13 @@ def _expand_patterns(
471471 cls , patterns : list [str ], enforce_match : bool = True
472472 ) -> Iterator [str ]:
473473 """
474- >>> list(Distribution._expand_patterns(['LICENSE']))
475- ['LICENSE']
474+ >>> getfixture('sample_project_cwd')
475+ >>> list(Distribution._expand_patterns(['LICENSE.txt']))
476+ ['LICENSE.txt']
476477 >>> list(Distribution._expand_patterns(['pyproject.toml', 'LIC*']))
477- ['pyproject.toml', 'LICENSE']
478- >>> list(Distribution._expand_patterns(['setuptools /**/pyprojecttoml.py ']))
479- ['setuptools/config/pyprojecttoml.py ']
478+ ['pyproject.toml', 'LICENSE.txt ']
479+ >>> list(Distribution._expand_patterns(['src /**/*.dat ']))
480+ ['src/sample/package_data.dat ']
480481 """
481482 return (
482483 path .replace (os .sep , "/" )
@@ -488,8 +489,9 @@ def _expand_patterns(
488489 @staticmethod
489490 def _find_pattern (pattern : str , enforce_match : bool = True ) -> list [str ]:
490491 r"""
491- >>> Distribution._find_pattern("LICENSE")
492- ['LICENSE']
492+ >>> getfixture('sample_project_cwd')
493+ >>> Distribution._find_pattern("LICENSE.txt")
494+ ['LICENSE.txt']
493495 >>> Distribution._find_pattern("/LICENSE.MIT")
494496 Traceback (most recent call last):
495497 ...
Original file line number Diff line number Diff line change @@ -60,6 +60,12 @@ def sample_project(tmp_path):
6060 return tmp_path / 'sampleproject'
6161
6262
63+ @pytest .fixture
64+ def sample_project_cwd (sample_project ):
65+ with path .Path (sample_project ):
66+ yield
67+
68+
6369# sdist and wheel artifacts should be stable across a round of tests
6470# so we can build them once per session and use the files as "readonly"
6571
You can’t perform that action at this time.
0 commit comments