Skip to content

Commit aab568c

Browse files
committed
Fix loading version.
1 parent 01febfe commit aab568c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.gitignore

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

59+
.python-version
5960
.venv
60-
venv
61+
venv

setup.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
project_path = os.path.abspath(os.path.dirname(__file__))
66
with open(os.path.join(project_path, 'README.md'), 'r') as fout:
77
README = fout.read()
8-
with open(os.path.join(project_path, 'django_admin_json_editor', '__init__.py'), 'r') as fout:
9-
version_text = fout.read()
108

11-
version = __import__('django_admin_json_editor').__version__
9+
with open(os.path.join(project_path, 'django_admin_json_editor', 'version.py'), 'r') as fout:
10+
version = fout.read()
1211

1312
# allow setup.py to be run from any path
1413
os.chdir(project_path)

0 commit comments

Comments
 (0)