File: __init__.py

package info (click to toggle)
cambalache 0.99.8-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,952 kB
  • sloc: python: 19,276; xml: 13,029; ansic: 10,781; sql: 421; makefile: 211; sh: 11
file content (24 lines) | stat: -rw-r--r-- 671 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import os
import gi

basedir = os.path.join(os.path.split(os.path.dirname(__file__))[0])

# Ensure home directory
homedir = os.path.join(basedir, ".local", "home")
os.makedirs(os.path.join(homedir, "Projects"), exist_ok=True)

os.environ["CMB_NOTIFICATION_URL"] = "https://dummybackend.local:2000"
os.environ["GSETTINGS_BACKEND"] = "memory"
os.environ["HOME"] = homedir

gi.require_version("Gtk", "4.0")
from gi.repository import Gtk # noqa E402
from tools.cmb_init_dev import cmb_init_dev # noqa E402

# Disable animations
settings = Gtk.Settings.get_default()
settings.props.gtk_enable_animations = False

# Make sure we can run Cambalache from sources
cmb_init_dev()