diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-12-11 17:50:46 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-12-11 17:50:46 +0100 |
commit | 00ae4d3f6e993b06b808cf08e0441fcbacff4f16 (patch) | |
tree | 691fee9169777e9e956725b3f75daa0818ba8c6a | |
parent | 782c66eac23c0f287c569e5dc6b9c635b2e32afe (diff) | |
download | mitmproxy-00ae4d3f6e993b06b808cf08e0441fcbacff4f16.tar.gz mitmproxy-00ae4d3f6e993b06b808cf08e0441fcbacff4f16.tar.bz2 mitmproxy-00ae4d3f6e993b06b808cf08e0441fcbacff4f16.zip |
fix version sourcing in setup.py
-rw-r--r-- | mitmproxy/__init__.py | 2 | ||||
-rw-r--r-- | setup.py | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/mitmproxy/__init__.py b/mitmproxy/__init__.py index 0b06c276..9697de87 100644 --- a/mitmproxy/__init__.py +++ b/mitmproxy/__init__.py @@ -1,3 +1,3 @@ # https://github.com/mitmproxy/mitmproxy/issues/1809 # import script here so that pyinstaller registers it. -from . import script +from . import script # noqa @@ -1,8 +1,8 @@ -from setuptools import setup, find_packages -from codecs import open import os +import runpy +from codecs import open -from mitmproxy import version +from setuptools import setup, find_packages # Based on https://github.com/pypa/sampleproject/blob/master/setup.py # and https://python-packaging-user-guide.readthedocs.org/ @@ -12,9 +12,11 @@ here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() +VERSION = runpy.run_path(os.path.join(here, "mitmproxy", "version.py"))["VERSION"] + setup( name="mitmproxy", - version=version.VERSION, + version=VERSION, description="An interactive, SSL-capable, man-in-the-middle HTTP proxy for penetration testers and software developers.", long_description=long_description, url="http://mitmproxy.org", |