@@ -56,24 +56,6 @@ def git_filter_arg():
56
56
else :
57
57
return []
58
58
59
- # pyproject.toml `py_modules` values that are incorrect. These should all have PRs filed!
60
- # and should be removed when the fixed version is incorporated in its respective bundle.
61
-
62
- pyproject_py_modules_blocklist = set ((
63
- # adafruit bundle
64
- "adafruit_colorsys" ,
65
-
66
- # community bundle
67
- "at24mac_eeprom" ,
68
- "circuitpython_Candlesticks" ,
69
- "CircuitPython_Color_Picker" ,
70
- "CircuitPython_Equalizer" ,
71
- "CircuitPython_Scales" ,
72
- "circuitPython_Slider" ,
73
- "circuitpython_uboxplot" ,
74
- "P1AM" ,
75
- "p1am_200_helpers" ,
76
- ))
77
59
78
60
if sys .version_info >= (3 , 11 ):
79
61
from tomllib import loads as load_toml
@@ -216,12 +198,6 @@ def get_package_info(library_path, package_folder_prefix):
216
198
py_modules = get_nested (pyproject_toml , "tool" , "setuptools" , "py-modules" , default = [])
217
199
packages = get_nested (pyproject_toml , "tool" , "setuptools" , "packages" , default = [])
218
200
219
- blocklisted = [name for name in py_modules if name in pyproject_py_modules_blocklist ]
220
-
221
- if blocklisted :
222
- print (f"{ lib_path } /settings.toml:1: { blocklisted [0 ]} blocklisted: not using metadata from pyproject.toml" )
223
- py_modules = packages = ()
224
-
225
201
example_files = [sub_path for sub_path in (lib_path / "examples" ).rglob ("*" )
226
202
if sub_path .is_file ()]
227
203
@@ -249,29 +225,7 @@ def get_package_info(library_path, package_folder_prefix):
249
225
py_files = [lib_path / f"{ py_module } .py" ]
250
226
251
227
else :
252
- print (f"{ lib_path } : Using legacy autodetection" )
253
- package_info ["is_package" ] = False
254
- for file in glob_search :
255
- if file .parts [parent_idx ] != "examples" :
256
- if len (file .parts ) > parent_idx + 1 :
257
- for prefix in package_folder_prefix :
258
- if file .parts [parent_idx ].startswith (prefix ):
259
- package_info ["is_package" ] = True
260
- if package_info ["is_package" ]:
261
- package_files .append (file )
262
- else :
263
- if file .name in IGNORE_PY :
264
- #print("Ignoring:", file.resolve())
265
- continue
266
- if file .parent == lib_path :
267
- py_files .append (file )
268
-
269
- if package_files :
270
- package_info ["module_name" ] = package_files [0 ].relative_to (library_path ).parent .name
271
- elif py_files :
272
- package_info ["module_name" ] = py_files [0 ].relative_to (library_path ).name [:- 3 ]
273
- else :
274
- package_info ["module_name" ] = None
228
+ raise ValueError ("Must specify exactly one of tool.setuptools.py-modules or .packages" )
275
229
276
230
if len (py_files ) > 1 :
277
231
raise ValueError ("Multiple top level py files not allowed. Please put "
0 commit comments