thebjorn/pydeps

Support for modules with pyo files only? Python environment?

Closed this issue · 2 comments

Does pydeps work with trees of modules where they have a python module structure but the files are *.pyo files only?

This is a slightly special python environment where I start python passing a -O flag so that it reads only pyo files in the user environment. What I would like is for pydeps to allow to pass an -O flag and forward it to the python calls that it makes internally.

Also this setup has a custom PYTHONHOME and PYTHONPATH and also a different python binary, is this expected to work? How can I tell pydeps which python binary to use?

Thanks

pydeps needs to be installed in the python environment where you intend to use it. After pip install pydeps a handy pydeps executable is created in your path, but you can also invoke it with python -m pydeps.

I think you might have misunderstood what the -O flag to python does... It creates .pyo files, but it doesn't force Python to only use .pyo files. Python will use .pyo files before .pyc files, and .pyc files before .py files.

Additionally pyo files are no longer used as of https://www.python.org/dev/peps/pep-0488/