pybind / pybind/pybind11

[Feature request] Export cmake variables corresponding to Python version

Open
#2,268 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

build system
Dominant language
C++
Stars
18k
Forks
2.3k
Avg merge
5d 17h
Merged PRs (30d)
10

Description

Variables such as PYTHON_VERSION_MAJOR and PYTHON_VERSION_MINOR are marked as INTERNAL.

As a consequence, downstream projects making use of pybind11 in their cmake cannot make use of these variables. It would be very convenient to have access to them!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests. Start by locating the CMake logic that defines PYTHON_VERSION_MAJOR and PYTHON_VERSION_MINOR and inspect how those variables are marked INTERNAL; the work is done when downstream projects using pybind11 can access the corresponding Python version variables.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, python
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.