Closed d-vanzo closed 4 years ago
I confirm that compilation does not work under windows with Python 3.6.1. Maybe someone who is working with Python 2 can confirm that it works?
The problem is linked to FoBiS (which is currently used as a build system) encoding issues under windows. I changed the encoding in FoBiS and I am now able to successfully compile forbear. However, I would like to wait with merging this branch into the master until the changes are officially integrated into FoBiS.
I had a look to @Diftin pull request in FoBis repo... the problem is that your modifications are compatible with Python 3.X, but not back compatible with Python 2.X in the present form. (btw FoBiS is designed for Python 2.X)
Ok thanks. Do you have a suggestion to be compatible with python 2? Or should I just check for the version before specifying the encoding? Then progressbar would only work for python 3.
there are several strategies, as example here.
Or maybe adding something like this in src/main/python/fobis/ParsedFile.py
import sys
def openFile(filename):
if sys.version_info[0] < 3:
return open(filename, 'r')
else:
return open(filename, 'r', newline='', encoding='utf8')
and then using openFile
in the file... this might work...
@Diftin the fobis module has been updated to version 2.9.7
... can you give a try if this solve the issue with Windows compiling? (you have to upgrade the module with pip (or pip3) install FoBiS.py --upgrade
The updated version does not solve the issue unfortunately.
I just had a look and I'll push a new merge request soon... to zaghi repo
The merge request seems really similar to what we tried last time (but failed the unittest).
yes, I think was a really stupid missing import sys
in the wrong position... let's see if szaghi accepts soon
Ok true, this was the only change to the previous version that I could see.
From: Davide Vanzo notifications@github.com Sent: Dienstag, 19. November 2019 22:59 To: Eawag-AppliedSystemAnalysis/Simstrat Simstrat@noreply.github.com Cc: Bärenbold, Fabian Fabian.Baerenbold@eawag.ch; Mention mention@noreply.github.com Subject: Re: [Eawag-AppliedSystemAnalysis/Simstrat] test dev/progressbar branch (#25)
yes, I think was a really stupid missing import sys in the wrong position... let's see if szaghi accepts soon
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Eawag-AppliedSystemAnalysis/Simstrat/issues/25?email_source=notifications&email_token=AF55WXKMSX3W7QSVEJKAGFDQUROQPA5CNFSM4GQ7KBS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEP5O2Y#issuecomment-555734891, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AF55WXO4GBDSHGUV4XQOZRDQUROQPANCNFSM4GQ7KBSQ.
The new FoBiS release is out and the progressbar is now fully functional on the master branch.
for WINDOWS developers... can you build and test the
dev/progressbar
feature? The building should be smooth and easy using FoBiS as usual if you have Python 2.X, while it should not work with Python 3.XI cannot test because I do not have a WIN building env... thanks!