Skip to content

Commit

Permalink
get version by matchiing, so will not need to setup complex env in gi…
Browse files Browse the repository at this point in the history
…thub aciton
  • Loading branch information
jzhang533 committed Mar 25, 2024
1 parent 8a99bc9 commit d28d9e7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@

from setuptools import setup
from io import open
from paddleocr import VERSION
import sys
import subprocess

# get version by matchiing, so will not need to setup complex env in github aciton
p = subprocess.Popen("grep ^VERSION ./paddleocr.py | cut -d\\' -f 2", stdout=subprocess.PIPE,
stderr=subprocess.PIPE, shell=True)
raw_VERSION, _ = p.communicate()
VERSION = raw_VERSION.decode().strip()

def load_requirements(file_list=None):
if file_list is None:
Expand Down

0 comments on commit d28d9e7

Please sign in to comment.