File sherpa-suse-libdir.patch of Package python-sherpa

Index: sherpa-4.17.1/helpers/sherpa_config.py
===================================================================
--- sherpa-4.17.1.orig/helpers/sherpa_config.py
+++ sherpa-4.17.1/helpers/sherpa_config.py
@@ -79,7 +79,7 @@ class sherpa_config(Command):
     def finalize_options(self):
         incdir = os.path.join(self.install_dir, 'include')
         libdir = os.path.join(self.install_dir, 'lib')
-        pydir = os.path.join(libdir, f'python{version}', 'site-packages')
+        pydir = os.path.join(self.install_dir, '@_LIB@', f'python{version}', 'site-packages')
 
         if self.fftw_include_dirs is None:
             self.fftw_include_dirs = incdir
@@ -144,7 +144,7 @@ class sherpa_config(Command):
         # normal installs: editable installs do not seem to care about
         # the data_files setting.
         #
-        libdir = os.path.join('lib',
+        libdir = os.path.join('@_LIB@',
                               f'python{version}',
                               'site-packages')
         dfiles = []
Index: sherpa-4.17.1/setup.cfg
===================================================================
--- sherpa-4.17.1.orig/setup.cfg
+++ sherpa-4.17.1/setup.cfg
@@ -20,15 +20,15 @@
 
 # FFTW Library
 # Uncomment to use a local installation
-#fftw=local
+fftw=local
 
 # If fftw=local uncomment the following lines and
 # change the default location of libraries and the name
 # of the library to be linked (usually fftw3)
 # (include multiple values by separating them with spaces)
-#fftw_include_dirs=build/include
-#fftw_lib_dirs=build/lib
-#fftw_libraries=fftw3
+fftw_include_dirs=include
+fftw_lib_dirs=@_LIB@
+fftw_libraries=fftw3
 
 # Region Library
 # Uncomment to use a local installation
@@ -54,9 +54,10 @@
 #wcs=local
 
 # Uncomment and change default location if needed
-#wcs_include_dirs=build/include
-#wcs_lib_dirs=build/lib
-#wcs_libraries=wcs
+# sherpa is not compatible with wcs.h from system. Make it build and find vendored wcssubs in extern/
+wcs_include_dirs=build/include
+wcs_lib_dirs=build/lib
+wcs_libraries=wcs
 
 
 [build_sphinx]
openSUSE Build Service is sponsored by