diff --git a/mitmdump b/mitmdump index 68e8c4eee..2ceb9b306 100755 --- a/mitmdump +++ b/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", diff --git a/setup.py b/setup.py index 3c126a0e0..9b4d7f7ba 100644 --- a/setup.py +++ b/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",