Giter Club home page Giter Club logo

Comments (6)

jhermann avatar jhermann commented on August 23, 2024

If you don't, performance will drop dramatically.

from dh-virtualenv.

wbolster avatar wbolster commented on August 23, 2024

Okay, makes sense. Normal Debian packages do this upon installation, hence the confusion.

from dh-virtualenv.

nailor avatar nailor commented on August 23, 2024

Actually they just end up in there because everything is copied in. As a bonus, the startup times of the interpreter are faster when they are copied in there (otherwise one would be compiling the bytecode upon every start, unless running as root).

Smart way of doing this would be not to ship the pyc files but have a trigger that would cause the pyc-files generated upon installation, just to be on the safe side if there were some minor differences between the host interpreter and the one shipped with virtualenv (don't know though if this is really a possible scenario to find two interpreters that interoperate yet produce different bytecode).

from dh-virtualenv.

wbolster avatar wbolster commented on August 23, 2024

I just noticed it because pylint complains a lot about it, and regular Python packages (dh_python) have install-time hooks to compile the .pyc files.

from dh-virtualenv.

ludovic-gasc avatar ludovic-gasc commented on August 23, 2024

To my knowledge, dh-python does this because you can have several python 2.X installed on the same debian, dh-python compiles for each version installed.
It could be a performance problem when a dh-virtualenv package has been made for a specific version of python 2.X, and finally you use another version on your system.

from dh-virtualenv.

nailor avatar nailor commented on August 23, 2024

Yeah, supporting different versions is the main gain of the dh-python's way. As a bonus, no need to ship .pyc files.

What comes to the performance problem, I doubt finding a case where we would generate non-compatible bytecode but still be able to use the interpreter shipped in the virtualenv are par to none

from dh-virtualenv.

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.