Skip to content

Commit 62741c8

Browse files
committed
Temporary fix for CoppeliaSim 4.1.
1 parent b15964d commit 62741c8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

setup.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import codecs
2+
import os
23
import os.path
34
from os.path import join
45

@@ -22,6 +23,17 @@ def get_version(rel_path):
2223
raise RuntimeError("Unable to find version string.")
2324

2425

26+
# Temp fix for CoppeliaSim 4.1
27+
if 'COPPELIASIM_ROOT' not in os.environ:
28+
raise RuntimeError('COPPELIASIM_ROOT not defined.')
29+
with open(os.path.join(os.environ['COPPELIASIM_ROOT'], 'system', 'usrset.txt'), 'r') as f:
30+
usrset = f.read()
31+
32+
if 'allowOldEduRelease' not in usrset:
33+
with open(os.path.join(os.environ['COPPELIASIM_ROOT'], 'system', 'usrset.txt'), 'a') as f:
34+
f.write('\nallowOldEduRelease=7501\n')
35+
36+
2537
setup(name='PyRep',
2638
# Version A.B.C.D.
2739
# A.B.C info corresponds to the CoppeliaSim version needed.

0 commit comments

Comments
 (0)