2

I am considering using the shiv package as a way to create a Python zipapp of my Django project (rather than resorting to Docker). It's my understanding that this approach is not feasible if any of my Python packages have C extensions. Is there any tool that could examine my pip requirements file and tell me if any of the packages it contains (as well as their dependencies) utilize C extensions?

I know that the Python interpreter is written in C so I would imagine many Python packages are written in C as well (or perhaps not?). So if this sounds like a stupid question, it's because I don't understand what the difference is between a program like the Python interpreter that is written in C and what a C extension is as I've never studied the C language.

Jim
  • 13,430
  • 26
  • 104
  • 155

1 Answers1

0

This has been asked before, and there is really no simple answer:

In Python how can one tell if a module comes from a C extension?

But it's important to note that the use of shiv with C modules is not an impossibility. If your target host is the same architecture as the host you build the package on, you should have no problems.

cody
  • 11,045
  • 3
  • 21
  • 36