@@ -99,7 +99,7 @@ def get_result(self):
99
99
ERROR_MISSING_CODE_OF_CONDUCT = "Missing CODE_OF_CONDUCT.md"
100
100
ERROR_MISSING_README_RST = "Missing README.rst"
101
101
ERROR_MISSING_READTHEDOCS = "Missing readthedocs.yaml"
102
- ERROR_MISSING_SETUP_PY = "For pypi compatibility, missing setup.py "
102
+ ERROR_MISSING_PYPROJECT_TOML = "For pypi compatibility, missing pyproject.toml "
103
103
ERROR_MISSING_PRE_COMMIT_CONFIG = "Missing .pre-commit-config.yaml"
104
104
ERROR_MISSING_REQUIREMENTS_TXT = "For pypi compatibility, missing requirements.txt"
105
105
ERROR_MISSING_BLINKA = (
@@ -209,7 +209,7 @@ def __init__(
209
209
self ._rtd_yaml_base = None
210
210
self .output_file_data = []
211
211
self .validate_contents_quiet = kw_args .get ("validate_contents_quiet" , False )
212
- self .has_setup_py_disabled = set ()
212
+ self .has_pyproject_toml_disabled = set ()
213
213
self .keep_repos = keep_repos
214
214
self .rtd_subprojects = None
215
215
self .core_driver_page = None
@@ -344,7 +344,7 @@ def _filter_file_diffs(filenames):
344
344
"LICENSE" ,
345
345
"LICENSES/*" ,
346
346
"*.license" ,
347
- "setup.py .disabled" ,
347
+ "pyproject.toml .disabled" ,
348
348
".github/workflows/build.yml" ,
349
349
".github/workflows/release.yml" ,
350
350
".pre-commit-config.yaml" ,
@@ -576,8 +576,8 @@ def _validate_pre_commit_config_yaml(self, file_info):
576
576
577
577
return errors
578
578
579
- def _validate_setup_py (self , file_info ):
580
- """Check setup.py for pypi compatibility"""
579
+ def _validate_pyproject_toml (self , file_info ):
580
+ """Check prproject.toml for pypi compatibility"""
581
581
download_url = file_info ["download_url" ]
582
582
contents = requests .get (download_url , timeout = 30 )
583
583
if not contents .ok :
@@ -646,11 +646,11 @@ def validate_contents(self, repo):
646
646
if not self .validate_contents_quiet :
647
647
return [ERROR_NEW_REPO_IN_WORK ]
648
648
649
- if "setup.py .disabled" in files :
650
- self .has_setup_py_disabled .add (repo ["name" ])
649
+ if "pyproject.toml .disabled" in files :
650
+ self .has_pyproject_toml_disabled .add (repo ["name" ])
651
651
652
652
# if we're only running due to -v, ignore the rest. we only care about
653
- # adding in-work repos to the BUNDLE_IGNORE_LIST and if setup.py is
653
+ # adding in-work repos to the BUNDLE_IGNORE_LIST and if pyproject.toml is
654
654
# disabled
655
655
if self .validate_contents_quiet :
656
656
return []
@@ -721,13 +721,13 @@ def validate_contents(self, repo):
721
721
else :
722
722
errors .append (ERROR_MISSING_PRE_COMMIT_CONFIG )
723
723
724
- if "setup.py " in files :
725
- file_info = content_list [files .index ("setup.py " )]
726
- errors .extend (self ._validate_setup_py (file_info ))
727
- elif "setup.py .disabled" not in files :
728
- errors .append (ERROR_MISSING_SETUP_PY )
724
+ if "pyproject.toml " in files :
725
+ file_info = content_list [files .index ("pyproject.toml " )]
726
+ errors .extend (self ._validate_pyproject_toml (file_info ))
727
+ elif "pyproject.toml .disabled" not in files :
728
+ errors .append (ERROR_MISSING_PYPROJECT_TOML )
729
729
730
- if repo ["name" ] not in self .has_setup_py_disabled :
730
+ if repo ["name" ] not in self .has_pyproject_toml_disabled :
731
731
if "requirements.txt" in files :
732
732
file_info = content_list [files .index ("requirements.txt" )]
733
733
errors .extend (self ._validate_requirements_txt (repo , file_info ))
@@ -1113,7 +1113,7 @@ def validate_in_pypi(self, repo):
1113
1113
"""prints a list of Adafruit_CircuitPython libraries that are in pypi"""
1114
1114
if (
1115
1115
repo ["name" ] in BUNDLE_IGNORE_LIST
1116
- or repo ["name" ] in self .has_setup_py_disabled
1116
+ or repo ["name" ] in self .has_pyproject_toml_disabled
1117
1117
):
1118
1118
return []
1119
1119
if not (
@@ -1166,7 +1166,7 @@ def validate_passes_linting(self, repo):
1166
1166
if not repo ["name" ].startswith ("Adafruit_CircuitPython" ):
1167
1167
return []
1168
1168
1169
- ignored_py_files = ["setup.py" , " conf.py" ]
1169
+ ignored_py_files = ["conf.py" ]
1170
1170
1171
1171
desination_type = TemporaryDirectory
1172
1172
if self .keep_repos :
0 commit comments