Python stub location for custom C extension

Answered

Hello,

 

How to add python stub files for a custom C extension library for Python 2018.3.1?  There is a similar post in 2016:

https://intellij-support.jetbrains.com/hc/en-us/community/posts/207207929-Location-for-custom-python-stubs-?input_string=Custom%20python%20stub%20location%20for%20C%20extension

However, the response points to a repo that is deprecated.  I tried putting my python stub next to my C extension .so file, and add the location to library root, but that didn't work.

1 comment

Hi,

There are two ways to work with custom stubs:

1) Create a package with stubs, mark it as Source root and then use it.

2) Put your stub files in the same directory where the files in which you want to use them are located.

0

Please sign in to leave a comment.