简体   繁体   中英

Could I use Cython with 3rdparty pure python library?

I'm using Python to develop a commercial software. But I don't want to offer source to my clients.

I knew that Cython can complie my code to binary.

But could I use Cython with 3rdparty pure python library(I mean those libraries written in pure Python)?

Cython compiles to .pyd (not pyc), which is basically a dll. In theory it should work with any python code, including 3rd party libraries, but there's no guarantee (see the first comment below). You'd also better check the licenses of the libraries you intend to use though, to make sure they don't prohibit distributing as closed source.

Your other option is something like cx_Freeze or py2exe , both of which I think compile to binary. I've never really inspected the files they produce though so you'll need to check up on that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM