Skip to content

Commit d7f46ed

Browse files
committed
Default version.
1 parent aab568c commit d7f46ed

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

setup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@
66
with open(os.path.join(project_path, 'README.md'), 'r') as fout:
77
README = fout.read()
88

9-
with open(os.path.join(project_path, 'django_admin_json_editor', 'version.py'), 'r') as fout:
10-
version = fout.read()
9+
10+
version_file = os.path.join(project_path, 'django_admin_json_editor', 'version.py')
11+
12+
if os.path.exists(version_file):
13+
with open(version_file, 'r') as fout:
14+
version = fout.read()
15+
else:
16+
version = 'dev'
1117

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

0 commit comments

Comments
 (0)