So I am trying to publish a proprietary python package and I am using pyarmor package to obfuscate it and then publish the obfuscated build on PyPi. It is working on the same python version environment, however as mentioned in the packaging-obfuscated-scripts it is version dependent and can not not be ran using any older or newer python version.
I have quite a heavy package, is there any way around this (avoiding building and maintaining package with different python version)?
EDIT: If not as mentioned in the documentation, is there any other way to achieve this?
Unfortunately no.
Under the hood,
pyarmorcreates a CPython extension module inside the "obfuscated" package. Extension modules are tied to a specific interpreter ABI, and need to be compiled separately for different minor releases of CPython (i.e., 3.10, 3.11, 3.12, etc.).This is mentioned in the documentation linked in the question:
As far as "avoiding building and maintaining package with different python version", this usually isn't a problem in practice. It's straightforward to build and publish wheels for multiple Python versions from a CI/CD workflow like GitHub Actions. PyPI even provides first-class support for doing so. See Publishing package distribution releases using GitHub Actions CI/CD workflows from the Python Packaging docs for an example of how this is done with GitHub. You can adapt the same principles to whatever CI/CD platform you use.