sciapp / gr

GR framework: a graphics library for visualisation applications
Other
328 stars 55 forks source link

export gr_setwscharheight in windows dlls #170

Closed bpedersen2 closed 1 year ago

bpedersen2 commented 1 year ago

pyinstaller on windows fails with:

 File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\jenkins\workspace\Generic\BuildPyWinExe\installvenv\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
  File "C:\Users\jenkins\workspace\Generic\BuildPyWinExe\installvenv\lib\site-packages\PyInstaller\__main__.py", line 194, in _console_script_run
    run()
  File "C:\Users\jenkins\workspace\Generic\BuildPyWinExe\installvenv\lib\site-packages\PyInstaller\__main__.py", line 180, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "C:\Users\jenkins\workspace\Generic\BuildPyWinExe\installvenv\lib\site-packages\PyInstaller\__main__.py", line 61, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "C:\Users\jenkins\workspace\Generic\BuildPyWinExe\installvenv\lib\site-packages\PyInstaller\building\build_main.py", line 971, in main
    build(specfile, distpath, workpath, clean_build)
  File "C:\Users\jenkins\workspace\Generic\BuildPyWinExe\installvenv\lib\site-packages\PyInstaller\building\build_main.py", line 893, in build
    exec(code, spec_namespace)
  File "C:\Users\jenkins\workspace\Generic\BuildPyWinExe\installer\nicos-history.spec", line 8, in <module>
    from utils import rootdir, find_uis, find_custom, find_gr, find_modules
  File "C:\Users\jenkins\workspace\Generic\BuildPyWinExe\installer\utils.py", line 31, in <module>
    import gr
  File "C:\Users\jenkins\workspace\Generic\BuildPyWinExe\installvenv\lib\site-packages\gr\__init__.py", line 3887, in <module>
    __gr.gr_setwscharheight.argtypes = [c_double, c_double]
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\lib\ctypes\__init__.py", line 387, in __getattr__
    func = self.__getitem__(name)
  File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\lib\ctypes\__init__.py", line 392, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'gr_setwscharheight' not found
bpedersen2 commented 1 year ago

@cfelder

cfelder commented 1 year ago

Thanks for reaching out @bpedersen2. Thanks for fixing my oversight. I pushed your change to our internal CI and review process. We'll update/close this PR once this hits our main repo.

bpedersen2 commented 1 year ago

The runtime change is merged now, an update for python-gr is still needed

cfelder commented 1 year ago

Fixed w/ python-gr release v1.23.1

bpedersen2 commented 1 year ago

merged upstream