PySnooper
PySnooper copied to clipboard
Feature request: Script to pack PySnooper to single file
I do not have permission to do pip install on my enterprise machine, can this be used as a regular package?
Feature request: Script to pack PySnooper to single file, including all of its dependencies, so it could be copy-pasted into a machine without installing.
Feel free to work on this, @sarthak0415 .
If you can't run pip install
globally on your machine you have two straight-forward options:
- Clone this repository and run
python setup.py develop
. This strategy will always refer to your cloned source code (you can simply rungit pull
in the repo location to update to the latest version). (Explanation) - Install the package as a user package:
pip install --user pysnooper
. This strategy will install the package just for your user and doesn't require elevated privileges. (Explanation)
I was reminded of this issue by the issue linked above. I'm still trying to understand why people want this kind of thing. @sarthak0415, were you able to follow the instructions by @bittner?
If it is important, it looks like https://pypi.org/project/stickytape/ can help.
@alexmojaki I'll try to explain: Some people have shitty corporate setups, they've got code running in convoluted ways with Python files being copied in weird ways, hacks to sys.path
, sometimes multiple conflicting paths in PYTHONPATH
. Sometimes you've got a program that has a Python scripting capability, but you have to enter your script in a certain way because it wasn't meant to deal with packages.
In these circumstances, a single Python file has a better chance of working with no problems.
Normally, I wouldn't think it's worth it to go to such lengths for people who can't get their shit together. But, since the entire premise of PySnooper is that it's usable in bad setups... I think it's a good feature to have. I won't spend time developing it, but I'll review if anyone will work on it.