This commit is contained in:
Maximilian Hils 2017-12-30 17:54:23 +01:00
parent d15bdf8d03
commit 6245566263

View File

@ -1,7 +1,7 @@
import os
import runpy
from codecs import open
import re
from setuptools import setup, find_packages
# Based on https://github.com/pypa/sampleproject/blob/master/setup.py
@ -12,7 +12,8 @@ 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"].split("-0x")[0]
with open(os.path.join(here, "mitmproxy", "version.py")) as f:
VERSION = re.search(r'VERSION = "(.+?)(?:-0x|")', f.read()).group(1)
setup(
name="mitmproxy",