Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils committed Dec 30, 2017
1 parent d15bdf8 commit 6245566
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -12,7 +12,8 @@
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",
Expand Down

0 comments on commit 6245566

Please sign in to comment.