Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: improve error message for multiple sysconfigs found #1530

Merged
merged 1 commit into from
Mar 30, 2021

Conversation

davidhewitt
Copy link
Member

Before:

  process didn't exit successfully: `/home/david/dev/pyo3/target/debug/build/pyo3-312859063392295a/build-script-build` (exit code: 1)
  --- stderr
  Error: "Detected multiple possible python versions, please set the PYO3_PYTHON_VERSION variable to the wanted version on your system or set the _PYTHON_SYSCONFIGDATA_NAME variable to the wanted sysconfigdata file name\nsysconfigdata paths = [\"/usr/lib/python3.8/_sysconfigdata__x86_64-linux-gnu.py\", \"/usr/lib/python3.8/_sysconfigdata_d_x86_64-linux-gnu.py\", \"/usr/lib/python3.8/_sysconfigdata__x86_64-linux-gnu.py\", \"/usr/lib/python3.7/_sysconfigdata_m_linux_x86_64-linux-gnu.py\", \"/usr/lib/python3.9/_sysconfigdata__x86_64-linux-gnu.py\", \"/usr/lib/python3.10/_sysconfigdata__linux_x86_64-linux-gnu.py\", \"/usr/lib/python3.6/_sysconfigdata_m_linux_x86_64-linux-gnu.py\"]"

After:

  process didn't exit successfully: `/home/david/dev/pyo3/target/tests/target/debug/build/pyo3-5dbd671a9a47dc72/build-script-build` (exit code: 1)
  --- stderr
  Error: Detected multiple possible Python versions. Please set either the PYO3_CROSS_PYTHON_VERSION variable to the wanted version or the _PYTHON_SYSCONFIGDATA_NAME variable to the wanted sysconfigdata file name.

  sysconfigdata files found:
        /usr/lib/python3.8/_sysconfigdata__x86_64-linux-gnu.py
        /usr/lib/python3.8/_sysconfigdata_d_x86_64-linux-gnu.py
        /usr/lib/python3.8/_sysconfigdata__x86_64-linux-gnu.py
        /usr/lib/python3.7/_sysconfigdata_m_linux_x86_64-linux-gnu.py
        /usr/lib/python3.9/_sysconfigdata__x86_64-linux-gnu.py
        /usr/lib/python3.10/_sysconfigdata__linux_x86_64-linux-gnu.py
        /usr/lib/python3.6/_sysconfigdata_m_linux_x86_64-linux-gnu.py

Copy link
Member

@messense messense left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@davidhewitt davidhewitt merged commit bc826d1 into PyO3:main Mar 30, 2021
@davidhewitt davidhewitt deleted the build-error-messages branch March 30, 2021 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants