Added simple test scripts and packaging information, as well as
debugging tips.
This commit is contained in:
@@ -1,39 +1,17 @@
|
|||||||
Installing into private directory
|
Installing into private directory
|
||||||
=================================
|
=================================
|
||||||
|
|
||||||
For whatever reason, it might be useful to install the
|
1. Create a venv and include the system-site packages:
|
||||||
python frontend into a private directory.
|
`python3 -m venv venv --system-site-packages`
|
||||||
Here are some examples on how to do it:
|
2. Active that venv: `. venv/bin/activate`
|
||||||
|
3. Install an editable package: `pip install --no-deps -e .`
|
||||||
|
|
||||||
python setup.py install --home=/opt/damaris-private
|
This will use the system packages already installed.
|
||||||
or
|
|
||||||
python setup.py install --home=$HOME/devel/damaris-installed
|
|
||||||
|
|
||||||
To start Damaris use for example:
|
Alternatively you can install withoout the system-site-packages:
|
||||||
|
|
||||||
/opt/damaris-private/bin/DAMARIS
|
python3 -m venv venv
|
||||||
|
. venv/bin/activate
|
||||||
|
pip install -e .
|
||||||
|
|
||||||
|
This will download newer packages and install them in the venv.
|
||||||
Updating debian/changelog
|
|
||||||
=========================
|
|
||||||
|
|
||||||
Subversion
|
|
||||||
==========
|
|
||||||
|
|
||||||
Use the following command to get all the commit messages:
|
|
||||||
|
|
||||||
Mac OS X:
|
|
||||||
|
|
||||||
svn2cl -i -a --stdout |gsed 's/^\t/ /'|gsed -e '/^[0-9]/d'
|
|
||||||
|
|
||||||
Linux:
|
|
||||||
|
|
||||||
svn2cl -i -a --stdout |sed 's/^\t/ /'|sed -e '/^[0-9]/d'
|
|
||||||
|
|
||||||
Git
|
|
||||||
===
|
|
||||||
git log --oneline .
|
|
||||||
|
|
||||||
|
|
||||||
Then pick the stuff the users need to know.
|
|
||||||
dch -M -v x.xx
|
|
||||||
|
|||||||
+17
-2
@@ -1,3 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
sudo apt install libcairo2-dev
|
sudo apt install libcairo2-dev
|
||||||
sudo apt install libgirepository-2.0-dev gir1.2-gtksource-3.0
|
sudo apt install python3-scipy python3-lmfit python3-matplotlib
|
||||||
|
sudo apt install gir1.2-gtksource-3.0
|
||||||
|
DEBRELEASE=$(lsb_release -cs)
|
||||||
|
case $DEBRELEASE in
|
||||||
|
"trixie")
|
||||||
|
echo "Trixie detected"
|
||||||
|
sudo apt install libgirepository-2.0-dev
|
||||||
|
;;
|
||||||
|
"bookworm")
|
||||||
|
echo "Bookworm detected"
|
||||||
|
sudo apt install libgirepository1.0-dev
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "not implemented" ; exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# 1. disable any possible re-launch
|
||||||
|
GIO_USE_VFS=local # stop gvfs daemonising
|
||||||
|
GSETTINGS_BACKEND=memory # don’t spawn dconf-service
|
||||||
|
|
||||||
|
# 2. ask glib to abort on the first warning so nothing can “eat” it
|
||||||
|
G_DEBUG=fatal-warnings # or =fatal-criticals
|
||||||
|
|
||||||
|
# 3. turn on *all* debug domains
|
||||||
|
G_MESSAGES_DEBUG=all
|
||||||
|
|
||||||
|
# 4. run inside gdb so we can see the exact line that fails
|
||||||
|
gdb -ex run --args python3 src/gui/DamarisGUI.py
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import gi
|
||||||
|
gi.require_version('Gtk', '3.0')
|
||||||
|
from gi.repository import Gtk
|
||||||
|
print("GTK imported successfully")
|
||||||
|
win = Gtk.Window()
|
||||||
|
win.connect("destroy", Gtk.main_quit)
|
||||||
|
win.show_all()
|
||||||
|
Gtk.main()
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# 1) force GTK3 backend *before* pyplot is imported
|
||||||
|
os.environ['MPLBACKEND'] = 'GTK3Agg' # or GTK3Cairo
|
||||||
|
|
||||||
|
# 2) turn on every debug message GLib/GTK will give us
|
||||||
|
os.environ['G_MESSAGES_DEBUG'] = 'all'
|
||||||
|
os.environ['GTK_DEBUG'] = 'interactive' # also enables Ctrl-Shift-I inspector
|
||||||
|
|
||||||
|
import matplotlib
|
||||||
|
matplotlib.use('GTK3Agg') # belt-and-braces: make sure
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
|
||||||
|
print('GTK3Agg backend loaded, creating figure…')
|
||||||
|
fig, ax = plt.subplots()
|
||||||
|
ax.plot([0, 1], [0, 1])
|
||||||
|
ax.set_title('GTK3-Matplotlib window – close it to finish')
|
||||||
|
print('Showing figure…')
|
||||||
|
plt.show()
|
||||||
|
print('plt.show() returned – script ends')
|
||||||
|
|
||||||
Reference in New Issue
Block a user