Skip to content

3.9.0: swig/python python module is not ready for PEP517 build procedure #9965

@kloczek

Description

@kloczek

What is the bug?

cmake uses setup.py build_ext which is deprecated.
I've tested as well disable python bindings in cmake and than build modules using pep517 based build procedure and it failed with

+ /usr/bin/python3 -sBm build -w --no-isolation
* Getting build dependencies for wheel...
error: Multiple top-level packages discovered in a flat-layout: ['data', 'osgeo'].

To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.

If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:

1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names

To find more information, look for "package discovery" on setuptools docs.

ERROR Backend subprocess exited when trying to invoke get_requires_for_build_wheel

Steps to reproduce the issue

build with enabled python bindings with latest setuptools or disable python bindings in cmake and build module using pep517 based build procedure in swig/python.

Versions and provenance

gdal 3.9.0 with setuptools 69.4.0.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions