https://docs.python.org/2/distutils/setupscript.html
https://docs.python.org/2.7/distutils/setupscript.html#installing-scripts
#Solution1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16#!/usr/bin/env python
# encoding: utf-8
from distutils.core import setup
setup(
name='foo',
version='1.0',
description='Yarving foo program',
author='Yarving',
author_email='yarving@gmail.com',
url='https://yarving.github.io',
scripts=['scripts/ywrun.py']
)
Refer to pip(cat /usr/local/bin/pip2.7)
1 | #!/usr/bin/python |