-
-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to upstream ctypesgen version #1651
Conversation
112327e
to
d1e52db
Compare
It turned out it was almost as straightforward as swapping ctypesgen version code base. It now actually works, as tested on Mac. It now seems that updating to latest version of ctypesgen is actually feasible. I keep it in draft mode, but I modified the title of the PR to reflect this. Please do test! I also would appreciate suggestions to fix CIs Flake8 failure. Preamble code is now included in every generated py file (with an indentical |
Great work! I have checked out this PR and compiled it successfully on Fedora 33. The GUI works. |
OK, I managed to trigger one.. switching to 3D NVIZ mode in the GUI, leads to
|
Same for me, will look into this. |
4451276
to
79b4dbb
Compare
So, now I believe I have actually solved remaining major issues, including nviz 3D mode. Running the tests locally now shows no regression from master, and remaining ones are likely unrelated to this PR. I included a directory with patches already applied to ctypesgen source, to keep the record. Description of patches needed, which in some way or another need to be addressed upstreams (for this to make any sense): POINTER patchhttps://trac.osgeo.org/grass/ticket/2748 Every generated GRASS library bridge part (gis.py, raster.py etc.) is a standalone product. Loader and preamble patchReplaces Mac patches |
Excellent @nilason: switching to 3D NVIZ mode in the GUI now works! I justed tested that for now (Fedora 33) but will keep the patch locally active to explore it further. |
Great! Thanks for further testing. I'm rather confident this will work in general use, but there may always be surprises. |
Probably time to merge in order to receive testing on Windows and Mac? |
That would be the ultimate testing arena! |
I will test myself, but also there are some failing tests that seem related (in Ubuntu 18/20 tests). |
Please, rebase or merge with the master branch to get a better working test result reporting (stderr in CI instead of stdout, downloadable report on failure). |
42284f2
to
a4e1075
Compare
Locally running
Two are GDAL related, the other apparently using a different python sqlite driver than expected. Non are seemingly ctypesgen related. |
Before the rebasing there were errors in the Ubuntu 18/20 CI tests, I think it was related to 3D rasters, they seemed to be related to ctypesgen. I would check once the CI is working again. |
I did at some point see similar errors, but I can't remember when, how... |
a935bf7
to
eb7b62a
Compare
- with instructions on updating ctypesgen version - remove patches dir and separate files
eb7b62a
to
77cc843
Compare
d8f40bc
to
498b098
Compare
At last, I found which old patch for Windows that was needed for ctypesgen to work! This now runs on all platforms without regression and independent of OSGeo4W changes. This may now be merged. |
If there are no objections, I will go ahead and merge this in a few days. |
Yes, please. |
I take it no one objects merging this, so I'll throw it in. |
* update ctypesgen to community version * ctypesgen patches needed for mac * ctypesgen patch for python printer of preamble and loader * patches applied to ctypesgen source code * patch for ctypesgen POINTER * Use ReturnString to create String from str object * remove lextab.py from gitignore * remove sed-file for preamble/loader replacement * black on preamble patch * add README - with instructions on updating ctypesgen version - remove patches dir and separate files * set RASTER3D_DEFAULT_WINDOW=0 * libimagery unittest: adapt to community ctypesgen * add win patches to README * patches needed for Windows * update README and run Black on a patch
* update ctypesgen to community version * ctypesgen patches needed for mac * ctypesgen patch for python printer of preamble and loader * patches applied to ctypesgen source code * patch for ctypesgen POINTER * Use ReturnString to create String from str object * remove lextab.py from gitignore * remove sed-file for preamble/loader replacement * black on preamble patch * add README - with instructions on updating ctypesgen version - remove patches dir and separate files * set RASTER3D_DEFAULT_WINDOW=0 * libimagery unittest: adapt to community ctypesgen * add win patches to README * patches needed for Windows * update README and run Black on a patch
Following discussion on #1647 I swapped content of
python/grass/ctypes/ctypesgen
with latest ctypesgen code from ctypesgen/ctypesgen@0681f8e.This for more easy overview for initial estimation on degree of diversion and may serve as a starting point in a eventual transition.I made no effort to make it actually work. Don't try this at home :)This is now a working PR with latest version of ctypesgen. This needs to be tested.
Addresses trac ticket #3900.