3 ms·
I'm not sure what are you talking about, if you use entry_points in setup.py then it will create right entries, set proper permissions and ensure the right pyth
by takeda 10y ago
I'm not sure what are you talking about, if you use entry_points in setup.py then it will create right entries, set proper permissions and ensure the right python is run.
If you use setuptools correctly it is fairly easy to install and run packages e.g.:
venv-3.5 my_env
my_env/bin/pip install mypackage
or if you don't want to publish it to PyPi:
venv-3.5 my_env
my_env/bin/pip install mypackage.whl
- CJefferson 10y agoI'm talking about ease of use for non-experts. I sometimes send people python scripts, I can just tell them to run it from the command line. I can assume any linux or Mac OS X distro will have some version of python2 installed, so I can just say "run 'python myscript.py'". If I give them your instructions, then from my computer I don't have venv-3.5, or venv. I'm sure they won't either. Standard ubuntu installs don't have virtualenv or pip either, so non-root users have pain installing any of these things.
- takeda 10y agoOk, so you're talking about simple scripts that are contained in a single file, in that case it's possible to simply write a script that works on all versions. I wrote many scripts like this (ok, not all versions but 2.6-3.6), it's really on the developer. I mean even within a single major version there are changes that are incompatible. For example 2.6 doesn't have OrderedDict, doesn't have set comprehension. 3.3 doesn't have asyncio, 3.4 doesn't have async/await, 3.5 doesn't have types annotation for variables etc. So having python2/python3 doesn't really benefit much especially that at this point everyone is moving away from 2.7. Edit: virtualenv is builtin in python since 3.4.