-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
208 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
# Project: FreeSaS | ||
# https://github.com/kif/freesas | ||
# | ||
# Copyright (C) 2015-2020 European Synchrotron Radiation Facility, Grenoble, France | ||
# Copyright (C) 2015-2023 European Synchrotron Radiation Facility, Grenoble, France | ||
# | ||
# Principal author: Jérôme Kieffer ([email protected]) | ||
# | ||
|
@@ -56,12 +56,15 @@ then | |
stretch) | ||
debian_version=9 | ||
;; | ||
buster) | ||
buster) | ||
debian_version=10 | ||
;; | ||
bullseye) | ||
debian_version=11 | ||
;; | ||
bookworm) | ||
debian_version=12 | ||
;; | ||
esac | ||
fi | ||
|
||
|
@@ -78,21 +81,25 @@ build_directory=${project_directory}/build/${target_system} | |
if [ -d /usr/lib/ccache ]; | ||
then | ||
export PATH=/usr/lib/ccache:$PATH | ||
export CCACHE_DIR=${HOME}/.ccache | ||
fi | ||
|
||
usage="usage: $(basename "$0") [options] | ||
Build the Debian ${debian_version} package of the ${project} library. | ||
If the build succeed the directory dist/debian${debian_version} will | ||
contains the packages. | ||
optional arguments: | ||
--help Show this help text | ||
--install Install the packages generated at the end of | ||
the process using 'sudo dpkg' | ||
--stdeb-py3 Build using stdeb for python3 | ||
--stdeb-py2.py3 Build using stdeb for python2 and python3 | ||
--debian9 Simulate a debian 9 Stretch system | ||
--debian10 Simulate a debian 10 Buster system | ||
--debian11 Simulate a debian 11 Bullseye system | ||
--debian12 Simulate a debian 12 Bookworm system | ||
" | ||
|
||
install=0 | ||
|
@@ -141,6 +148,13 @@ do | |
build_directory=${project_directory}/build/${target_system} | ||
shift | ||
;; | ||
--debian12) | ||
debian_version=12 | ||
target_system=debian${debian_version} | ||
dist_directory=${project_directory}/dist/${target_system} | ||
build_directory=${project_directory}/build/${target_system} | ||
shift | ||
;; | ||
-*) | ||
echo "Error: Unknown option: $1" >&2 | ||
echo "$usage" | ||
|
@@ -164,20 +178,27 @@ clean_up() | |
build_deb() { | ||
tarname=${project}_${debianversion}.orig.tar.gz | ||
clean_up | ||
python3 setup.py debian_src | ||
python3 setup.py testdata | ||
if [ $debian_version -le 11 ] | ||
then | ||
python3 setup.py debian_src | ||
directory=${project}-${strictversion} | ||
else | ||
python3 -m build -s | ||
ln -s ${source_project}-${strictversion}.tar.gz dist/${tarname} | ||
directory=${source_project}-${strictversion} | ||
fi | ||
cp -f dist/${tarname} ${build_directory} | ||
if [ -f dist/${project}-testimages.tar.gz ] | ||
then | ||
cp -f dist/${project}-testimages.tar.gz ${build_directory} | ||
fi | ||
|
||
cd ${build_directory} | ||
tar -xzf ${tarname} | ||
directory=${project}-${strictversion} | ||
|
||
|
||
newname=${deb_name}_${debianversion}.orig.tar.gz | ||
|
||
#echo tarname $tarname newname $newname | ||
if [ $tarname != $newname ] | ||
then | ||
|
@@ -187,19 +208,19 @@ build_deb() { | |
fi | ||
ln -s ${tarname} ${newname} | ||
fi | ||
|
||
if [ -f ${project}-testimages.tar.gz ] | ||
then | ||
if [ ! -h ${deb_name}_${debianversion}.orig-testimages.tar.gz ] | ||
then | ||
ln -s ${project}-testimages.tar.gz ${deb_name}_${debianversion}.orig-testimages.tar.gz | ||
fi | ||
fi | ||
|
||
cd ${directory} | ||
cp -r ${project_directory}/package/${target_system} debian | ||
cp ${project_directory}/copyright debian | ||
|
||
#handle test images | ||
if [ -f ../${deb_name}_${debianversion}.orig-testimages.tar.gz ] | ||
then | ||
|
@@ -208,7 +229,7 @@ build_deb() { | |
mkdir testimages | ||
fi | ||
cd testimages | ||
tar -xzf ../../${deb_name}_${debianversion}.orig-testimages.tar.gz | ||
tar -xzf ../${deb_name}_${debianversion}.orig-testimages.tar.gz | ||
cd .. | ||
else | ||
# Disable to skip tests during build | ||
|
@@ -230,12 +251,12 @@ build_deb() { | |
;; | ||
esac | ||
|
||
dch --force-distribution -v ${debianversion}-1 "upstream development build of ${project} ${version}" | ||
dch --force-distribution -v ${debianversion}-1 "upstream development build of ${project} ${version}" | ||
dch --force-distribution -D ${debian_name}-backports -l~bpo${debian_version}+ "${project} snapshot ${version} built for ${target_system}" | ||
#dch --bpo "${project} snapshot ${version} built for ${target_system}" | ||
dpkg-buildpackage -r | ||
rc=$? | ||
|
||
if [ $rc -eq 0 ]; then | ||
# move packages to dist directory | ||
echo Build succeeded... | ||
|
@@ -264,7 +285,8 @@ build_stdeb () { | |
tar -xzf ${tarname} | ||
cd ${project}-${strictversion} | ||
|
||
if [ $stdeb_all_python -eq 1 ]; then | ||
if [ $stdeb_all_python -eq 1 ] | ||
then | ||
echo Using Python 2+3 | ||
python3 setup.py --command-packages=stdeb.command sdist_dsc --with-python2=True --with-python3=True --no-python3-scripts=True build --no-cython bdist_deb | ||
rc=$? | ||
|
@@ -293,7 +315,7 @@ fi | |
|
||
|
||
if [ $install -eq 1 ]; then | ||
sudo -- su -c "dpkg -i ${dist_directory}/*.deb" | ||
sudo su -c "dpkg -i ${dist_directory}/*.deb" | ||
fi | ||
|
||
exit "$rc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env python3 | ||
import os | ||
import sys | ||
import logging | ||
import bootstrap | ||
from sphinx.cmd.build import main | ||
logger = logging.getLogger(__name__) | ||
PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) | ||
PROJECT_NAME = bootstrap.get_project_name(PROJECT_DIR) | ||
logger.info("Project name: %s", PROJECT_NAME) | ||
LIBPATH = bootstrap.build_project(PROJECT_NAME, PROJECT_DIR) | ||
if __name__ == '__main__': | ||
sys.path.insert(0, LIBPATH) | ||
os.environ["PYTHONPATH"]=os.pathsep.join(sys.path) | ||
print(os.environ["PYTHONPATH"]) | ||
dest_dir = os.path.join(PROJECT_DIR, "build", "sphinx") | ||
if not os.path.isdir(dest_dir): | ||
os.makedirs(dest_dir) | ||
argv = ["-b", "html", | ||
os.path.join(PROJECT_DIR,"doc","source"), | ||
dest_dir ] | ||
print(f"run sphinx with those arguments {argv}") | ||
sys.exit(main(argv)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 <[email protected]> Fri, 31 Aug 2017 11:00:20 +0100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.egg-info/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
Source: freesas | ||
Maintainer: Debian Science Maintainers <[email protected]> | ||
Uploaders: Jerome Kieffer <[email protected]>, | ||
Picca Frédéric-Emmanuel <[email protected]> | ||
Section: science | ||
Priority: extra | ||
Build-Depends: cython3, | ||
debhelper (>=9.20150101+deb8u2), | ||
python3-all-dev, | ||
python3-setuptools, | ||
python3-numpy, | ||
python3-matplotlib, | ||
python3-scipy, | ||
python3-sphinx, | ||
python3-sphinxcontrib.programoutput, | ||
python3-nbsphinx, | ||
python3-silx, | ||
python3-pyfai, | ||
openstack-pkg-tools, | ||
help2man, | ||
dh-python, | ||
python3-sphinx-rtd-theme | ||
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.6 | ||
|
||
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: python-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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[DEFAULT] | ||
debian-branch = master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 <[email protected]> | ||
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/* |
Oops, something went wrong.