pyomeca / ezc3d

Easy to use C3D reader/writer for C++, Python and Matlab
https://pyomeca.github.io/Documentation/ezc3d/index.html
MIT License
142 stars 44 forks source link

Incorrect regular expression in setup.py #328

Closed jcllau closed 2 months ago

jcllau commented 2 months ago

Hello!

When running setup.py, with the recent version of ezc3d, I get the following error:

(biorbd) C:\Users\janlau\ezc3d>python .\setup.py develop -- -G"Visual Studio 16 2019" -A x64 -DSWIG_EXECUTABLE="D:/swigwin-4.0.2/swig.exe" -DSWIG_DIR="D:/swigwin-4.0.2/Lib" C:\Users\janlau\ezc3d\setup.py:8: SyntaxWarning: invalid escape sequence '\(' match = re.search("project\(ezc3d VERSION ([0-9].[0-9].[0-9])\)", line) Traceback (most recent call last): File "C:\Users\janlau\ezc3d\setup.py", line 13, in <module> raise RuntimeError("Version not found") RuntimeError: Version not found

I temporarily fixed this on my end by adjusting line 8 of the setup.py to:

match = re.search("project\(ezc3d VERSION ([0-9].[0-9].[0-9][0-9])\)", line)

This is because CMakeLists.txt show that the version is 1.5.10, but the regular expression only matches single digits.

If you could fix it, that would be great. Thank you!

pariterre commented 2 months ago

Hi @jcllau ! This should be fixed by #329 There probably won't have a release before the next two weeks, but you should be able to compile using the setup.py install file!