Comments (6)
If you don't, performance will drop dramatically.
from dh-virtualenv.
Okay, makes sense. Normal Debian packages do this upon installation, hence the confusion.
from dh-virtualenv.
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.
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.
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.
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)
- creating softlink (or provide the option to choose) HOT 7
- Support disabling pip in installed virtualenvs HOT 6
- `pip` tracebacks when not upgraded in build process and `python-pip-whl` package is not installed HOT 2
- Provide Alternative way to run test to avoid Warning HOT 3
- How to build both Python 2 and 3 packages? HOT 1
- cannot override default postrm/prerm maintenance scripts
- Question: Why skip package that start with python3? HOT 2
- allow multiple requirement files to be passed in HOT 1
- How to expose packages built with this tool on PYTHONPATH HOT 2
- Problem when higher version of setuptools (>44.0.0) is required
- dh-virtualenv package not available on bookworm HOT 1
- When calling /opt/venv/bin/myscript PATH is not properly defined
- fix_shebangs() fails HOT 2
- DH_PIP_EXTRA_ARGS doesn't work
- New Release with Python3.11 Support? HOT 7
- Allow for including pip packages in source tar
- How would I install additional files (e.g. systemd service file)? HOT 5
- -m venv does not understand the --verbose option HOT 1
- dh_strip gets error no dynamic section in dynamic segment HOT 2
- Python not found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dh-virtualenv.