🐞 Bug Description
When you obfuscate two packages, and try to import both packages, one of the packages fails as codeenimga generates a .so file (Shared Object), and this .so file is generated per obfuscation.
The codeenigma runtime is different per package, and causes one of the packages to fail on import.
🔍 Steps to Reproduce
- Obfuscate & build package
A
- Obfuscate & build package
B
- Install both packages (
A and B) to an environment
- Attempt to import both packages
📝 Additional Context
Currently, the work around is that I package A & B together, and obfuscate them together.
This won't work if someone wants to import multiple obfuscated packages.
✅ Proposed Solution
Generate a unique runtime module name for each obfuscation build (e.g. codeenigma_runtime_<uid>)
Embed that name into the obfuscated package, and build the C-extension with that name.
This ensures each obfuscated package installs and imports a differently-named .so/.pyd, and therefore exports a unique PyInit_<name> symbol, meaning no shared object collisions.
🐞 Bug Description
When you obfuscate two packages, and try to import both packages, one of the packages fails as codeenimga generates a
.sofile (Shared Object), and this.sofile is generated per obfuscation.The codeenigma runtime is different per package, and causes one of the packages to fail on import.
🔍 Steps to Reproduce
ABAandB) to an environment📝 Additional Context
Currently, the work around is that I package A & B together, and obfuscate them together.
This won't work if someone wants to import multiple obfuscated packages.
✅ Proposed Solution
Generate a unique runtime module name for each obfuscation build (e.g.
codeenigma_runtime_<uid>)Embed that name into the obfuscated package, and build the C-extension with that name.
This ensures each obfuscated package installs and imports a differently-named
.so/.pyd, and therefore exports a uniquePyInit_<name>symbol, meaning no shared object collisions.