mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 07:08:10 +00:00
Tweak setup.py to allow installs outside source dir
Also fix mitmdump version output
This commit is contained in:
parent
64be9b1a8a
commit
f431eb5acc
2
mitmdump
2
mitmdump
@ -5,7 +5,7 @@ import argparse
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(usage = "%(prog)s [options] [filter]")
|
||||
parser.add_argument('--version', action='version', version=version.NAMEVERSION)
|
||||
parser.add_argument('--version', action='version', version="mitmdump" + " " + version.VERSION)
|
||||
cmdline.common_options(parser)
|
||||
parser.add_argument(
|
||||
"--keepserving",
|
||||
|
8
setup.py
8
setup.py
@ -2,6 +2,12 @@ from distutils.core import setup
|
||||
import fnmatch, os.path
|
||||
from libmproxy import version
|
||||
|
||||
|
||||
def pdir():
|
||||
dirname, _ = os.path.split(__file__)
|
||||
return os.path.abspath(dirname)
|
||||
|
||||
|
||||
def _fnmatch(name, patternList):
|
||||
for i in patternList:
|
||||
if fnmatch.fnmatch(name, i):
|
||||
@ -65,7 +71,7 @@ def findPackages(path, dataExclude=[]):
|
||||
return packages, package_data
|
||||
|
||||
|
||||
long_description = file("README.txt").read()
|
||||
long_description = file(os.path.join(pdir(), "README.txt")).read()
|
||||
packages, package_data = findPackages("libmproxy")
|
||||
setup(
|
||||
name = "mitmproxy",
|
||||
|
Loading…
Reference in New Issue
Block a user