TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Advice for cross-platform dev environments for Python Extensions

1 pointsby annowikialmost 3 years ago
I&#x27;ve been dipping my toes into extending Python with C&#x2F;C++. I&#x27;ve experimented with ctypes, raw native Python C (#include &lt;python.h&gt;), and now I&#x27;m trying Pybind11.<p>My experience has been that setting up a development environment for this sort of thing is hell.<p>In the JetBrains line, PyCharm doesn&#x27;t support C&#x2F;C++ development, and CLion has limited Python support (I can&#x27;t use Jupyter Notebooks in CLion for instance), and you can&#x27;t use both IDEs on the same repo (Plus CLion is not free).<p>For Visual Studio, I&#x27;m actually pretty impressed with the python capabilities. Using the default MSBuild system, I can create a project that outputs a pyd file, and add a project with a Python file that has a reference to the pyd output directory, which works seamlessly. But the second I want to make it cross platform by using CMake, I can&#x27;t add a reference to the output directory from the C++ project to the Python script. I thought to just append the output directory to the path, but then I can&#x27;t differentiate between debug&#x2F;release. And I&#x27;m sure mixed language debugging would be limited in CMake mode.<p>I haven&#x27;t yet tried VS Code.<p>Does anyone have any tips or advice or best practices for setting up a cross platform C&#x2F;C++ Python development environment?

no comments

no comments