@@ -166,6 +166,7 @@ def __init__(self, validators, bundle_submodules, latest_pylint, **kw_args):
166
166
self .latest_pylint = pkg_version_parse (latest_pylint )
167
167
self .output_file_data = []
168
168
self .validate_contents_quiet = kw_args .get ("validate_contents_quiet" , False )
169
+ self .has_setup_py_disabled = set ()
169
170
170
171
def run_repo_validation (self , repo ):
171
172
"""Run all the current validation functions on the provided repository and
@@ -537,8 +538,12 @@ def validate_contents(self, repo):
537
538
if not self .validate_contents_quiet :
538
539
return [ERROR_NEW_REPO_IN_WORK ]
539
540
541
+ if "setup.py.disabled" in files :
542
+ self .has_setup_py_disabled .add (repo ["name" ])
543
+
540
544
# if we're only running due to -v, ignore the rest. we only care about
541
- # adding in-work repos to the BUNDLE_IGNORE_LIST
545
+ # adding in-work repos to the BUNDLE_IGNORE_LIST and if setup.py is
546
+ # disabled
542
547
if self .validate_contents_quiet :
543
548
return []
544
549
@@ -599,14 +604,15 @@ def validate_contents(self, repo):
599
604
if "setup.py" in files :
600
605
file_info = content_list [files .index ("setup.py" )]
601
606
errors .extend (self ._validate_setup_py (repo , file_info ))
602
- else :
607
+ elif "setup.py.disabled" not in files :
603
608
errors .append (ERROR_MISSING_SETUP_PY )
604
609
605
- if "requirements.txt" in files :
606
- file_info = content_list [files .index ("requirements.txt" )]
607
- errors .extend (self ._validate_requirements_txt (repo , file_info ))
608
- else :
609
- errors .append (ERROR_MISSING_REQUIREMENTS_TXT )
610
+ if repo ["name" ] not in self .has_setup_py_disabled :
611
+ if "requirements.txt" in files :
612
+ file_info = content_list [files .index ("requirements.txt" )]
613
+ errors .extend (self ._validate_requirements_txt (repo , file_info ))
614
+ else :
615
+ errors .append (ERROR_MISSING_REQUIREMENTS_TXT )
610
616
611
617
612
618
#Check for an examples folder.
@@ -947,8 +953,9 @@ def gather_insights(self, repo, insights, since, show_closed_metric=False):
947
953
948
954
def validate_in_pypi (self , repo ):
949
955
"""prints a list of Adafruit_CircuitPython libraries that are in pypi"""
950
- if repo ["name" ] in BUNDLE_IGNORE_LIST :
951
- return []
956
+ if (repo ["name" ] in BUNDLE_IGNORE_LIST or
957
+ repo ["name" ] in self .has_setup_py_disabled ):
958
+ return []
952
959
if not (repo ["owner" ]["login" ] == "adafruit" and
953
960
repo ["name" ].startswith ("Adafruit_CircuitPython" )):
954
961
return []
0 commit comments