Skip to content

How to build with custom packages #38

@BrendanSimon

Description

@BrendanSimon

How do I get pyarmor to include custom packages that are outside the main source directory.

e.g. I have various python modules in /some/common/path/mypackage and my application source code in /my/app/path, and my application imports mypackage.foo using from mypacakge import foo

pyarmor obfuscate --recursive --src=/my/app/path --entry=myapp.py

This command doesn't seem to add the package/modules, and the trying to run the app fails saying something like:

  File "<frozen Main_Frame_WXG>", line 11, in <module>
ModuleNotFoundError: No module named 'mypackage'

I've also tried setting PYTHONPATH but it doesn't make any difference.

PYTHONPATH=/some/common/path pyarmor obfuscate --recursive --src=/my/app/path --entry=myapp.py

I also tried adding multiple --src= lines, but it seems only the last one is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions