Git Product home page Git Product logo

Comments (4)

thebjorn avatar thebjorn commented on August 13, 2024

Hi @ZiqianXu and thank you for your interest in Pydeps.

This is indeed an artifact of how modulefinder and Python works. modulefinder is a Python standard module that pydeps uses to find the importgraph, see https://docs.python.org/3/library/modulefinder.html

I'm not aware of any hooks to prevent saving .pyc files (https://github.com/python/cpython/blob/main/Lib/modulefinder.py)

from pydeps.

ZiqianXu avatar ZiqianXu commented on August 13, 2024

Hey @thebjorn, thanks for the quick response!

But what's the reason for .pyc only generated for some python files like pyyaml but not for other packages like cffi?

from pydeps.

thebjorn avatar thebjorn commented on August 13, 2024

I'm guessing because it's mostly written in C...?

from pydeps.

ZiqianXu avatar ZiqianXu commented on August 13, 2024

Hey @thebjorn, I think the compiled .pyc for yaml created when yaml is imported in pydeps. Somehow python module loader fails to compile to the system python directory(like /usr/local/lib/python3.8/dist-packages/yaml/) but the current yaml directory( like /tmp/testDir/yaml/)

So the issue is not about compiled .pyc got created when finding imports, but it's created in the wrong directory.

from pydeps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.