Skip to content

How to specify python? #122

@Dariusz1989

Description

@Dariusz1989

Hello

Thanks for this awesome test!
I'm lost with customization tho...
How can I specify python in CMakeList.txt file?
I build this file without using your python. setup routine tho... just added

add_definitions(-DVERSION_INFO=3.10)

To cmake and it build locally.
Works great, locally, but I Have no idea how it knows which python to use.

I want to be explicit.
Any ideas?
Pinging our 2 biggest contributors hoping for a miracle :- )
@dean0x7d @henryiii

SOLVED>
To specify python version using "new methods"

set(PYBIND11_PYTHON_VERSION 3.9)
set(OLD_PATH ${CMAKE_PREFIX_PATH})
set(CMAKE_PREFIX_PATH ${P3_ROOT_DIR})
add_subdirectory(S:/pybind11 S:/pybind11)
set(CMAKE_PREFIX_PATH ${OLD_PATH})

at least on windows before adding pybind11
big thanks to @henryiii !!

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