Dear list,Not sure where is this documented but you can easily check on your system.
I try handle a package which installs a partly compiled, architecture-dependent python module. Until now this has been done in /usr/lib/triplet/python3.10/site-packages. This scheme has basically worked fine.
However, here is an Ubuntu bug [1] where a user runs into problems because this installation path is not in sys.path by default.
I have been trying to look in the python policy docs, but cannot find the exact way to install code like this, in the policy [2]
parlance an "extension module".
On Thu, Jun 02, 2022 at 07:19:56PM +0200, Alec Leamas wrote:
Dear list,Not sure where is this documented but you can easily check on your system.
I try handle a package which installs a partly compiled,
architecture-dependent python module. Until now this has been done in
/usr/lib/triplet/python3.10/site-packages. This scheme has basically worked >> fine.
However, here is an Ubuntu bug [1] where a user runs into problems because >> this installation path is not in sys.path by default.
I have been trying to look in the python policy docs, but cannot find the
exact way to install code like this, in the policy [2]
parlance an "extension module".
It should be /usr/lib/python3/dist-packages/*.cpython-3*-x86_64-linux-gnu.so
There are a couple different ways to do Python to C. I think the
terms are CFFI (or FFI or ctypes, maybe some of those are different
though?) vs CPython extension, but I'm not 100% certain of that.
I try handle a package which installs a partly compiled, architecture-dependent python module. Until now this has been done in /usr/lib/triplet/python3.10/site-packages. This scheme has basically worked
fine.
However, here is an Ubuntu bug [1] where a user runs into problems because
this installation path is not in sys.path by default.
I have been trying to look in the python policy docs, but cannot find the exact way to install code like this, in the policy [2]Not sure where is this documented but you can easily check on your system. It should be /usr/lib/python3/dist-packages/*.cpython-3*-x86_64-linux-gnu.so
parlance an "extension module".
Hm...this is not what I have. Did I get get the term "Extension module" wrong?Well, we don't know what do you have.
That aside, what I have is some python3 scripts and a compiled .so library invoked form the python code. The whole thing designed to be in the same directory. And the question is how this should be installed...Invoked how?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 20:41:51 |
Calls: | 6,707 |
Calls today: | 1 |
Files: | 12,239 |
Messages: | 5,351,727 |