From 4081ce236a5d8f9b76afd9c68e489600d7b434f1 Mon Sep 17 00:00:00 2001 From: Marco Atzeri Date: Sat, 11 Mar 2023 21:00:15 +0100 Subject: [PATCH] Allow wheel to manage project without setup.py and setup.cfg and use the pyproject.toml (PEP 518) --- cygclass/python-wheel.cygclass | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/cygclass/python-wheel.cygclass b/cygclass/python-wheel.cygclass index 1ef23826..b0f5288a 100644 --- a/cygclass/python-wheel.cygclass +++ b/cygclass/python-wheel.cygclass @@ -159,9 +159,13 @@ fi python_wheel_compile() { local ver - if [ ! -e setup.py ] && [ ! -e setup.cfg ] + if [ ! -e pyproject.toml ] then - error "No Python Distutils module detected in source tree" + warning "No pyproject.toml (PEP 518) detected in source tree" + if [ ! -e setup.py ] && [ ! -e setup.cfg ] + then + error "No Python Distutils module detected in source tree" + fi fi for ver in ${PYTHON_WHEEL_VERSIONS//:/ } @@ -189,9 +193,13 @@ python_wheel_compile() { python_wheel_install() { local ver whl - if [ ! -e setup.py ] && [ ! -e setup.cfg ] + if [ ! -e pyproject.toml ] then - error "No Python Distutils module detected in source tree" + warning "No pyproject.toml (PEP 518) detected in source tree" + if [ ! -e setup.py ] && [ ! -e setup.cfg ] + then + error "No Python Distutils module detected in source tree" + fi fi for ver in ${PYTHON_WHEEL_VERSIONS//:/ } -- 2.39.0