Skip to content

Commit 8dc1845

Browse files
authored
Merge pull request #103 from kif/debian13
Debian13 packaging helper
2 parents 33c0ae2 + 402ea0d commit 8dc1845

File tree

12 files changed

+144
-7
lines changed

12 files changed

+144
-7
lines changed

build-deb.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ then
6565
bookworm)
6666
debian_version=12
6767
;;
68+
trixie)
69+
debian_version=13
70+
;;
6871
esac
6972
fi
7073

package/debian13/changelog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
freesas (0.7.0-1) unstable; urgency=low
2+
3+
* Initial release (Closes: #??????)
4+
5+
-- Jerome Kieffer <[email protected]> Fri, 31 Aug 2017 11:00:20 +0100

package/debian13/clean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.egg-info/*

package/debian13/compat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10

package/debian13/control

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
Source: freesas
2+
Maintainer: Debian Science Maintainers <[email protected]>
3+
Uploaders: Jerome Kieffer <[email protected]>,
4+
Picca Frédéric-Emmanuel <[email protected]>
5+
Section: science
6+
Priority: extra
7+
Build-Depends: cython3,
8+
debhelper,
9+
dh-python,
10+
devscripts,
11+
python3-tomli,
12+
python3-mesonpy,
13+
python3-all-dev,
14+
python3-numpy,
15+
python3-matplotlib,
16+
python3-scipy,
17+
python3-sphinx,
18+
python3-nbsphinx,
19+
python3-sphinxcontrib.programoutput,
20+
python3-sphinx-rtd-theme,
21+
python3-silx,
22+
python3-pyfai,
23+
openstack-pkg-tools,
24+
help2man
25+
Standards-Version: 3.9.8
26+
Vcs-Browser: https://anonscm.debian.org/cgit/debian-science/packages/freesas.git
27+
Vcs-Git: git://anonscm.debian.org/debian-science/packages/freesas.git
28+
Homepage: https://github.com/kif/freesas
29+
X-Python3-Version: >= 3.7
30+
31+
Package: freesas
32+
Architecture: all
33+
Depends: ${misc:Depends},
34+
${python:Depends},
35+
${shlibs:Depends},
36+
python3-pkg-resources,
37+
python3-freesas (>= ${source:Version})
38+
Description: Free tools for small angle scattering analysis - Executables
39+
.
40+
This uses the Python 3 version of the package.
41+
42+
43+
Package: python3-freesas
44+
Architecture: any
45+
Section: python
46+
Depends: ${misc:Depends},
47+
${python3:Depends},
48+
${shlibs:Depends},
49+
python3-numpy,
50+
python3-matplotlib,
51+
python3-scipy,
52+
python3-six,
53+
python3-pyfai
54+
# Recommends:
55+
# Suggests: python3-rfoo
56+
Description: Free tools for small angle scattering analysis - Python3
57+
.
58+
This is the Python 3 version of the package.
59+
60+
61+
Package: freesas-doc
62+
Architecture: all
63+
Section: doc
64+
Depends: ${misc:Depends},
65+
${sphinxdoc:Depends}
66+
Description: Free tools for small angle scattering analysis - Documentation
67+
.
68+
This is the common documentation package.

package/debian13/gbp.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[DEFAULT]
2+
debian-branch = master
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Document: freesas-manual
2+
Title: freesas documentation manual
3+
Author: Jérôme Kieffer <[email protected]>
4+
Abstract: Toolbox for X-Ray data analysis
5+
Section: Science/Data Analysis
6+
7+
Format: HTML
8+
Index: /usr/share/doc/python-freesas-doc/html/index.html
9+
Files: /usr/share/doc/python-freesas-doc/html/*

package/debian13/rules

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/make -f
2+
3+
export DH_VERBOSE=1
4+
export PYBUILD_NAME=freesas
5+
export PYBUILD_SYSTEM=pyproject
6+
7+
# Make does not offer a recursive wildcard function, so here's one:
8+
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
9+
10+
# How to recursively find all files with the same name in a given folder
11+
ALL_PYX := $(call rwildcard,src,*.pyx)
12+
#NOTA: No space before *
13+
14+
%:
15+
dh $@ --with python3,sphinxdoc --buildsystem=pybuild
16+
17+
override_dh_clean:
18+
dh_clean
19+
# remove the cython generated file to force rebuild
20+
rm -f $(patsubst %.pyx,%.cpp,${ALL_PYX})
21+
rm -f $(patsubst %.pyx,%.c,${ALL_PYX})
22+
rm -f $(patsubst %.pyx,%.html,${ALL_PYX})
23+
rm -rf build/html
24+
rm -rf build/man
25+
rm -rf *.egg-info
26+
27+
override_dh_install:
28+
dh_numpy3
29+
30+
# move the scripts to right package
31+
dh_install -p freesas debian/python3-freesas/usr/bin/* usr/bin
32+
rm -rf debian/python3-freesas/usr/bin
33+
dh_install
34+
35+
override_dh_auto_test:
36+
dh_auto_test -- -s custom --test-args="env PYTHONPATH={build_dir} FREESAS_TESTDATA=../testdata {interpreter} run_tests.py -v"
37+
38+
override_dh_installdocs:
39+
python3 build-doc.py
40+
dh_installdocs "build/sphinx" -p freesas-doc
41+
dh_installdocs

package/debian13/source/format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0 (quilt)

package/debian13/source/options

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extend-diff-ignore="^[^/]+\.egg-info/"

package/debian13/watch

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
version=3
2+
opts=repacksuffix=+dfsg,\
3+
uversionmangle=s/(rc|a|b|c)/~$1/,\
4+
dversionmangle=s/\+dfsg// \
5+
http://pypi.debian.net/freesas/freesas-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))

src/freesas/transformations.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
3131
# POSSIBILITY OF SUCH DAMAGE.
3232

33-
"""Homogeneous Transformation Matrices and Quaternions.
33+
r"""Homogeneous Transformation Matrices and Quaternions.
3434
3535
A library for calculating 4x4 matrices for translating, rotating, reflecting,
3636
scaling, shearing, projecting, orthogonalizing, and superimposing arrays of
@@ -64,8 +64,8 @@
6464
6565
Matrices (M) can be inverted using numpy.linalg.inv(M), be concatenated using
6666
numpy.dot(M0, M1), or transform homogeneous coordinate arrays (v) using
67-
numpy.dot(M, v) for shape (4, \*) column vectors, respectively
68-
numpy.dot(v, M.T) for shape (\*, 4) row vectors ("array of points").
67+
numpy.dot(M, v) for shape (4, *) column vectors, respectively
68+
numpy.dot(v, M.T) for shape (*, 4) row vectors ("array of points").
6969
7070
This module follows the "column vectors on the right" and "row major storage"
7171
(C contiguous) conventions. The translation components are in the right column
@@ -887,9 +887,9 @@ def orthogonalization_matrix(lengths, angles):
887887

888888

889889
def affine_matrix_from_points(v0, v1, shear=True, scale=True, usesvd=True):
890-
"""Return affine transform matrix to register two point sets.
890+
r"""Return affine transform matrix to register two point sets.
891891
892-
v0 and v1 are shape (ndims, \*) arrays of at least ndims non-homogeneous
892+
v0 and v1 are shape (ndims, *) arrays of at least ndims non-homogeneous
893893
coordinates, where ndims is the dimensionality of the coordinate space.
894894
895895
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):
996996

997997

998998
def superimposition_matrix(v0, v1, scale=False, usesvd=True):
999-
"""Return matrix to transform given 3D point set into second point set.
999+
r"""Return matrix to transform given 3D point set into second point set.
10001000
1001-
v0 and v1 are shape (3, \*) or (4, \*) arrays of at least 3 points.
1001+
v0 and v1 are shape (3, *) or (4, *) arrays of at least 3 points.
10021002
10031003
The parameters scale and usesvd are explained in the more general
10041004
affine_matrix_from_points function.

0 commit comments

Comments
 (0)