flameprof icon indicating copy to clipboard operation
flameprof copied to clipboard

Fix script to use pip's python version

Open DanLipsitt opened this issue 4 years ago • 1 comments

Problem

On systems where python points to python2 but pip points to pip3, bin/flameprof breaks because it runs python2 but the flameprof library is installed into python2's site-packages.

Fix

Instead of using scripts in setup.py, use the console_scripts entry point (https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html). This will automatically create and install a flameprof script that works with python 2 or 3 (whichever pip is working with).

In order to facilitate this, I created a main function in flameprof.py.

DanLipsitt avatar Jun 26 '21 02:06 DanLipsitt

Would be great if this could be merged and a new release made.

rossburton avatar Oct 07 '24 13:10 rossburton