note: les numéros de version des paquets locaux sont faits à partir de la date AA.MM.JJa..z (ce qui laisse 26 versions par jour…)
Deux scripts inclus dans le paquet lpmmc-dpkg-tools :
Méthode simple pour créer un paquet qui ne contient pas que des dépendances :
#!/bin/bash git clone https://github.com/joselado/dmrgpy.git tar cvfz dmrgpy.git.tar.gz dmrgpy/
cd dmrgpy
time python install.py
*.cc
«with optimizations» et pas mal de «warnings«»…src/dmrgpy
$ ls src/dmrgpy/ algebra/ cvm.py dos.py excited.py functionfit.py juliarun.py mpsalgebratk/ nonhermitian/ pychain/ reconstruct.py timeevolution.py ampotk.py dcex.py dynamics.py extrapolate.py funtk.py kondochain.py mpscpp2/ operatornames.py pychainwrapper.py simplechains.py topology.py analyticcontinuation.py degeneracy.py edtk/ fermionchain.py gap.py kpmdmrg.py mpsjulia/ parafermionchain.py pyfermion/ spinchain.py vev.py applyoperator.py densitymatrix.py effectivehamiltonian.py fermionchaintk/ groundstate.py manybodychain.py mps.py parallel.py pyparafermion/ spinfermionchain.py wavefunction.py bosonchain.py distribution.py entanglement.py fermiondos.py inference.py meanfield.py multicorrelator.py parallelslurm_old.py pyspin/ taskdmrg.py writemps.py correlator.py dmrgpy2pychain/ entropy.py fidelity.py __init__.py mode.py multioperator.py parallelslurm.py pyzn/ thermal.py cpprun.py dmtk/ entropytk/ filesystem.py install.sh mpsalgebra.py multioperatortk/ pyboson/ randommps.py timedependent.py
Package: python3-dmrgpy Version: 24.03.26a Architecture: amd64 Maintainer: Jean-Daniel <jean-daniel.dubois@grenoble.cnrs.fr> Section: misc Priority: optional Description: DMRGPY This is a Python library to compute quasi-one-dimensional spin chains and fermionic systems using matrix product states with the density matrix renormalization group as implemented in ITensor (C++ and Julia versions). Most of the computations can be performed both with DMRG and exact diagonalization for small systems, which allows to benchmark the results.
equivs-build python3-dmrgpy.equivs
python3-dmrgpy_24.03.26a_amd64.deb
(vide, 2,4Ko)dpkg-extract-deb.sh python3-dmrgpy_24.03.26a_amd64.deb
$ $ ls -R python3-dmrgpy python3-dmrgpy: DEBIAN/ usr/ python3-dmrgpy/DEBIAN: control md5sums python3-dmrgpy/usr: share/ python3-dmrgpy/usr/share: doc/ python3-dmrgpy/usr/share/doc: python3-dmrgpy/ python3-dmrgpy/usr/share/doc/python3-dmrgpy: changelog.gz copyright README.Debian
#!/bin/bash mkdir -p python3-dmrgpy/usr/lib/python3/dist-packages/ rsync -avP --delete-before dmrgpy/src/dmrgpy python3-dmrgpy/usr/lib/python3/dist-packages/
dpkg-build-deb.sh python3-dmrgpy
Note: le test minimal après une première installation
$ python Python 3.11.2 (main, Mar 2 2024, 20:28:50) [GCC 12.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from dmrgpy import spinchain >>> quit()
a montré une dépendance au paquet python3-statsmodels ce qui engendré une modification du fichier control
Package: python3-dmrgpy Version: 24.03.26a Architecture: amd64 Maintainer: Jean-Daniel <jean-daniel.dubois@grenoble.cnrs.fr> Installed-Size: 230492 Section: misc Priority: optional Multi-Arch: foreign Depends: python3-statsmodels Description: DMRGPY This is a Python library to compute quasi-one-dimensional spin chains and fermionic systems using matrix product states with the density matrix renormalization group as implemented in ITensor (C++ and Julia versions). Most of the computations can be performed both with DMRG and exact diagonalization for small systems, which allows to benchmark the results.
(la valeur de Installed-Size a été calculée à partir de
$ du -sk python3-dmrgpy/usr/ 230492 python3-dmrgpy/usr/
)
$ rm -rf dmrgpy python3-dmrgpy python3-dmrgpy_*.changes python3-dmrgpy_*.buildinfo $ du -sch * 45M dmrgpy.git.tar.gz 4,0K git-clone.sh 12M python3-dmrgpy_24.03.26a_amd64.deb 4,0K python3-dmrgpy.equivs 4,0K rsync-src-deb.sh 56M total
rsync-DIST
fait à la racine.#!/bin/bash if [ $# -ne 1 ] then echo usage $0 paquet-debian.deb exit 1 fi pkg=`basename $1 .deb`.deb if [ ! -f $pkg ] then echo $pkg inaccessible!!! exit 1 fi dirname=${pkg%%_*} echo extraction dans $dirname if [ -d $dirname ] then echo $dirname existe déjà!!! #exit 1 else mkdir -p $dirname/DEBIAN dpkg-deb -x $pkg $dirname dpkg-deb -e $pkg $dirname/DEBIAN fi #ls -R $dirname echo `find $dirname -type f |wc -l` fichiers dans $dirname du -sch $dirname
#!/bin/bash if [ `id -u` -ne 0 ] then echo lancement en fakeroot fakeroot $0 $* exit 0 fi if [ $# -ne 1 ] then if [ -f DEBIAN/control ] then wd=`pwd` root=`readlink -f $wd` base=`basename $root` cd .. else echo usage $0 dossier contenant DEBIAN/control exit 1 fi else base=$1 fi if [ ! -f $base/DEBIAN/control ] then echo $base/DEBIAN/control inacessible!!! exit 1 fi cd $base debdir=`pwd` debdir=`readlink -f $debdir` debname=`basename $debdir` derversion=`ls -rt ../$base*.deb|tail -1` echo derversion=\"$derversion\" if [ "$derversion" != "" ] then echo "dernière version : " `basename $derversion .deb` newfiles=`find . -type f -newer $derversion|wc -l` if [ $newfiles -eq 0 ] then echo aucun fichier modifié postérieurement... echo "On continue quand même ? (ou ^C)" read fi echo '===============================================' echo Fichiers modifiés postérieurement : find . -type f -newer $derversion echo '===============================================' fi newfiles=`find . -type f -newer DEBIAN/control|egrep -v "conffiles|md5sums"|wc -l` if [ $newfiles -gt 0 ] then echo $newfiles modifiés après DEBIAN/control find . -type f -newer DEBIAN/control|egrep -v "conffiles|md5sums" echo '*** ERREUR !!! mettre à jour DEBIAN/control !!!' echo '===============================================' exit 1 fi find . -type f -exec md5sum {} \; |grep -v DEBIAN >DEBIAN/md5sums find etc/ -type f 2>/dev/null |sed 's/^/\//' >DEBIAN/conffiles echo `find etc/ -type f -ls 2>/dev/null|wc -l` fichiers de configuration cd .. chown -R root.root $base chmod -R 0644 $base chmod -R +X $base find $base -type f 2>/dev/null|grep -v usr/share/doc |xargs file|egrep 'ELF|executable' |awk -F: '{print $1;}'|xargs chmod a+x echo `find $base -type f -executable -ls 2>/dev/null|wc -l` executables. echo `find $base -type f -ls 2>/dev/null|wc -l` fichiers. dpkg-deb -b $base . ls -lh $base*.deb