Skip to content

Commit

Permalink
fix(build,gak#119,gak#155): use setuptools-entry-points instead of co…
Browse files Browse the repository at this point in the history
…nsole-script...

to fix launching on Windows.
Also this is now the officially "blessed" way to generated executables:
  https://packaging.python.org/guides/distributing-packages-using-setuptools/#scripts
  • Loading branch information
ankostis committed Jun 8, 2018
1 parent 13daf83 commit 1cc1c18
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions scripts/pycallgraph
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ pycallgraph
This script is the command line interface to the pycallgraph Python library.
See http://pycallgraph.slowchop.com/ for more information.
.. deprecated:: > 1.0.1
Code here moved to :func:`pycallgraph.__main__.main()`
and now using setuptools console-script entry-points,
to properly install on Windows.
- See https://github.com/gak/pycallgraph/issues/119
- See https://github.com/gak/pycallgraph/issues/155
"""
import sys
import os
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def run_tests(self):
license=open('LICENSE').read(),
url=pycallgraph.__url__,
packages=['pycallgraph', 'pycallgraph.output'],
scripts=['scripts/pycallgraph'],
entry_points={
'console_scripts': ['pycallgraph = pycallgraph.__main__:main']},
data_files=data_files,
use_2to3=True,

Expand Down

0 comments on commit 1cc1c18

Please sign in to comment.