Skip to content

Commit 86ccac0

Browse files
committed
Fix pypi deploy.
1 parent d7f46ed commit 86ccac0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ docs/_build/
5656
# PyBuilder
5757
target/
5858

59+
60+
django_admin_json_editor/version.py
5961
.python-version
6062
.venv
6163
venv

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import os
2+
import re
3+
24
from setuptools import setup
35

46

@@ -11,7 +13,8 @@
1113

1214
if os.path.exists(version_file):
1315
with open(version_file, 'r') as fout:
14-
version = fout.read()
16+
version_text = fout.read()
17+
version = re.compile(r'.*__version__ = \'(.*?)\'', re.S).match(version_text).group(1)
1518
else:
1619
version = 'dev'
1720

0 commit comments

Comments
 (0)