mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 07:08:10 +00:00
fix #2470
This commit is contained in:
parent
d15bdf8d03
commit
6245566263
5
setup.py
5
setup.py
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user