Skip to content

SciDAVis 2.9 release #24

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

Merged
merged 37 commits into from
May 8, 2022
Merged

SciDAVis 2.9 release #24

merged 37 commits into from
May 8, 2022

Conversation

highperformancecoder
Copy link
Member

No description provided.

@alxpl
Copy link
Contributor

alxpl commented Apr 16, 2022

Hello Russel,

That's quite a lot of work there!
I found a few issues with some paths and had to patch a couple of lines here and there to get everything working on current Fedora branches.
I'm preparing for a PhD defense in a few days, so I did not have the time to examine things in depth and I did not dare update SciDAVis on my computers, while I'm still reworking some of my plots.

What needed patching:

In CMakeLists.txt, I moved the GNUInstallDirs include statement right after the project declaration.

diff -Naur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt	2022-04-16 11:37:37.000000000 +0200
+++ b/CMakeLists.txt	2022-04-16 16:14:37.723316431 +0200
@@ -1,5 +1,4 @@
 cmake_minimum_required( VERSION 3.16 )
-include(GNUInstallDirs)
 
 # Target platform is Windows 10
 if( CMAKE_GENERATOR STREQUAL "Visual Studio 15 2017" OR
@@ -14,6 +13,7 @@
   DESCRIPTION "SciDAVis is a free application for Scientific Data Analysis and Visualization."
   HOMEPAGE_URL "https://scidavis.sourceforge.net"
   LANGUAGES CXX C)
+include(GNUInstallDirs)
 
 set( CMAKE_CXX_STANDARD 17)
 set( CMAKE_CXX_STANDARD_REQUIRED TRUE )

CMake at least since version 3.17 expects it to be there, otherwise any path that depends on it is never set. I remember seeing the relevant error message when compiling previous versions, but it never registered, sorry…

I also had to revert the change in the qwtplot3d name in 3rdparty/CMakeLists.txt:

diff -Naur a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
--- a/3rdparty/CMakeLists.txt	2022-04-16 11:37:37.000000000 +0200
+++ b/3rdparty/CMakeLists.txt	2022-04-16 14:14:11.667153679 +0200
@@ -47,7 +47,7 @@
 
 if( NOT BUILD_QWTPLOT3D )
 find_library ( QWTPLOT3D_LIBRARY
-    NAMES qwtplot3d
+    NAMES qwtplot3d-qt5
     HINTS ${QT_LIBRARY_DIR}
   )
   if( NOT QWTPLOT3D_LIBRARY )

With GNUInstallDirs now taken into account, I had to modify the following path variables in libscidavis/CMakeLists.txt:

diff -Naur a/libscidavis/CMakeLists.txt b/libscidavis/CMakeLists.txt
--- a/libscidavis/CMakeLists.txt	2022-04-16 11:37:37.000000000 +0200
+++ b/libscidavis/CMakeLists.txt	2022-04-16 15:54:37.363785188 +0200
@@ -409,9 +409,9 @@
     )
 else()
   target_compile_definitions( libscidavis PUBLIC
-    TS_PATH="${CMAKE_INSTALL_PREFIX}/share/scidavis/translations"
-    DOC_PATH="${CMAKE_INSTALL_PREFIX}/share/doc/scidavis"
-    PLUGIN_PATH="${CMAKE_INSTALL_PREFIX}/lib/scidavis/plugins"
+    TS_PATH="${CMAKE_INSTALL_DATAROOTDIR}/scidavis/translations"
+    DOC_PATH="${CMAKE_INSTALL_DOCDIR}/scidavis"
+    PLUGIN_PATH="${CMAKE_INSTALL_LIBDIR}/scidavis/plugins"
     )
 endif()
 

A couple of questions:
In scidavis/CMakeLists.txt, there's this conditional:

    if( SCRIPTING_PYTHON )
      if(NOT PYTHON_SCRIPTDIR)
        set(PYTHON_SCRIPTDIR etc)
      endif()

Why does it begin with a NOT? Was PYTHON_SCRIPTDIR supposed to be declared someplace else? I don't see a setting in ~/.config/SciDAVis.conf for example.
Why set the path to /etc/? Is there any fairly recent distribution that keeps Python scripts there?

@highperformancecoder
Copy link
Member Author

Hello Russel,

That's quite a lot of work there!

I guess I haven't merged up in a while. It's just such an ornery piece of code, that I'd run out of time before solving the problems, so merge up go forgotten about.

I found a few issues with some paths and had to patch a couple of lines here and there to get everything working on current Fedora branches. I'm preparing for a PhD defense in a few days, so I did not have the time to examine things in depth and I did not dare update SciDAVis on my computers, while I'm still reworking some of my plots.

Make sense. When I was doing my PhD, we'd have 18 month upgrade cycle, so that you could rely on your software working for at least half a PhD. But today, we seem to have weekly upgrades :P

What needed patching:

In CMakeLists.txt, I moved the GNUInstallDirs include statement right after the project declaration.

diff -Naur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt	2022-04-16 11:37:37.000000000 +0200
+++ b/CMakeLists.txt	2022-04-16 16:14:37.723316431 +0200
@@ -1,5 +1,4 @@
 cmake_minimum_required( VERSION 3.16 )
-include(GNUInstallDirs)
 
 # Target platform is Windows 10
 if( CMAKE_GENERATOR STREQUAL "Visual Studio 15 2017" OR
@@ -14,6 +13,7 @@
   DESCRIPTION "SciDAVis is a free application for Scientific Data Analysis and Visualization."
   HOMEPAGE_URL "https://scidavis.sourceforge.net"
   LANGUAGES CXX C)
+include(GNUInstallDirs)
 
 set( CMAKE_CXX_STANDARD 17)
 set( CMAKE_CXX_STANDARD_REQUIRED TRUE )

CMake at least since version 3.17 expects it to be there, otherwise any path that depends on it is never set. I remember seeing the relevant error message when compiling previous versions, but it never registered, sorry…

I also had to revert the change in the qwtplot3d name in 3rdparty/CMakeLists.txt:

diff -Naur a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
--- a/3rdparty/CMakeLists.txt	2022-04-16 11:37:37.000000000 +0200
+++ b/3rdparty/CMakeLists.txt	2022-04-16 14:14:11.667153679 +0200
@@ -47,7 +47,7 @@
 
 if( NOT BUILD_QWTPLOT3D )
 find_library ( QWTPLOT3D_LIBRARY
-    NAMES qwtplot3d
+    NAMES qwtplot3d-qt5

This was Andrew Ammerlaan's change:

" 3rdparty/CMakeLists.txt: find qwtplot3d

- qwtplot3d is the default name of the library so lets us that in favour of
 qwtplot3d-qt5

Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>

If you use the submodules (as I do), there is no problem with either setting.

 HINTS ${QT_LIBRARY_DIR}

)
if( NOT QWTPLOT3D_LIBRARY )


With GNUInstallDirs now taken into account, I had to modify the following path variables in libscidavis/CMakeLists.txt:

diff -Naur a/libscidavis/CMakeLists.txt b/libscidavis/CMakeLists.txt
--- a/libscidavis/CMakeLists.txt 2022-04-16 11:37:37.000000000 +0200
+++ b/libscidavis/CMakeLists.txt 2022-04-16 15:54:37.363785188 +0200
@@ -409,9 +409,9 @@
)
else()
target_compile_definitions( libscidavis PUBLIC

  • TS_PATH="${CMAKE_INSTALL_PREFIX}/share/scidavis/translations"
  • DOC_PATH="${CMAKE_INSTALL_PREFIX}/share/doc/scidavis"
  • PLUGIN_PATH="${CMAKE_INSTALL_PREFIX}/lib/scidavis/plugins"
  • TS_PATH="${CMAKE_INSTALL_DATAROOTDIR}/scidavis/translations"
  • DOC_PATH="${CMAKE_INSTALL_DOCDIR}/scidavis"
  • PLUGIN_PATH="${CMAKE_INSTALL_LIBDIR}/scidavis/plugins"
    )
    endif()

A couple of questions: In scidavis/CMakeLists.txt, there's this conditional:

if( SCRIPTING_PYTHON )
  if(NOT PYTHON_SCRIPTDIR)
    set(PYTHON_SCRIPTDIR etc)
  endif()

Why does it begin with a NOT? Was PYTHON_SCRIPTDIR supposed to be declared someplace else? I don't see a setting in ~/.config/SciDAVis.conf for example. Why set the path to /etc/? Is there any fairly recent distribution that keeps Python scripts there?

Again this is Andrew Amerlaan's change: His commit log says:

CMakeLists.txt: several fixes

- share/appdata is deprecated in favour of share/metainfo
- use CMAKE_INSTALL_DOCDIR from GNUInstallDirs for docs
- only look for muparser if we have it enabled
    (TODO: fix building with muparser disabled)
- add PYTHON_SCRIPTDIR that can be overriden to change the location
    of the python files.
    (TODO: change the default, /usr/etc is a very strange path)

So it sounds like he is not fixed on the value etc.

@Nowa-Ammerlaan
Copy link
Contributor

Why does it begin with a NOT? Was PYTHON_SCRIPTDIR supposed to be declared someplace else? I don't see a setting in ~/.config/SciDAVis.conf for example. Why set the path to /etc/? Is there any fairly recent distribution that keeps Python scripts there?

Again this is Andrew Amerlaan's change: His commit log says:

CMakeLists.txt: several fixes

- share/appdata is deprecated in favour of share/metainfo
- use CMAKE_INSTALL_DOCDIR from GNUInstallDirs for docs
- only look for muparser if we have it enabled
    (TODO: fix building with muparser disabled)
- add PYTHON_SCRIPTDIR that can be overriden to change the location
    of the python files.
    (TODO: change the default, /usr/etc is a very strange path)

So it sounds like he is not fixed on the value etc.

The NOT is there to allow overriding the strange etc path without changing the default behaviour: 2597372 Previously the python files were installed into etc without anyway to override this strange path. But yes the default should really be changed, etc is not meant for python scripts. I did not change it in my earlier commit because I was unsure what would be a proper cross-distro default setting for this, in Gentoo we keep them in /usr/lib/python-exec/pythonX.Y but I don't know what other distro's are doing.

Copy link
Contributor

@narunlifescience narunlifescience left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not very good at reviewing scripts & cmake files. looks good to me anyway.

@alxpl
Copy link
Contributor

alxpl commented May 8, 2022

[…] But yes the default should really be changed, etc is not meant for python scripts. I did not change it in my earlier commit because I was unsure what would be a proper cross-distro default setting for this, in Gentoo we keep them in /usr/lib/python-exec/pythonX.Y but I don't know what other distro's are doing.

In Fedora (and the rest of the family) we've been using a macro (%{python3_sitearch}), which on my F35 x86_64 system evaluates to:
/usr/lib64/python3.10/site-packages
so the full installation path is
/usr/lib64/python3.10/site-packages/scidavis

At least OpenSUSE and friends also use separate paths for 32- and 64-bit.

See https://docs.python.org/3/library/sys.html#sys.platlibdir

@alxpl
Copy link
Contributor

alxpl commented May 8, 2022

Now that I have time to spare again, I 've been using this code base for the last couple of days and I haven't hit any regressions, so I am going to merge, considering there are some fixes which are required downstream.

@alxpl alxpl merged commit 9eece99 into SciDAVis:master May 8, 2022
@highperformancecoder
Copy link
Member Author

Thanks Alex. Actually, there is one major regression which affects MacOSX builds. Its the reason I haven't released binaries for 2.9.

@alxpl
Copy link
Contributor

alxpl commented May 8, 2022

I wanted to create a 2.9.0 tag, but in the process I also made a release, which I deleted immediately afterwards.

@highperformancecoder
Copy link
Member Author

highperformancecoder commented May 9, 2022 via email

@alxpl
Copy link
Contributor

alxpl commented May 9, 2022

Sorry, I did not mean to overstep. I thought that since you had named the commit "2.9 release" it was ok to tag it to keep track of things.
Semantic versioning is convenient for packaging as well, but what gets which version number is entirely up to you.

@highperformancecoder
Copy link
Member Author

highperformancecoder commented May 9, 2022 via email

@alxpl
Copy link
Contributor

alxpl commented May 9, 2022

No, the last tag was 2.4.0.

@highperformancecoder
Copy link
Member Author

highperformancecoder commented May 9, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants