Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ then
bookworm)
debian_version=12
;;
trixie)
debian_version=13
;;
esac
fi

Expand Down
5 changes: 5 additions & 0 deletions package/debian13/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
freesas (0.7.0-1) unstable; urgency=low

* Initial release (Closes: #??????)

-- Jerome Kieffer <jerome.kieffer@esrf.fr> Fri, 31 Aug 2017 11:00:20 +0100
1 change: 1 addition & 0 deletions package/debian13/clean
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.egg-info/*
1 change: 1 addition & 0 deletions package/debian13/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10
68 changes: 68 additions & 0 deletions package/debian13/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
Source: freesas
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: 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.
2 changes: 2 additions & 0 deletions package/debian13/gbp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[DEFAULT]
debian-branch = master
9 changes: 9 additions & 0 deletions package/debian13/python-freesas-doc.doc-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Document: freesas-manual
Title: freesas 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-freesas-doc/html/index.html
Files: /usr/share/doc/python-freesas-doc/html/*
41 changes: 41 additions & 0 deletions package/debian13/rules
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions package/debian13/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
1 change: 1 addition & 0 deletions package/debian13/source/options
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extend-diff-ignore="^[^/]+\.egg-info/"
5 changes: 5 additions & 0 deletions package/debian13/watch
Original file line number Diff line number Diff line change
@@ -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)))
14 changes: 7 additions & 7 deletions src/freesas/transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
Loading