Skip to content

BLD: building in modern Python environments #560

@tylerjereddy

Description

@tylerjereddy

I'm trying to benchmark PyTaco in various scenarios, and it would be most helpful to have viable PyPI releases per gh-525.

For example, when trying to compile from source on Ubuntu 22.04.2 LTS with Python 3.11.7 I run into errors that look related to maintenance issues with newer Python versions.

cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON=ON ..
make -j 32

<snip>
/home/treddy/github_projects/taco/python_bindings/pybind11/include/pybind11/cast.h:448:64: error: expected primary-expression before ‘>’ token
  448 |                 handle(frame->f_code->co_name).cast<std::string>() + "\n";
      |                                                                ^
/home/treddy/github_projects/taco/python_bindings/pybind11/include/pybind11/cast.h:448:66: error: expected primary-expression before ‘)’ token
  448 |                 handle(frame->f_code->co_name).cast<std::string>() + "\n";
      |                                                                  ^
/home/treddy/github_projects/taco/python_bindings/pybind11/include/pybind11/cast.h:449:26: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
  449 |             frame = frame->f_back;

<snip>

From the Python 3.11 release notes:

The PyFrameObject structure members have been removed from the public C API.

If there's no plan to support newer Python versions, it would probably make sense to have CMake upper bound that dependency and error out at build time more clearly. When assessing whether or not it makes sense to use PyTaco for certain applications, the ability to install it on modern Python versions with minimal hassle will obviously be a factor, but if there are no plans to maintain it I suppose you could just error out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions