()
| 9 | |
| 10 | |
| 11 | def main() -> Any: |
| 12 | config_parser = ConfigParser() |
| 13 | config_parser.read("setup.cfg") |
| 14 | setup_cfg_python_requires = config_parser.get("options", "python_requires") |
| 15 | |
| 16 | pyproject_data = toml.load("pyproject.toml") |
| 17 | pyproject_requires_python = pyproject_data["project"]["requires-python"] |
| 18 | |
| 19 | if setup_cfg_python_requires != pyproject_requires_python: |
| 20 | return dedent( |
| 21 | """\ |
| 22 | The project Requires-Python metadata is inconsistent. Please align the following values: |
| 23 | |
| 24 | setup.cfg: |
| 25 | [options] |
| 26 | python_requires = {setup_cfg_python_requires} |
| 27 | |
| 28 | pyproject.toml: |
| 29 | [project] |
| 30 | requires-python = "{pyproject_requires_python}" |
| 31 | """.format( |
| 32 | setup_cfg_python_requires=setup_cfg_python_requires, |
| 33 | pyproject_requires_python=pyproject_requires_python, |
| 34 | ) |
| 35 | ) |
| 36 | |
| 37 | |
| 38 | if __name__ == "__main__": |
no test coverage detected