I have a Python package which I have zipped using zipfile.PyZipFile
, so I now have a .zip
containing only .pyc
files and sub-packages for a particular version of Python.
I can manually place it into site-packages
with a .pth
file and it all works nicely.
I’d like to be able to automate this process, using the standard tools.
I used to have a pyproject.toml
file which built a .pyd
file with nuitka
:
[build-system]
requires = ["setuptools", "wheel", "nuitka", "toml"]
build-backend = "nuitka.distutils.Build"
I don’t want to build a .pyd
file now. It’s too large, takes too long to build, and runs slower. I only want minimal obfuscation to deter casual tinkering by clients, I know decompyle-ation is possible, and it doesn’t matter to me.
I think what I need is little different to compiling and distributing a .pyd
file, but I don’t know where to insert my .zip
into the build process.
I’m not interested in why I shouldn’t be trying to do this.
As with most things software, the question isn’t if something is possible, but how it is achievable.