[opensuse-support] python module with C-code
Good morning, I'm in desperate need of a grib file converter (weather data) and wanted to build pygrib: https://build.opensuse.org/package/show/home:DocB:Tryton5/python-pygrib I get it compiling, but it seems there is some issue with including the C- library - it does not find the pygrib module during testing. Do I 'just' need to link it into %{python_sitelib} ? Thanks Axel -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
Axel, I am not a great expert on spec files. From what I see, it actually builds for x86_64. It's only the tests which do not find the module on OBS. I quickly ran through the procedure with pip manually (no OBS / spec file issues) and it works as expected. Nonetheless, pygrib has never been particularly easy to build ... eccodes-devel from openSUSE's science repo, proj from openSUSE's GIS repo, clean new virtual environment with Python 3 (`python3 -m venv env; source env/bin/activate`), latest pip and setuptools (`pip install -U pip setuptools`), numpy and pyproj pre-installed (`pip install -v numpy pyproj`, something is clearly broken in pygrib's setup file), then `pip install -v pygrib` works just fine. Sebastian Am 20.08.19 um 08:54 schrieb Axel Braun:
Good morning,
I'm in desperate need of a grib file converter (weather data) and wanted to build pygrib: https://build.opensuse.org/package/show/home:DocB:Tryton5/python-pygrib
I get it compiling, but it seems there is some issue with including the C- library - it does not find the pygrib module during testing. Do I 'just' need to link it into %{python_sitelib} ?
Thanks Axel
-- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
Hello Sebastian. Am Dienstag, 20. August 2019, 09:42:16 CEST schrieb Sebastian M. Ernst:
I am not a great expert on spec files. From what I see, it actually builds for x86_64. It's only the tests which do not find the module on OBS. I quickly ran through the procedure with pip manually (no OBS / spec file issues) and it works as expected. Nonetheless, pygrib has never been particularly easy to build ...
eccodes-devel from openSUSE's science repo, proj from openSUSE's GIS repo, clean new virtual environment with Python 3 (`python3 -m venv env; source env/bin/activate`), latest pip and setuptools (`pip install -U pip setuptools`), numpy and pyproj pre-installed (`pip install -v numpy pyproj`, something is clearly broken in pygrib's setup file), then `pip install -v pygrib` works just fine.
For sure the spec file is not complete :-) just trying to find out where the issue is. During the build I had to learn the grib_api is deprecated, but ecCodes is a plugin-replacement. If you look at your installed files, there should be a folder /usr/lib64/ python3.6/site-packages/pygrib Does it contain pygrib.cpython-36m-x86_64-linux-gnu.so or just a module pygrib (potentially a link)? Thanks Axel -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
Alex,
If you look at your installed files, there should be a folder /usr/lib64/ python3.6/site-packages/pygrib Does it contain pygrib.cpython-36m-x86_64-linux-gnu.so or just a module pygrib (potentially a link)?
(env) user@c:~/test2/env/lib64/python3.7/site-packages> find . | grep -i grib ./ncepgrib2.py ./__pycache__/ncepgrib2.cpython-37.pyc ./pygrib.cpython-37m-x86_64-linux-gnu.so ./pygrib-2.0.4-py3.7.egg-info ./pygrib-2.0.4-py3.7.egg-info/requires.txt ./pygrib-2.0.4-py3.7.egg-info/installed-files.txt ./pygrib-2.0.4-py3.7.egg-info/top_level.txt ./pygrib-2.0.4-py3.7.egg-info/dependency_links.txt ./pygrib-2.0.4-py3.7.egg-info/PKG-INFO ./pygrib-2.0.4-py3.7.egg-info/SOURCES.txt (env) user@c:~/test2/env/lib64/python3.7/site-packages> ls -lah | grep -i grib -rw-r--r-- 1 user users 59K 14. Feb 2019 ncepgrib2.py drwxr-xr-x 2 user users 8 20. Aug 09:29 pygrib-2.0.4-py3.7.egg-info -rwxr-xr-x 1 user users 2,5M 20. Aug 09:29 pygrib.cpython-37m-x86_64-linux-gnu.so It does a shared object file, yes, and it's not a symlink or similar. Sebastian -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
Hello Sebastian, Am Dienstag, 20. August 2019, 10:24:21 CEST schrieb Sebastian M. Ernst:
Alex,
Axel.....
If you look at your installed files, there should be a folder /usr/lib64/ python3.6/site-packages/pygrib Does it contain pygrib.cpython-36m-x86_64-linux-gnu.so or just a module pygrib (potentially a link)?
(env) user@c:~/test2/env/lib64/python3.7/site-packages> find . | grep -i grib ./ncepgrib2.py ./__pycache__/ncepgrib2.cpython-37.pyc ./pygrib.cpython-37m-x86_64-linux-gnu.so ./pygrib-2.0.4-py3.7.egg-info ./pygrib-2.0.4-py3.7.egg-info/requires.txt ./pygrib-2.0.4-py3.7.egg-info/installed-files.txt ./pygrib-2.0.4-py3.7.egg-info/top_level.txt ./pygrib-2.0.4-py3.7.egg-info/dependency_links.txt ./pygrib-2.0.4-py3.7.egg-info/PKG-INFO ./pygrib-2.0.4-py3.7.egg-info/SOURCES.txt (env) user@c:~/test2/env/lib64/python3.7/site-packages> ls -lah | grep -i grib -rw-r--r-- 1 user users 59K 14. Feb 2019 ncepgrib2.py drwxr-xr-x 2 user users 8 20. Aug 09:29 pygrib-2.0.4-py3.7.egg-info -rwxr-xr-x 1 user users 2,5M 20. Aug 09:29 pygrib.cpython-37m-x86_64-linux-gnu.so
That looks as in my case
It does a shared object file, yes, and it's not a symlink or similar.
Thanks, now I have to work on the magic idea :-) Cheers Axel -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
participants (3)
-
Axel Braun
-
Axel Braun
-
Sebastian M. Ernst