diff options
Diffstat (limited to 'package')
34 files changed, 665 insertions, 637 deletions
diff --git a/package/debian12/changelog b/package/debian12/changelog new file mode 100644 index 0000000..d0764f1 --- /dev/null +++ b/package/debian12/changelog @@ -0,0 +1,156 @@ +silx (0.11.0+dfsg-3) unstable; urgency=medium + + * d/control: Build-Depends on python3-qtconsole(Closes: #946571). + + -- Picca Frédéric-Emmanuel <picca@debian.org> Wed, 11 Dec 2019 09:10:31 +0100 + +silx (0.11.0+dfsg-2) unstable; urgency=medium + + * Use debhelper-compat instead of debian/compat. + * remove Python2 modules (Closes: #938481). + * Switched to compat level 12 + - d/rules: Used --doc-main-package python3-silx. + + -- Picca Frédéric-Emmanuel <picca@debian.org> Sat, 19 Oct 2019 13:19:44 +0200 + +silx (0.11.0+dfsg-1) unstable; urgency=medium + + [ Alexandre Marie ] + * Added test on openCL's use + * New upstream version 0.11.0+dfsg + * d/patches + - 0004-fix-missing-import.patches (Removed) + - 0005-fix-problem-with-sift-import (Removed) + + -- Picca Frédéric-Emmanuel <picca@debian.org> Tue, 09 Jul 2019 15:26:55 +0200 + +silx (0.10.1+dfsg-1~exp2) experimental; urgency=medium + + * d/patchs + + 0005-fix-problem-with-sift-import.patch (Added) + + -- Picca Frédéric-Emmanuel <picca@synchrotron-soleil.fr> Tue, 28 May 2019 11:17:46 +0200 + +silx (0.10.1+dfsg-1~exp1) experimental; urgency=medium + + * New upstream version 0.10.1+dfsg + * d/patches + + 0004-fix-missing-import.patch (Added) + + -- Picca Frédéric-Emmanuel <picca@debian.org> Tue, 28 May 2019 08:20:44 +0200 + +silx (0.9.0+dfsg-3) unstable; urgency=medium + + * d/rules: Do not run Qt test for now. + * d/t/control.autodep8: Fixed to run test for real. + + -- Picca Frédéric-Emmanuel <picca@debian.org> Thu, 21 Feb 2019 11:22:03 +0100 + +silx (0.9.0+dfsg-2) unstable; urgency=medium + + * d/patches: + + 0004-fix-FTBFS-with-numpy-0.16.patch (Added) + + -- Picca Frédéric-Emmanuel <picca@debian.org> Thu, 20 Dec 2018 16:21:18 +0100 + +silx (0.9.0+dfsg-1) unstable; urgency=medium + + [ Picca Frédéric-Emmanuel ] + * Fixed autopkgtests and use control.autodep8 + * Used salsa-ci for continuous integration. + * Run autopkgtests via xvfb-run + * d/control: Removed Build-Depends: python-lxml[-dbg], python-enum34. + + [ Alexandre Marie ] + * New upstream version 0.9.0+dfsg + * d/watch: uversionmangling to deal with rc|alpha|beta versions. + + -- Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> Mon, 17 Dec 2018 13:25:52 +0100 + +silx (0.8.0+dfsg-1) unstable; urgency=medium + + * New upstream version 0.8.0+dfsg + * Added the pub 4096R/26F8E116 key to keyring + 2016-04-11 Thomas Vincent <thomas.vincent@esrf.fr> + * d/control + - Build-Depends + + Added pandoc + - Removed obsolete X-Python[3]-Version + * d/rules + - Installed the QtDesgigner files only for Qt5. + - Override dh_python3 to deal with qtdesigner files. + - Run sphinx with xvfb in order to have the right silx.sx documentation. + - Avoid QT warnings by setting XDG_RUNTIME_DIR + + -- Picca Frédéric-Emmanuel <picca@debian.org> Tue, 31 Jul 2018 16:24:57 +0200 + +silx (0.7.0+dfsg-2) unstable; urgency=medium + + * d/rules + - use py3versions to get the python3 default interpreter version. + This makes the package backportable. + + -- Picca Frédéric-Emmanuel <picca@debian.org> Tue, 13 Mar 2018 20:04:20 +0100 + +silx (0.7.0+dfsg-1) unstable; urgency=medium + + * New upstream version 0.7.0+dfsg + * Bumped Strandards-Versions to 4.1.3 (nothing to do) + * d/control + - Build-Depends + + Added python[3]-nbsphinx, python-concurrent.futures + * d/copyright + remove the third_party _local files. + * d/patches + + 0003-do-not-modify-PYTHONPATH-from-setup.py.patch (added) + - 0005-slocale.h-is-removed-in-GLIBC-2.26.patch (obsolete) + - 0006-prefer-pyqt5-over-pyside.patch (obsolete) + * d/rules + - removed the jessie backports specific code + - compile extensions only once per interpreter. + - unactive for now the build time tests. + - build the doc only with python3. + * d/watch + - check the pgp signature + + -- Picca Frédéric-Emmanuel <picca@debian.org> Tue, 13 Mar 2018 07:32:00 +0100 + +silx (0.6.1+dfsg-2) unstable; urgency=medium + + * d/control + - Bump Standrad-Version 4.1.1 (nothing to do) + * fixed glibc 2.26 FTBFS with upstream patch glib2.26 (Closes: #882881) + * d/patches + + 0005-slocale.h-is-removed-in-GLIBC-2.26.patch (Added) + + -- Picca Frédéric-Emmanuel <picca@debian.org> Sun, 21 Jan 2018 09:32:38 +0100 + +silx (0.6.1+dfsg-1) unstable; urgency=medium + + * New upstream version 0.6.1+dfsg + * update watch file + + -- Picca Frédéric-Emmanuel <picca@debian.org> Sat, 25 Nov 2017 17:02:19 +0100 + +silx (0.6.0+dfsg-1) unstable; urgency=medium + + * New upstream version 0.6.0+dfsg + * d/patches + - 0001-fix-the-build_man-target.patch (deleted) + - 0004-test-unactive-ressource-for-now.patch (deleted) + - 0005-fix-the-sift-removal.patch (deleted) + + -- Picca Frédéric-Emmanuel <picca@debian.org> Sat, 07 Oct 2017 08:08:56 +0200 + +silx (0.5.0+dfsg-2) unstable; urgency=medium + + * d/control + - Added all the -dbg dependencies for the -dbg packages. + + -- Picca Frédéric-Emmanuel <picca@debian.org> Fri, 01 Sep 2017 15:10:44 +0200 + +silx (0.5.0+dfsg-1) unstable; urgency=medium + + * Initial release (Closes: #871637) + + -- Picca Frédéric-Emmanuel <picca@debian.org> Wed, 02 Aug 2017 11:00:20 +0100 diff --git a/package/debian12/control b/package/debian12/control new file mode 100644 index 0000000..2fe4b79 --- /dev/null +++ b/package/debian12/control @@ -0,0 +1,123 @@ +Source: silx +Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org> +Uploaders: Jerome Kieffer <jerome.kieffer@esrf.fr>, + Picca Frédéric-Emmanuel <picca@debian.org>, + Alexandre Marie <alexandre.marie@synchrotron-soleil.fr> +Section: science +Priority: optional +Build-Depends: cython3 (>= 0.23.2), + debhelper-compat (= 12), + dh-python, + graphviz, + help2man, + ipython3, + pandoc <!nodoc>, + python3-all-dev, + python3-fabio, + python3-h5py, + python3-mako, + python3-matplotlib, + python3-nbsphinx <!nodoc>, + python3-numpy, + python3-opengl, + python3-packaging, + python3-pil, + python3-pydata-sphinx-theme, + python3-pyopencl, + python3-pyqt5.qtopengl, + python3-pyqt5.qtsvg, + python3-pytest, + python3-pytest-mock, + python3-pytest-xvfb, + python3-qtconsole, + python3-scipy, + python3-setuptools, + python3-sphinx, + python3-sphinx-panels, + python3-sphinxcontrib.programoutput, + xauth, + xvfb +Standards-Version: 4.1.3 +Vcs-Browser: https://salsa.debian.org/science-team/silx +Vcs-Git: https://salsa.debian.org/science-team/silx.git +Homepage: https://github.com/silx-kit/silx + +Package: silx +Architecture: all +Depends: python3-silx (>= ${source:Version}), + ${misc:Depends}, + ${python3:Depends}, + ${shlibs:Depends} +Description: Toolbox for X-Ray data analysis - Executables + The silx project aims at providing a collection of Python packages to + support the development of data assessment, reduction and analysis + applications at synchrotron radiation facilities. It aims at + providing reading/writing different file formats, data reduction + routines and a set of Qt widgets to browse and visualize data. + . + The current version provides : + . + * reading HDF5 file format (with support of SPEC file format) + * histogramming + * fitting + * 1D and 2D visualization using multiple backends (matplotlib or OpenGL) + * image plot widget with a set of associated tools (See changelog file). + * Unified browser for HDF5, SPEC and image file formats supporting inspection + and visualization of n-dimensional datasets. + * Unified viewer (silx view filename) for HDF5, SPEC and image file formats + * OpenGL-based widget to display 3D scalar field with + isosurface and cutting plane. + . + This uses the Python 3 version of the package. + +Package: python3-silx +Architecture: any +Section: python +Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends} +Description: Toolbox for X-Ray data analysis - Python3 + The silx project aims at providing a collection of Python packages to + support the development of data assessment, reduction and analysis + applications at synchrotron radiation facilities. It aims at + providing reading/writing different file formats, data reduction + routines and a set of Qt widgets to browse and visualize data. + . + The current version provides : + . + * reading HDF5 file format (with support of SPEC file format) + * histogramming + * fitting + * 1D and 2D visualization using multiple backends (matplotlib or OpenGL) + * image plot widget with a set of associated tools (See changelog file). + * Unified browser for HDF5, SPEC and image file formats supporting inspection + and visualization of n-dimensional datasets. + * Unified viewer (silx view filename) for HDF5, SPEC and image file formats + * OpenGL-based widget to display 3D scalar field with + isosurface and cutting plane. + . + This is the Python 3 version of the package. + +Package: python-silx-doc +Architecture: all +Section: doc +Depends: libjs-mathjax, ${misc:Depends}, ${sphinxdoc:Depends} +Description: Toolbox for X-Ray data analysis - Documentation + The silx project aims at providing a collection of Python packages to + support the development of data assessment, reduction and analysis + applications at synchrotron radiation facilities. It aims at + providing reading/writing different file formats, data reduction + routines and a set of Qt widgets to browse and visualize data. + . + The current version provides : + . + * reading HDF5 file format (with support of SPEC file format) + * histogramming + * fitting + * 1D and 2D visualization using multiple backends (matplotlib or OpenGL) + * image plot widget with a set of associated tools (See changelog file). + * Unified browser for HDF5, SPEC and image file formats supporting inspection + and visualization of n-dimensional datasets. + * Unified viewer (silx view filename) for HDF5, SPEC and image file formats + * OpenGL-based widget to display 3D scalar field with + isosurface and cutting plane. + . + This is the common documentation package. diff --git a/package/debian8/gbp.conf b/package/debian12/gbp.conf index f68d262..f68d262 100644 --- a/package/debian8/gbp.conf +++ b/package/debian12/gbp.conf diff --git a/package/debian12/patches/0002-use-the-system-mathjax-privacy-breach.patch b/package/debian12/patches/0002-use-the-system-mathjax-privacy-breach.patch new file mode 100644 index 0000000..04deea7 --- /dev/null +++ b/package/debian12/patches/0002-use-the-system-mathjax-privacy-breach.patch @@ -0,0 +1,25 @@ +From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?= + <picca@synchrotron-soleil.fr> +Date: Thu, 10 Aug 2017 10:19:39 +0200 +Subject: use the system mathjax (privacy breach) + +--- + doc/source/conf.py | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/doc/source/conf.py b/doc/source/conf.py +index 86dbccf..18bfce2 100644 +--- a/doc/source/conf.py ++++ b/doc/source/conf.py +@@ -143,6 +143,11 @@ pygments_style = 'sphinx' + # A list of ignored prefixes for module index sorting. + # modindex_common_prefix = [] + ++# -- Option for MathJax extension ---------------------------------------------- ++ ++# Override required in order to use Debian's system mathjax ++mathjax_path = 'file:///usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML' ++ + + # -- Options for HTML output --------------------------------------------------- + diff --git a/package/debian12/patches/series b/package/debian12/patches/series new file mode 100644 index 0000000..b3adef1 --- /dev/null +++ b/package/debian12/patches/series @@ -0,0 +1 @@ +0002-use-the-system-mathjax-privacy-breach.patch diff --git a/package/debian12/py3dist-overrides b/package/debian12/py3dist-overrides new file mode 100644 index 0000000..2c4ce13 --- /dev/null +++ b/package/debian12/py3dist-overrides @@ -0,0 +1 @@ +pyqt5 python3-pyqt5,python3-pyqt5.qtopengl,python3-pyqt5.qtsvg
\ No newline at end of file diff --git a/package/debian8/python-silx-doc.doc-base b/package/debian12/python-silx-doc.doc-base index b290d8a..c8efa7f 100644 --- a/package/debian8/python-silx-doc.doc-base +++ b/package/debian12/python-silx-doc.doc-base @@ -1,9 +1,9 @@ Document: silx-manual Title: silx documentation manual Author: Jérôme Kieffer <jerome.kieffer@esrf.eu> -Abstract: Toolbox for X-Ray data analysis +Abstract: Toolbox for X-Ray data analysis Section: Science/Data Analysis Format: HTML -Index: /usr/share/doc/python-silx-doc/html/index.html -Files: /usr/share/doc/python-silx-doc/html/* +Index: /usr/share/doc/python3-silx/html/index.html +Files: /usr/share/doc/python3-silx/html/* diff --git a/package/debian12/rules b/package/debian12/rules new file mode 100755 index 0000000..5368399 --- /dev/null +++ b/package/debian12/rules @@ -0,0 +1,83 @@ +#!/usr/bin/make -f + +# avoir bbuild FTBFS +export HOME=$(CURDIR)/debian/tmp-home +export XDG_RUNTIME_DIR=$(HOME)/runtime +export POCL_CACHE_DIR=$(HOME)/.cache/ + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +export PYBUILD_AFTER_INSTALL=rm -rf {destdir}/usr/bin/ +export PYBUILD_NAME=silx +export SPECFILE_USE_GNU_SOURCE=1 +export SILX_FULL_INSTALL_REQUIRES=1 +export SILX_INSTALL_REQUIRES_STRIP=hdf5plugin + +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + +# Make does not offer a recursive wildcard function, so here's one: +rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2)) + +# How to recursively find all files with the same name in a given folder +ALL_PYX := $(call rwildcard,silx/,*.pyx) +#NOTA: No space before * + +# get the default python3 interpreter version +PY3VER := $(shell py3versions -dv) + +%: + dh $@ --with python3,sphinxdoc --buildsystem=pybuild + +override_dh_clean: + dh_clean + # remove the cython generated file to force rebuild + rm -f $(patsubst %.pyx,%.cpp,${ALL_PYX}) + rm -f $(patsubst %.pyx,%.c,${ALL_PYX}) + rm -f $(patsubst %.pyx,%.html,${ALL_PYX}) + rm -rf doc/build/html + rm -rf build/man + rm -rf *.egg-info + +override_dh_auto_build: + dh_auto_build + # build man pages + dh_auto_build -- -s custom --build-args="env PYTHONPATH={build_dir} {interpreter} tools/build_man_page.py" + +override_dh_install: + dh_numpy3 + + # install scripts into silx + python3 setup.py install_scripts -d debian/silx/usr/bin + dh_install -p silx package/desktop/*.desktop usr/share/applications + dh_install -p silx package/desktop/silx.png usr/share/icons/hicolor/48x48/apps + dh_install -p silx package/desktop/silx.svg usr/share/icons/hicolor/scalable/apps + dh_install -p silx package/desktop/silx.xml usr/share/mime/packages + + # install the qtdesigner files only for the python3 package + dh_install -p python3-silx qtdesigner_plugins/*.py /usr/lib/$(DEB_HOST_MULTIARCH)/qt5/plugins/designer/python + + dh_install + +override_dh_python3: + dh_python3 + dh_python3 -p python3-silx /usr/lib/$(DEB_HOST_MULTIARCH)/qt5/plugins/designer/python + +# WITH_QT_TEST=False to disable graphical tests +# SILX_OPENCL=False to disable OpenCL tests +# SILX_TEST_LOW_MEM=False to disable tests taking large amount of memory +# GPU=False to disable the use of a GPU with OpenCL test +# WITH_GL_TEST=False to disable tests using OpenGL +override_dh_auto_test: + mkdir -p $(POCL_CACHE_DIR) # create POCL cachedir in order to avoid an FTBFS in sbuild + dh_auto_test -- -s custom --test-args="env PYTHONPATH={build_dir} GPU=False WITH_QT_TEST=False SILX_OPENCL=False SILX_TEST_LOW_MEM=False xvfb-run -a --server-args=\"-screen 0 1024x768x24\" {interpreter} run_tests.py -vv --installed" + +override_dh_installman: + dh_installman -p silx build/man/*.1 + +override_dh_sphinxdoc: +ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) + #mkdir -p $(POCL_CACHE_DIR) # create POCL cachedir in order to avoid an FTBFS in sbuild + mkdir -p -m 700 $(XDG_RUNTIME_DIR) + pybuild --build -s custom -p $(PY3VER) --build-args="cd doc && env PYTHONPATH={build_dir} http_proxy='127.0.0.1:9' xvfb-run -a --server-args=\"-screen 0 1024x768x24\" {interpreter} -m sphinx -N -bhtml source build/html" + dh_installdocs "doc/build/html" -p python-silx-doc --doc-main-package=python3-silx + dh_sphinxdoc -O--buildsystem=pybuild +endif diff --git a/package/debian8/source/format b/package/debian12/source/format index 163aaf8..163aaf8 100644 --- a/package/debian8/source/format +++ b/package/debian12/source/format diff --git a/package/debian8/source/options b/package/debian12/source/options index 6e88e49..6e88e49 100644 --- a/package/debian8/source/options +++ b/package/debian12/source/options diff --git a/package/debian12/tests/control b/package/debian12/tests/control new file mode 100644 index 0000000..deb174c --- /dev/null +++ b/package/debian12/tests/control @@ -0,0 +1,15 @@ +Test-Command: set -efu + ; for py in $(py3versions -r 2>/dev/null) + ; do cd "$AUTOPKGTEST_TMP" + ; echo "Testing with $py:" + ; xvfb-run -a --server-args="-screen 0 1024x768x24" $py -c "import silx.test; silx.test.run_tests()" 2>&1 + ; done +Depends: python3-all, python3-silx, xauth, xvfb + +Test-Command: set -efu + ; for py in $(py3versions -r 2>/dev/null) + ; do cd "$AUTOPKGTEST_TMP" + ; echo "Testing with $py-dbg:" + ; xvfb-run -a --server-args="-screen 0 1024x768x24" $py-dbg -c "import silx.test; silx.test.run_tests()" 2>&1 + ; done +Depends: python3-all-dbg, python3-silx-dbg, xauth, xvfb diff --git a/package/debian12/watch b/package/debian12/watch new file mode 100644 index 0000000..99444f9 --- /dev/null +++ b/package/debian12/watch @@ -0,0 +1,7 @@ +version=4 +opts=repacksuffix=+dfsg,\ +pgpsigurlmangle=s/$/.asc/,\ +dversionmangle=s/\+dfsg//,\ +uversionmangle=s/(rc|a|b|c)/~$1/ \ +https://pypi.python.org/packages/source/s/@PACKAGE@/ \ + @PACKAGE@-@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate diff --git a/package/debian8/changelog b/package/debian8/changelog deleted file mode 100644 index 763d069..0000000 --- a/package/debian8/changelog +++ /dev/null @@ -1,22 +0,0 @@ -silx (0.3.0-1) unstable; urgency=low - - * debian/control - - Add missing dependencies - - Add -dbg packages - * Upstream version 0.4.0a - - -- Thomas Vincent <tvincent@edna-site.org> Mon, 23 Jan 2017 17:09:20 +0100 - -silx (0.1.0-1) unstable; urgency=low - - * debian/control - - Comment -dbg packages - * Upstream version 0.1.0 - - -- Thomas Vincent <thomas.vincent@esrf.fr> Thu, 14 Apr 2016 09:35:28 +0200 - -silx (0.0.0-1) unstable; urgency=low - - * Initial release (Closes: #??????) - - -- Jerome Kieffer <jerome.kieffer@esrf.fr> Tue, 15 Mar 2016 11:00:20 +0100 diff --git a/package/debian8/clean b/package/debian8/clean deleted file mode 100644 index 668a363..0000000 --- a/package/debian8/clean +++ /dev/null @@ -1 +0,0 @@ -*.egg-info/*
\ No newline at end of file diff --git a/package/debian8/compat b/package/debian8/compat deleted file mode 100644 index ec63514..0000000 --- a/package/debian8/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/package/debian8/control b/package/debian8/control deleted file mode 100644 index d84a339..0000000 --- a/package/debian8/control +++ /dev/null @@ -1,205 +0,0 @@ -Source: silx -Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org> -Uploaders: Jerome Kieffer <jerome.kieffer@esrf.fr>, - Picca Frédéric-Emmanuel <picca@debian.org> -Section: science -Priority: extra -Build-Depends: cython, - cython-dbg, - cython3, - cython3-dbg, - libstdc++6-4.9-dbg, - libstdc++-4.9-dev, - libstdc++6, - debhelper (>=9.20150101+deb8u2), - dh-python, - python-all-dev, - python-all-dbg, - python-numpy, - python-numpy-dbg, - python-fabio, - python-fabio-dbg, - python-h5py, - python-h5py-dbg, - python-pyopencl, - python-pyopencl-dbg, - python-mako, - python-matplotlib, - python-matplotlib-dbg, - python-dateutil, - python-opengl, - python-pyqt5, - python-pyqt5-dbg, - python-pyqt5.qtsvg, - python-pyqt5.qtsvg-dbg, - python-pyqt5.qtopengl, - python-pyqt5.qtopengl-dbg, - python-scipy, - python-scipy-dbg, - python-sphinx, - python-sphinxcontrib.programoutput, - python-enum34, - python-concurrent.futures, - python3-all-dev, - python3-all-dbg, - python3-numpy, - python3-numpy-dbg, - python3-fabio, - python3-fabio-dbg, - python3-h5py, - python3-h5py-dbg, - python3-pyopencl, - python3-pyopencl-dbg, - python3-mako, - python3-matplotlib, - python3-matplotlib-dbg, - python3-dateutil, - python3-opengl, - python3-pyqt5, - python3-pyqt5-dbg, - python3-pyqt5.qtsvg, - python3-pyqt5.qtsvg-dbg, - python3-pyqt5.qtopengl, - python3-pyqt5.qtopengl-dbg, - python3-scipy, - python3-scipy-dbg, - python3-sphinx, - python3-sphinxcontrib.programoutput, - help2man, - devscripts -Standards-Version: 3.9.6 -Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/silx.git -Vcs-Git: git://anonscm.debian.org/debian-science/packages/silx.git -Homepage: https://github.com/silx-kit/silx -X-Python-Version: >= 2.7 -X-Python3-Version: >= 3.4 - -Package: silx -Architecture: all -Depends: ${misc:Depends}, - ${python:Depends}, - ${shlibs:Depends}, - python3-pkg-resources, - python3-silx (>= ${source:Version}) -Description: Toolbox for X-Ray data analysis - Executables - . - This uses the Python 3 version of the package. - -Package: python-silx -Architecture: any -Section: python -Depends: ${misc:Depends}, - ${python:Depends}, - ${shlibs:Depends}, - libstdc++6, - python-numpy, - python-fabio, - python-h5py, - python-pyopencl, - python-mako, - python-matplotlib, - python-dateutil, - python-opengl, - python-pyqt5, - python-pyqt5.qtsvg, - python-pyqt5.qtopengl, - python-scipy, - python-six, - python-enum34, - python-concurrent.futures, -# Recommends: -Suggests: python-rfoo -Description: Toolbox for X-Ray data analysis - Python2 library - . - This is the Python 2 version of the package. - -Package: python-silx-dbg -Architecture: any -Section: debug -Depends: ${misc:Depends}, - ${python:Depends}, - ${shlibs:Depends}, - python-silx (= ${binary:Version}), - libstdc++6-4.9-dbg, - python-dbg, - python-numpy-dbg, - python-fabio-dbg, - python-h5py-dbg, - python-pyopencl-dbg, - python-mako, - python-matplotlib-dbg, - python-dateutil, - python-opengl, - python-pyqt5-dbg, - python-pyqt5.qtsvg-dbg, - python-pyqt5.qtopengl-dbg, - python-scipy-dbg, - python-six, - python-enum34, - python-concurrent.futures, -Description: Toolbox for X-Ray data analysis - python2 debug - . - This package contains the extension built for the Python 2 debug - interpreter. - -Package: python3-silx -Architecture: any -Section: python -Depends: ${misc:Depends}, - ${python3:Depends}, - ${shlibs:Depends}, - libstdc++6, - python3-numpy, - python3-fabio, - python3-h5py, - python3-pyopencl, - python3-mako, - python3-matplotlib, - python3-dateutil, - python3-opengl, - python3-pyqt5, - python3-pyqt5.qtsvg, - python3-pyqt5.qtopengl, - python3-scipy, - python3-six, -# Recommends: -# Suggests: python3-rfoo -Description: Toolbox for X-Ray data analysis - Python3 - . - This is the Python 3 version of the package. - -Package: python3-silx-dbg -Architecture: any -Section: debug -Depends: ${misc:Depends}, - ${python3:Depends}, - ${shlibs:Depends}, - python3-silx (= ${binary:Version}), - libstdc++6-4.9-dbg, - python3-dbg, - python3-numpy-dbg, - python3-fabio-dbg, - python3-h5py-dbg, - python3-pyopencl-dbg, - python3-mako, - python3-matplotlib-dbg, - python3-dateutil, - python3-opengl, - python3-pyqt5-dbg, - python3-pyqt5.qtsvg-dbg, - python3-pyqt5.qtopengl-dbg, - python3-scipy-dbg, - python3-six, -Description: Toolbox for X-Ray data analysis - Python3 debug - . - This package contains the extension built for the Python 3 debug - interpreter. - -Package: python-silx-doc -Architecture: all -Section: doc -Depends: ${misc:Depends}, - ${sphinxdoc:Depends} -Description: Toolbox for X-Ray data analysis - Documentation - . - This is the common documentation package. diff --git a/package/debian8/rules b/package/debian8/rules deleted file mode 100755 index f72ed66..0000000 --- a/package/debian8/rules +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/make -f - -export PYBUILD_NAME=silx -export SPECFILE_USE_GNU_SOURCE=1 - -# Make does not offer a recursive wildcard function, so here's one: -rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2)) - -# How to recursively find all files with the same name in a given folder -ALL_PYX := $(call rwildcard,silx/,*.pyx) -#NOTA: No space before * - -%: - dh $@ --with python2,python3 --buildsystem=pybuild - -override_dh_clean: - dh_clean - # remove the cython generated file to force rebuild - rm -f $(patsubst %.pyx,%.cpp,${ALL_PYX}) - rm -f $(patsubst %.pyx,%.c,${ALL_PYX}) - rm -f $(patsubst %.pyx,%.html,${ALL_PYX}) - rm -rf build/html - rm -rf *.egg-info - -override_dh_auto_build: - dh_auto_build - python setup.py build build_man build_doc - -override_dh_install: - dh_numpy - dh_numpy3 - - # move the scripts to right package - dh_install -p silx debian/python3-silx/usr/bin/* usr/bin - dh_install -p silx package/desktop/*.desktop usr/share/applications - dh_install -p silx package/desktop/silx.png usr/share/icons/hicolor/48x48/apps - dh_install -p silx package/desktop/silx.svg usr/share/icons/hicolor/scalable/apps - dh_install -p silx package/desktop/silx.xml usr/share/mime/packages - rm -rf debian/python-silx/usr/bin - rm -rf debian/python3-silx/usr/bin - - # remove all py/pyc/egg-info files from dbg packages - find debian/python-silx-dbg/usr -type f \( -not -name "*.so" \) -delete - find debian/python3-silx-dbg/usr -type f \( -not -name "*.so" \) -delete - - dh_install - -override_dh_auto_test: - dh_auto_test -- -s custom --test-args="env PYTHONPATH={build_dir} WITH_QT_TEST=False {interpreter} run_tests.py -v" - -override_dh_installman: - dh_installman -p silx build/man/*.1 - -override_dh_installdocs: - dh_installdocs "build/sphinx/html" -p python-silx-doc - dh_installdocs diff --git a/package/debian8/watch b/package/debian8/watch deleted file mode 100644 index 8972716..0000000 --- a/package/debian8/watch +++ /dev/null @@ -1,5 +0,0 @@ -version=3 -opts=repacksuffix=+dfsg,\ -uversionmangle=s/(rc|a|b|c)/~$1/,\ -dversionmangle=s/\+dfsg// \ -http://pypi.debian.net/silx/silx-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) diff --git a/package/debian9/changelog b/package/debian9/changelog deleted file mode 100644 index 763d069..0000000 --- a/package/debian9/changelog +++ /dev/null @@ -1,22 +0,0 @@ -silx (0.3.0-1) unstable; urgency=low - - * debian/control - - Add missing dependencies - - Add -dbg packages - * Upstream version 0.4.0a - - -- Thomas Vincent <tvincent@edna-site.org> Mon, 23 Jan 2017 17:09:20 +0100 - -silx (0.1.0-1) unstable; urgency=low - - * debian/control - - Comment -dbg packages - * Upstream version 0.1.0 - - -- Thomas Vincent <thomas.vincent@esrf.fr> Thu, 14 Apr 2016 09:35:28 +0200 - -silx (0.0.0-1) unstable; urgency=low - - * Initial release (Closes: #??????) - - -- Jerome Kieffer <jerome.kieffer@esrf.fr> Tue, 15 Mar 2016 11:00:20 +0100 diff --git a/package/debian9/clean b/package/debian9/clean deleted file mode 100644 index 668a363..0000000 --- a/package/debian9/clean +++ /dev/null @@ -1 +0,0 @@ -*.egg-info/*
\ No newline at end of file diff --git a/package/debian9/compat b/package/debian9/compat deleted file mode 100644 index ec63514..0000000 --- a/package/debian9/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/package/debian9/control b/package/debian9/control deleted file mode 100644 index fee1b1a..0000000 --- a/package/debian9/control +++ /dev/null @@ -1,133 +0,0 @@ -Source: silx -Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org> -Uploaders: Jerome Kieffer <jerome.kieffer@esrf.fr>, - Picca Frédéric-Emmanuel <picca@debian.org> -Section: science -Priority: extra -Build-Depends: cython, - cython3, - libstdc++-4.9-dev|libstdc++6, - debhelper (>=9.20150101+deb8u2), - dh-python, - python-all-dev, - python-numpy, - python-fabio, - python-h5py, - python-pyopencl, - python-mako, - python-qtconsole, - python-matplotlib, - python-dateutil, - python-opengl, - python-pyqt5, - python-pyqt5.qtsvg, - python-pyqt5.qtopengl, - python-scipy, - python-sphinx, - python-sphinxcontrib.programoutput, - python-enum34, - python-concurrent.futures, - python3-all-dev, - python3-numpy, - python3-fabio, - python3-h5py, - python3-pyopencl, - python3-mako, - python3-qtconsole, - python3-matplotlib, - python3-dateutil, - python3-opengl, - python3-pyqt5, - python3-pyqt5.qtsvg, - python3-pyqt5.qtopengl, - python3-scipy, - python3-sphinx, - python3-sphinxcontrib.programoutput, - openstack-pkg-tools, - help2man, - locales, - devscripts -Standards-Version: 3.9.8 -Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/silx.git -Vcs-Git: git://anonscm.debian.org/debian-science/packages/silx.git -Homepage: https://github.com/silx-kit/silx -X-Python-Version: >= 2.7 -X-Python3-Version: >= 3.4 - -Package: silx -Architecture: all -Depends: ${misc:Depends}, - ${python:Depends}, - ${shlibs:Depends}, - python3-pkg-resources, - python3-silx (>= ${source:Version}) -Description: Toolbox for X-Ray data analysis - Executables - . - This uses the Python 3 version of the package. - -Package: python-silx -Architecture: any -Section: python -Depends: ${misc:Depends}, - ${python:Depends}, - ${shlibs:Depends}, - libstdc++6, - python-numpy, - python-fabio, - python-h5py, - python-pyopencl, - python-mako, - python-qtconsole, - python-matplotlib, - python-dateutil, - python-opengl, - python-pyqt5, - python-pyqt5.qtsvg, - python-pyqt5.qtopengl, - python-scipy, - python-six, - python-enum34, - python-concurrent.futures, -# Recommends: -Suggests: python-rfoo -Description: Toolbox for X-Ray data analysis - Python2 library - . - This is the Python 2 version of the package. - - -Package: python3-silx -Architecture: any -Section: python -Depends: ${misc:Depends}, - ${python3:Depends}, - ${shlibs:Depends}, - libstdc++6, - python3-numpy, - python3-fabio, - python3-h5py, - python3-pyopencl, - python3-mako, - python3-qtconsole, - python3-matplotlib, - python3-dateutil, - python3-opengl, - python3-pyqt5, - python3-pyqt5.qtsvg, - python3-pyqt5.qtopengl, - python3-scipy, - python3-six, -# Recommends: -# Suggests: python3-rfoo -Description: Toolbox for X-Ray data analysis - Python3 - . - This is the Python 3 version of the package. - - -Package: python-silx-doc -Architecture: all -Section: doc -Depends: ${misc:Depends}, - ${sphinxdoc:Depends} -Description: Toolbox for X-Ray data analysis - Documentation - . - This is the common documentation package. diff --git a/package/debian9/gbp.conf b/package/debian9/gbp.conf deleted file mode 100644 index f68d262..0000000 --- a/package/debian9/gbp.conf +++ /dev/null @@ -1,2 +0,0 @@ -[DEFAULT] -debian-branch = master
\ No newline at end of file diff --git a/package/debian9/python-silx-doc.doc-base b/package/debian9/python-silx-doc.doc-base deleted file mode 100644 index b290d8a..0000000 --- a/package/debian9/python-silx-doc.doc-base +++ /dev/null @@ -1,9 +0,0 @@ -Document: silx-manual -Title: silx documentation manual -Author: Jérôme Kieffer <jerome.kieffer@esrf.eu> -Abstract: Toolbox for X-Ray data analysis -Section: Science/Data Analysis - -Format: HTML -Index: /usr/share/doc/python-silx-doc/html/index.html -Files: /usr/share/doc/python-silx-doc/html/* diff --git a/package/debian9/rules b/package/debian9/rules deleted file mode 100755 index 160147b..0000000 --- a/package/debian9/rules +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/make -f - -export PYBUILD_NAME=silx -export SPECFILE_USE_GNU_SOURCE=1 - -# Make does not offer a recursive wildcard function, so here's one: -rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2)) - -# How to recursively find all files with the same name in a given folder -ALL_PYX := $(call rwildcard,silx/,*.pyx) -#NOTA: No space before * - -%: - dh $@ --with python2,python3 --buildsystem=pybuild - -override_dh_clean: - dh_clean - # remove the cython generated file to force rebuild - rm -f $(patsubst %.pyx,%.cpp,${ALL_PYX}) - rm -f $(patsubst %.pyx,%.c,${ALL_PYX}) - rm -f $(patsubst %.pyx,%.html,${ALL_PYX}) - rm -rf build/html - rm -rf *.egg-info - -override_dh_auto_build: - dh_auto_build - python setup.py build build_man build_doc - -override_dh_install: - dh_numpy - dh_numpy3 - - # move the scripts to right package - dh_install -p silx debian/python3-silx/usr/bin/* usr/bin - dh_install -p silx package/desktop/*.desktop usr/share/applications - dh_install -p silx package/desktop/silx.png usr/share/icons/hicolor/48x48/apps - dh_install -p silx package/desktop/silx.svg usr/share/icons/hicolor/scalable/apps - dh_install -p silx package/desktop/silx.xml usr/share/mime/packages - rm -rf debian/python-silx/usr/bin - rm -rf debian/python3-silx/usr/bin - - dh_install - -override_dh_auto_test: - dh_auto_test -- -s custom --test-args="env PYTHONPATH={build_dir} WITH_QT_TEST=False {interpreter} run_tests.py -v" - -override_dh_installman: - dh_installman -p silx build/man/*.1 - -override_dh_installdocs: - dh_installdocs "build/sphinx/html" -p python-silx-doc - dh_installdocs diff --git a/package/debian9/source/format b/package/debian9/source/format deleted file mode 100644 index 163aaf8..0000000 --- a/package/debian9/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/package/debian9/source/options b/package/debian9/source/options deleted file mode 100644 index 6e88e49..0000000 --- a/package/debian9/source/options +++ /dev/null @@ -1 +0,0 @@ -extend-diff-ignore="^[^/]+\.egg-info/"
\ No newline at end of file diff --git a/package/debian9/watch b/package/debian9/watch deleted file mode 100644 index 8972716..0000000 --- a/package/debian9/watch +++ /dev/null @@ -1,5 +0,0 @@ -version=3 -opts=repacksuffix=+dfsg,\ -uversionmangle=s/(rc|a|b|c)/~$1/,\ -dversionmangle=s/\+dfsg// \ -http://pypi.debian.net/silx/silx-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) diff --git a/package/windows/README.rst b/package/windows/README.rst index a7f3702..c263dce 100644 --- a/package/windows/README.rst +++ b/package/windows/README.rst @@ -4,20 +4,13 @@ Generate silx fat binary for Windows Pre-requisites
--------------
-- PyInstaller must be installed.
- It is best to use the development version to use package specific hooks up-to-date.
- Run either::
-
- pip install -r requirements-dev.txt
-
- or::
-
- pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip
-
+- `PyInstaller <https://pyinstaller.readthedocs.io/>`_ must be installed.
+ Run: ``pip install -r requirements-dev.txt``
+- `InnoSetup <https://jrsoftware.org/isinfo.php>`_ must be installed and in the ``PATH``.
- silx and all its dependencies must be INSTALLED::
pip install silx[full]
-
+
or from the source directory::
pip install .[full]
@@ -26,12 +19,20 @@ Pre-requisites Procedure
---------
-- Go to the `package/windows` folder in the source directory
-- Run `pyinstaller pyinstaller.spec`.
- This generates a fat binary in `package/windows/dist/silx/` for the generic launcher `silx.exe`.
-- Run `pyinstaller pyinstaller-silx-view.spec`.
- This generates a fat binary in `package/windows/dist/silx-view/` for the silx view command `silx-view.exe`.
-- Copy `silx-view.exe` and `silx-view.exe.manifest` to `package/windows/dist/silx/`.
- This is a hack until PyInstaller supports multiple executables (see https://github.com/pyinstaller/pyinstaller/issues/1527).
-- Zip `package\windows\dist\silx` to make the application available as a single zip file.
+- Go to the ``package/windows`` folder in the source directory
+- Run ``pyinstaller pyinstaller.spec``.
+ This will generates the fat binary in ``package/windows/dist/``.
+ It will then run InnoSetup to create the installer in ``package/windows/artifacts/``.
+
+
+Troubleshooting
+---------------
+
+In case of issues with anti-virus during the build process, try to re-install PyInstaller
+from source and rebuild the bootloader:
+```
+SET PYINSTALLER_COMPILE_BOOTLOADER=1
+SET PYINSTALLER_BOOTLOADER_WAF_ARGS=--msvc_target=x64
+pip install pyinstaller --no-binary pyinstaller
+```
\ No newline at end of file diff --git a/package/windows/bootstrap-silx-view.py b/package/windows/bootstrap-silx-view.py index f8da02d..e2f2513 100644 --- a/package/windows/bootstrap-silx-view.py +++ b/package/windows/bootstrap-silx-view.py @@ -1,5 +1,3 @@ -# coding: utf-8
-
import logging
logging.basicConfig()
@@ -9,4 +7,3 @@ from silx.app.view.main import main if __name__ == "__main__":
main(sys.argv)
-
diff --git a/package/windows/bootstrap.py b/package/windows/bootstrap.py index 3c6e887..f7a0155 100644 --- a/package/windows/bootstrap.py +++ b/package/windows/bootstrap.py @@ -1,5 +1,3 @@ -# coding: utf-8
-
import logging
logging.basicConfig()
@@ -13,4 +11,3 @@ from silx.__main__ import main if __name__ == "__main__":
main()
-
diff --git a/package/windows/create-installer.iss.template b/package/windows/create-installer.iss.template new file mode 100644 index 0000000..88c1a52 --- /dev/null +++ b/package/windows/create-installer.iss.template @@ -0,0 +1,92 @@ +[Setup]
+AppId={{A694A78C-B4D1-4983-8BC6-A84D30341EB4}
+AppName=silx view
+AppVersion=#Version
+AppVerName=silx-view-#Version
+AppPublisher=ESRF
+AppPublisherURL=https://www.silx.org
+AppSupportURL=https://github.com/silx-kit/silx
+AppUpdatesURL=https://github.com/silx-kit/silx/releases
+DefaultDirName={autopf}\silx
+DefaultGroupName=silx
+LicenseFile=LICENSE
+OutputDir=artifacts
+OutputBaseFilename=silx-#Version-windows-installer-x86_64
+Compression=lzma
+SolidCompression=yes
+ArchitecturesAllowed=x64
+ArchitecturesInstallIn64BitMode=x64
+WizardStyle=modern
+
+[Languages]
+Name: "english"; MessagesFile: "compiler:Default.isl"
+
+[Files]
+Source: "dist\silx\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
+Source: "silx.ico"; DestDir: "{app}"
+
+[Icons]
+Name: "{group}\silx"; Filename: "{app}\silx-view.exe"; IconFilename: "{app}\silx.ico"
+Name: "{group}\Uninstall"; Filename: "{uninstallexe}"
+
+// Code from https://stackoverflow.com/questions/2000296/inno-setup-how-to-automatically-uninstall-previous-installed-version/2099805#209980
+[Code]
+
+/////////////////////////////////////////////////////////////////////
+function GetUninstallString(): String;
+var
+ sUnInstPath: String;
+ sUnInstallString: String;
+begin
+ sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting("AppId")}_is1');
+ sUnInstallString := '';
+ if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then
+ RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString);
+ Result := sUnInstallString;
+end;
+
+
+/////////////////////////////////////////////////////////////////////
+function IsUpgrade(): Boolean;
+begin
+ Result := (GetUninstallString() <> '');
+end;
+
+
+/////////////////////////////////////////////////////////////////////
+function UnInstallOldVersion(): Integer;
+var
+ sUnInstallString: String;
+ iResultCode: Integer;
+begin
+ // Return Values:
+ // 1 - uninstall string is empty
+ // 2 - error executing the UnInstallString
+ // 3 - successfully executed the UnInstallString
+
+ // default return value
+ Result := 0;
+
+ // get the uninstall string of the old app
+ sUnInstallString := GetUninstallString();
+ if sUnInstallString <> '' then begin
+ sUnInstallString := RemoveQuotes(sUnInstallString);
+ if Exec(sUnInstallString, '/VERYSILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then
+ Result := 3
+ else
+ Result := 2;
+ end else
+ Result := 1;
+end;
+
+/////////////////////////////////////////////////////////////////////
+procedure CurStepChanged(CurStep: TSetupStep);
+begin
+ if (CurStep=ssInstall) then
+ begin
+ if (IsUpgrade()) then
+ begin
+ UnInstallOldVersion();
+ end;
+ end;
+end;
diff --git a/package/windows/pyinstaller-silx-view.spec b/package/windows/pyinstaller-silx-view.spec deleted file mode 100644 index 6f36128..0000000 --- a/package/windows/pyinstaller-silx-view.spec +++ /dev/null @@ -1,54 +0,0 @@ -# -*- mode: python -*-
-import os.path
-from PyInstaller.utils.hooks import collect_data_files
-
-datas = []
-
-PROJECT_PATH = os.path.abspath(os.path.join(SPECPATH, "..", ".."))
-datas.append((os.path.join(PROJECT_PATH, "README.rst"), "."))
-datas.append((os.path.join(PROJECT_PATH, "LICENSE"), "."))
-datas.append((os.path.join(PROJECT_PATH, "copyright"), "."))
-
-
-datas += collect_data_files("silx.resources")
-
-
-block_cipher = None
-
-
-a = Analysis(['bootstrap-silx-view.py'],
- pathex=[],
- binaries=[],
- datas=datas,
- hiddenimports=[],
- hookspath=[],
- runtime_hooks=[],
- excludes=[],
- win_no_prefer_redirects=False,
- win_private_assemblies=False,
- cipher=block_cipher,
- noarchive=False)
-
-pyz = PYZ(a.pure,
- a.zipped_data,
- cipher=block_cipher)
-
-exe = EXE(pyz,
- a.scripts,
- [],
- exclude_binaries=True,
- name='silx-view',
- debug=False,
- bootloader_ignore_signals=False,
- strip=False,
- upx=False,
- console=False,
- icon='silx.ico')
-
-coll = COLLECT(exe,
- a.binaries,
- a.zipfiles,
- a.datas,
- strip=False,
- upx=False,
- name='silx-view')
diff --git a/package/windows/pyinstaller.spec b/package/windows/pyinstaller.spec index 74d6a0f..bff8a9f 100644 --- a/package/windows/pyinstaller.spec +++ b/package/windows/pyinstaller.spec @@ -1,54 +1,155 @@ # -*- mode: python -*-
+import importlib.metadata
import os.path
-from PyInstaller.utils.hooks import collect_data_files
+from pathlib import Path
+import shutil
+import subprocess
+import sys
+
+from PyInstaller.utils.hooks import collect_data_files, collect_submodules
+
datas = []
+
PROJECT_PATH = os.path.abspath(os.path.join(SPECPATH, "..", ".."))
datas.append((os.path.join(PROJECT_PATH, "README.rst"), "."))
datas.append((os.path.join(PROJECT_PATH, "LICENSE"), "."))
datas.append((os.path.join(PROJECT_PATH, "copyright"), "."))
+datas += collect_data_files("silx.resources")
-datas += collect_data_files("silx.resources")
+hiddenimports = ["hdf5plugin"]
+hiddenimports += collect_submodules("fabio")
block_cipher = None
-a = Analysis(['bootstrap.py'],
- pathex=[],
- binaries=[],
- datas=datas,
- hiddenimports=[],
- hookspath=[],
- runtime_hooks=[],
- excludes=[],
- win_no_prefer_redirects=False,
- win_private_assemblies=False,
- cipher=block_cipher,
- noarchive=False)
-
-pyz = PYZ(a.pure,
- a.zipped_data,
- cipher=block_cipher)
-
-exe = EXE(pyz,
- a.scripts,
- [],
- exclude_binaries=True,
- name='silx',
- debug=False,
- bootloader_ignore_signals=False,
- strip=False,
- upx=False,
- console=True,
- icon='silx.ico')
-
-coll = COLLECT(exe,
- a.binaries,
- a.zipfiles,
- a.datas,
- strip=False,
- upx=False,
- name='silx')
+silx_a = Analysis(
+ ["bootstrap.py"],
+ pathex=[],
+ binaries=[],
+ datas=datas,
+ hiddenimports=hiddenimports,
+ hookspath=[],
+ runtime_hooks=[],
+ excludes=[],
+ cipher=block_cipher,
+ noarchive=False,
+)
+
+
+silx_pyz = PYZ(silx_a.pure, silx_a.zipped_data, cipher=block_cipher)
+
+
+silx_exe = EXE(
+ silx_pyz,
+ silx_a.scripts,
+ silx_a.dependencies,
+ [],
+ exclude_binaries=True,
+ name="silx",
+ debug=False,
+ bootloader_ignore_signals=False,
+ strip=False,
+ upx=False,
+ console=True,
+ icon="silx.ico",
+)
+
+
+silx_view_a = Analysis(
+ ["bootstrap-silx-view.py"],
+ pathex=[],
+ binaries=[],
+ datas=datas,
+ hiddenimports=hiddenimports,
+ hookspath=[],
+ runtime_hooks=[],
+ excludes=[],
+ cipher=block_cipher,
+ noarchive=False,
+)
+
+
+silx_view_pyz = PYZ(silx_view_a.pure, silx_view_a.zipped_data, cipher=block_cipher)
+
+
+silx_view_exe = EXE(
+ silx_view_pyz,
+ silx_view_a.scripts,
+ silx_view_a.dependencies,
+ [],
+ exclude_binaries=True,
+ name="silx-view",
+ debug=False,
+ bootloader_ignore_signals=False,
+ strip=False,
+ upx=False,
+ console=False,
+ icon="silx.ico",
+)
+
+
+silx_coll = COLLECT(
+ silx_view_exe,
+ silx_view_a.binaries,
+ silx_view_a.zipfiles,
+ silx_view_a.datas,
+ silx_exe,
+ silx_a.binaries,
+ silx_a.zipfiles,
+ silx_a.datas,
+ strip=False,
+ upx=False,
+ name="silx",
+)
+
+
+# Generate license file from current Python env
+def create_license_file(filename: str):
+ import PyQt5.QtCore
+
+ with open(filename, "w") as f:
+ f.write(
+ f"""
+This is free software.
+
+This distribution of silx is provided under the
+GNU General Public License v3 (https://www.gnu.org/licenses/gpl-3.0.en.html) since it includes PyQt5.
+
+It includes mainy software packages with different licenses:
+
+- Python ({sys.version}): PSF license, https://www.python.org/
+- Qt ({PyQt5.QtCore.qVersion()}): GNU Lesser General Public License v3, https://www.qt.io/
+"""
+ )
+
+ for dist in sorted(
+ importlib.metadata.distributions(), key=lambda d: d.name.lower()
+ ):
+ license = dist.metadata.get("License")
+ homepage = dist.metadata.get("Home-page")
+ info = ", ".join(info for info in (license, homepage) if info)
+ f.write(f"- {dist.name} ({dist.version}): {info}\n")
+
+
+create_license_file("LICENSE")
+
+
+# Run innosetup
+def innosetup():
+ from silx import strictversion
+
+ config_name = "create-installer.iss"
+ with open(config_name + ".template") as f:
+ content = f.read().replace("#Version", strictversion)
+ with open(config_name, "w") as f:
+ f.write(content)
+
+ subprocess.call(["iscc", os.path.join(SPECPATH, config_name)])
+ os.remove(config_name)
+
+
+innosetup()
|