From a6833fe566ca9d92bd606be7941159435db18a2d Mon Sep 17 00:00:00 2001 From: Jean-Philippe ARGAUD Date: Wed, 22 Aug 2018 21:13:11 +0200 Subject: [PATCH] Simplifying python files installation scheme --- bin/Makefile.am | 6 ++++-- bin/qtEficas_adao_study.py.in | 2 +- src/daComposant/Makefile.am | 18 +++++++++-------- src/daEficas/Makefile.am | 4 +++- src/daSalome/Makefile.am | 20 ++++++++++--------- .../daGUI/daEficasWrapper/Makefile.am | 4 +++- src/daSalome/daGUI/daGuiImpl/Makefile.am | 4 +++- src/daSalome/daGUI/daUtils/Makefile.am | 4 +++- 8 files changed, 38 insertions(+), 24 deletions(-) diff --git a/bin/Makefile.am b/bin/Makefile.am index 7e8d62e..5c9e60b 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -26,8 +26,10 @@ bin_SCRIPTS = AdaoYacsSchemaCreator.py qtEficas_adao_study.py # AdaoCatalogGener EXTRA_DIST = AdaoYacsSchemaCreator.py qtEficas_adao_study.py.in # AdaoCatalogGenerator.py module_version.py +ADAODIR = $(DESTDIR)$(salomepythondir)/adao + install-data-hook: - @export PYTHONPATH=$(DESTDIR)${salomepythondir}:${PYTHONPATH} && python $(top_srcdir)/bin/AdaoCatalogGenerator.py $(DESTDIR)${salomepythondir}/daEficas ADAO_Cata_V0.py + @export PYTHONPATH=$(DESTDIR)${salomepythondir}:${PYTHONPATH} && python $(top_srcdir)/bin/AdaoCatalogGenerator.py $(ADAODIR)/daEficas ADAO_Cata_V0.py uninstall-hook: - @rm $(DESTDIR)${salomepythondir}/daEficas/ADAO_Cata_V0.py + @rm $(ADAODIR)/daEficas/ADAO_Cata_V0.py diff --git a/bin/qtEficas_adao_study.py.in b/bin/qtEficas_adao_study.py.in index 0f527d2..da5dfab 100644 --- a/bin/qtEficas_adao_study.py.in +++ b/bin/qtEficas_adao_study.py.in @@ -30,7 +30,7 @@ import sys # Configuration de l'installation INSTALLDIR = "@EFICAS_DIR@" sys.path.insert(0,INSTALLDIR) -ADAO_INSTALL_DIR = "@PYTHON_SITE@/salome/daEficas" +ADAO_INSTALL_DIR = "@PYTHON_SITE@/salome/adao/daEficas" sys.path.insert(0,ADAO_INSTALL_DIR) # Configuration diff --git a/src/daComposant/Makefile.am b/src/daComposant/Makefile.am index 3f3135c..65552d2 100644 --- a/src/daComposant/Makefile.am +++ b/src/daComposant/Makefile.am @@ -26,14 +26,16 @@ EXTRA_DIST = daCore daAlgorithms daNumerics DIR = $(top_srcdir)/src/daComposant/ +ADAODIR = $(DESTDIR)$(salomepythondir)/adao + install-data-local: - ${mkinstalldirs} $(DESTDIR)$(salomepythondir) - cp -R $(DIR)daCore $(DESTDIR)$(salomepythondir) - cp -R $(DIR)daAlgorithms $(DESTDIR)$(salomepythondir) - cp -R $(DIR)daNumerics $(DESTDIR)$(salomepythondir) + ${mkinstalldirs} $(ADAODIR) + cp -R $(DIR)daCore $(ADAODIR) + cp -R $(DIR)daAlgorithms $(ADAODIR) + cp -R $(DIR)daNumerics $(ADAODIR) uninstall-local: - chmod -R +w $(DESTDIR)$(salomepythondir) - rm -rf $(DESTDIR)$(salomepythondir)/daCore - rm -rf $(DESTDIR)$(salomepythondir)/daAlgorithms - rm -rf $(DESTDIR)$(salomepythondir)/daNumerics + chmod -R +w $(ADAODIR) + rm -rf $(ADAODIR)/daCore + rm -rf $(ADAODIR)/daAlgorithms + rm -rf $(ADAODIR)/daNumerics diff --git a/src/daEficas/Makefile.am b/src/daEficas/Makefile.am index 06282d1..36c6c43 100644 --- a/src/daEficas/Makefile.am +++ b/src/daEficas/Makefile.am @@ -23,7 +23,9 @@ include $(top_srcdir)/adm_local/make_common_starter.am -mypkgpythondir =$(salomepythondir)/daEficas +ADAODIR = $(DESTDIR)$(salomepythondir)/adao + +mypkgpythondir = $(ADAODIR)/daEficas mypkgpython_PYTHON = \ configuration_ADAO.py \ diff --git a/src/daSalome/Makefile.am b/src/daSalome/Makefile.am index cdf1e45..4659d89 100644 --- a/src/daSalome/Makefile.am +++ b/src/daSalome/Makefile.am @@ -22,7 +22,7 @@ include $(top_srcdir)/adm_local/make_common_starter.am -salomepython_PYTHON= adaoBuilder.py +# salomepython_PYTHON= adaoBuilder.py SUBDIRS= daGUI @@ -30,14 +30,16 @@ EXTRA_DIST = daYacsSchemaCreator daYacsIntegration DIR = $(top_srcdir)/src/daSalome/ +ADAODIR = $(DESTDIR)$(salomepythondir)/adao + install-data-local: - ${mkinstalldirs} $(DESTDIR)$(salomepythondir) - cp -R $(DIR)daYacsSchemaCreator $(DESTDIR)$(salomepythondir) - cp -R $(DIR)daYacsIntegration $(DESTDIR)$(salomepythondir) - cp $(DIR)adaoBuilder.py $(DESTDIR)$(salomepythondir) + ${mkinstalldirs} $(ADAODIR) + cp -R $(DIR)daYacsSchemaCreator $(ADAODIR) + cp -R $(DIR)daYacsIntegration $(ADAODIR) + cp $(DIR)adaoBuilder.py $(ADAODIR) uninstall-local: - chmod -R +w $(DESTDIR)$(salomepythondir) - rm -rf $(DESTDIR)$(salomepythondir)/daYacsSchemaCreator - rm -rf $(DESTDIR)$(salomepythondir)/daYacsIntegration - rm $(DESTDIR)$(salomepythondir)/adaoBuilder.py + chmod -R +w $(ADAODIR) + rm -rf $(ADAODIR)/daYacsSchemaCreator + rm -rf $(ADAODIR)/daYacsIntegration + rm -f $(ADAODIR)/adaoBuilder.py diff --git a/src/daSalome/daGUI/daEficasWrapper/Makefile.am b/src/daSalome/daGUI/daEficasWrapper/Makefile.am index 4145dc1..26ee736 100644 --- a/src/daSalome/daGUI/daEficasWrapper/Makefile.am +++ b/src/daSalome/daGUI/daEficasWrapper/Makefile.am @@ -21,7 +21,9 @@ include $(top_srcdir)/adm_local/make_common_starter.am -mypkgpythondir =$(salomepythondir)/daEficasWrapper +ADAODIR = $(DESTDIR)$(salomepythondir)/adao + +mypkgpythondir = $(ADAODIR)/daEficasWrapper mypkgpython_PYTHON = \ __init__.py \ diff --git a/src/daSalome/daGUI/daGuiImpl/Makefile.am b/src/daSalome/daGUI/daGuiImpl/Makefile.am index 51d13fd..9e72ec9 100644 --- a/src/daSalome/daGUI/daGuiImpl/Makefile.am +++ b/src/daSalome/daGUI/daGuiImpl/Makefile.am @@ -21,7 +21,9 @@ include $(top_srcdir)/adm_local/make_common_starter.am -mypkgpythondir =$(salomepythondir)/daGuiImpl +ADAODIR = $(DESTDIR)$(salomepythondir)/adao + +mypkgpythondir = $(ADAODIR)/daGuiImpl mypkgpython_PYTHON = \ __init__.py \ diff --git a/src/daSalome/daGUI/daUtils/Makefile.am b/src/daSalome/daGUI/daUtils/Makefile.am index 4f5e331..7910a03 100644 --- a/src/daSalome/daGUI/daUtils/Makefile.am +++ b/src/daSalome/daGUI/daUtils/Makefile.am @@ -21,7 +21,9 @@ include $(top_srcdir)/adm_local/make_common_starter.am -mypkgpythondir =$(salomepythondir)/daUtils +ADAODIR = $(DESTDIR)$(salomepythondir)/adao + +mypkgpythondir = $(ADAODIR)/daUtils mypkgpython_PYTHON = \ __init__.py \ -- 2.39.2