-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong value of __file__ #12
Comments
I got it. The value of |
Fix it by changing armor code to: __pyarmor__(__name__, b'...').__file__ = __file__ |
But this will set it after the module was executed, isn't it? Can't you modify
Alternatively when running Py_CompileString you could set the filename to |
You're right. I prefer the first way, add extra parameter |
Fixed in v3.7.1, change armor code to __pyarmor__(__name__, __file__, b'...') |
Now But a traceback still contains the wrong path names. |
I got it. This is because only co_filename of module's code object has been changed, the co_filename of descendants still keep the original value. |
For filename in traceback, I prefer the second way, that is, set filename to |
Yes, this should be the way to go. |
Usually the frozen string is without square brackets. Just wanted to indicate the variable for the module name. So it should be:
|
The dotted module name can not be got directly when running python pyarmor.py obfuscate --src=/home/jondy/workspace ...
# /home/jondy/workspace/foo.py -> <frozen foo>
# /home/jondy/workspace/libroot/pkg/foo.py -> <frozen libroot.pkg.foo> even if "libroot" maybe is not a package |
This shouldn't be a problem. But the square brackets |
And a package is referenced with |
Fixed in v3.7.3
The sub package |
Can't you use the passed |
There is no
|
Ok, I see. But couldn't you just strip the |
No problem :), you're terrific guy! |
Hey, I want to get rid of Nuitka for my project. So it's all to my advantage ;) |
With v3.7.4 I get But it should be: |
If the src folder contains a file Example with
Example without
|
Fixed in v3.7.5. There is another case
|
I propose that a missing |
There is still an issue with |
It's perfect. Fixed in v3.8.2 |
The value of __ files __ seems to be hardcoded pointing to the original source file.
Is it possible to fix this?
The text was updated successfully, but these errors were encountered: