diff --git a/build-deb.sh b/build-deb.sh index e2d8a8a..fa9de38 100755 --- a/build-deb.sh +++ b/build-deb.sh @@ -65,6 +65,9 @@ then bookworm) debian_version=12 ;; + trixie) + debian_version=13 + ;; esac fi diff --git a/package/debian13/changelog b/package/debian13/changelog new file mode 100644 index 0000000..9c0d0d7 --- /dev/null +++ b/package/debian13/changelog @@ -0,0 +1,5 @@ +freesas (0.7.0-1) unstable; urgency=low + + * Initial release (Closes: #??????) + + -- Jerome Kieffer Fri, 31 Aug 2017 11:00:20 +0100 diff --git a/package/debian13/clean b/package/debian13/clean new file mode 100644 index 0000000..668a363 --- /dev/null +++ b/package/debian13/clean @@ -0,0 +1 @@ +*.egg-info/* \ No newline at end of file diff --git a/package/debian13/compat b/package/debian13/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/package/debian13/compat @@ -0,0 +1 @@ +10 diff --git a/package/debian13/control b/package/debian13/control new file mode 100644 index 0000000..5eab425 --- /dev/null +++ b/package/debian13/control @@ -0,0 +1,68 @@ +Source: freesas +Maintainer: Debian Science Maintainers +Uploaders: Jerome Kieffer , + Picca Frédéric-Emmanuel +Section: science +Priority: extra +Build-Depends: cython3, + debhelper, + dh-python, + devscripts, + python3-tomli, + python3-mesonpy, + python3-all-dev, + python3-numpy, + python3-matplotlib, + python3-scipy, + python3-sphinx, + python3-nbsphinx, + python3-sphinxcontrib.programoutput, + python3-sphinx-rtd-theme, + python3-silx, + python3-pyfai, + openstack-pkg-tools, + help2man +Standards-Version: 3.9.8 +Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/freesas.git +Vcs-Git: git://anonscm.debian.org/debian-science/packages/freesas.git +Homepage: https://github.com/kif/freesas +X-Python3-Version: >= 3.7 + +Package: freesas +Architecture: all +Depends: ${misc:Depends}, + ${python:Depends}, + ${shlibs:Depends}, + python3-pkg-resources, + python3-freesas (>= ${source:Version}) +Description: Free tools for small angle scattering analysis - Executables + . + This uses the Python 3 version of the package. + + +Package: python3-freesas +Architecture: any +Section: python +Depends: ${misc:Depends}, + ${python3:Depends}, + ${shlibs:Depends}, + python3-numpy, + python3-matplotlib, + python3-scipy, + python3-six, + python3-pyfai +# Recommends: +# Suggests: python3-rfoo +Description: Free tools for small angle scattering analysis - Python3 + . + This is the Python 3 version of the package. + + +Package: freesas-doc +Architecture: all +Section: doc +Depends: ${misc:Depends}, + ${sphinxdoc:Depends} +Description: Free tools for small angle scattering analysis - Documentation + . + This is the common documentation package. diff --git a/package/debian13/gbp.conf b/package/debian13/gbp.conf new file mode 100644 index 0000000..f68d262 --- /dev/null +++ b/package/debian13/gbp.conf @@ -0,0 +1,2 @@ +[DEFAULT] +debian-branch = master \ No newline at end of file diff --git a/package/debian13/python-freesas-doc.doc-base b/package/debian13/python-freesas-doc.doc-base new file mode 100644 index 0000000..b77cb80 --- /dev/null +++ b/package/debian13/python-freesas-doc.doc-base @@ -0,0 +1,9 @@ +Document: freesas-manual +Title: freesas documentation manual +Author: Jérôme Kieffer +Abstract: Toolbox for X-Ray data analysis +Section: Science/Data Analysis + +Format: HTML +Index: /usr/share/doc/python-freesas-doc/html/index.html +Files: /usr/share/doc/python-freesas-doc/html/* diff --git a/package/debian13/rules b/package/debian13/rules new file mode 100755 index 0000000..ad49325 --- /dev/null +++ b/package/debian13/rules @@ -0,0 +1,41 @@ +#!/usr/bin/make -f + +export DH_VERBOSE=1 +export PYBUILD_NAME=freesas +export PYBUILD_SYSTEM=pyproject + +# 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,src,*.pyx) +#NOTA: No space before * + +%: + 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 build/html + rm -rf build/man + rm -rf *.egg-info + +override_dh_install: + dh_numpy3 + + # move the scripts to right package + dh_install -p freesas debian/python3-freesas/usr/bin/* usr/bin + rm -rf debian/python3-freesas/usr/bin + dh_install + +override_dh_auto_test: + dh_auto_test -- -s custom --test-args="env PYTHONPATH={build_dir} FREESAS_TESTDATA=../testdata {interpreter} run_tests.py -v" + +override_dh_installdocs: + python3 build-doc.py + dh_installdocs "build/sphinx" -p freesas-doc + dh_installdocs diff --git a/package/debian13/source/format b/package/debian13/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/package/debian13/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/package/debian13/source/options b/package/debian13/source/options new file mode 100644 index 0000000..6e88e49 --- /dev/null +++ b/package/debian13/source/options @@ -0,0 +1 @@ +extend-diff-ignore="^[^/]+\.egg-info/" \ No newline at end of file diff --git a/package/debian13/watch b/package/debian13/watch new file mode 100644 index 0000000..8f43589 --- /dev/null +++ b/package/debian13/watch @@ -0,0 +1,5 @@ +version=3 +opts=repacksuffix=+dfsg,\ +uversionmangle=s/(rc|a|b|c)/~$1/,\ +dversionmangle=s/\+dfsg// \ +http://pypi.debian.net/freesas/freesas-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz))) diff --git a/src/freesas/transformations.py b/src/freesas/transformations.py index 7eea6a0..9650b85 100644 --- a/src/freesas/transformations.py +++ b/src/freesas/transformations.py @@ -30,7 +30,7 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -"""Homogeneous Transformation Matrices and Quaternions. +r"""Homogeneous Transformation Matrices and Quaternions. A library for calculating 4x4 matrices for translating, rotating, reflecting, scaling, shearing, projecting, orthogonalizing, and superimposing arrays of @@ -64,8 +64,8 @@ Matrices (M) can be inverted using numpy.linalg.inv(M), be concatenated using numpy.dot(M0, M1), or transform homogeneous coordinate arrays (v) using -numpy.dot(M, v) for shape (4, \*) column vectors, respectively -numpy.dot(v, M.T) for shape (\*, 4) row vectors ("array of points"). +numpy.dot(M, v) for shape (4, *) column vectors, respectively +numpy.dot(v, M.T) for shape (*, 4) row vectors ("array of points"). This module follows the "column vectors on the right" and "row major storage" (C contiguous) conventions. The translation components are in the right column @@ -887,9 +887,9 @@ def orthogonalization_matrix(lengths, angles): def affine_matrix_from_points(v0, v1, shear=True, scale=True, usesvd=True): - """Return affine transform matrix to register two point sets. + r"""Return affine transform matrix to register two point sets. - v0 and v1 are shape (ndims, \*) arrays of at least ndims non-homogeneous + v0 and v1 are shape (ndims, *) arrays of at least ndims non-homogeneous coordinates, where ndims is the dimensionality of the coordinate space. If shear is False, a similarity transformation matrix is returned. @@ -996,9 +996,9 @@ def affine_matrix_from_points(v0, v1, shear=True, scale=True, usesvd=True): def superimposition_matrix(v0, v1, scale=False, usesvd=True): - """Return matrix to transform given 3D point set into second point set. + r"""Return matrix to transform given 3D point set into second point set. - v0 and v1 are shape (3, \*) or (4, \*) arrays of at least 3 points. + v0 and v1 are shape (3, *) or (4, *) arrays of at least 3 points. The parameters scale and usesvd are explained in the more general affine_matrix_from_points function.