Source code for pyscaffold.extensions.no_pyproject
"""Extension that omits the creation of file `pyproject.toml`.Since the isolated builds with PEP517/PEP518 are not completely backward compatible,this extension provides an escape hatch for people that want to maintain the legacybehaviour... warning:: This extension is **transitional** and will be removed in future versions of PyScaffold. Once support for isolated builds stabilises, the Python community will likely move towards using them more exclusively."""fromtypingimportListfrom..importstructurefrom..actionsimportAction,ActionParams,ScaffoldOpts,Structurefrom.importExtension
[docs]classNoPyProject(Extension):"""Do not include a pyproject.toml file in the project root, and thus avoid isolated builds as defined in PEP517/518 [not recommended] """name="no_pyproject"
[docs]defensure_option(struct:Structure,opts:ScaffoldOpts)->ActionParams:"""Make option available in non-CLI calls (used by other parts of PyScaffold)"""returnstruct,{**opts,"pyproject":False,"isolated_build":False}