]> arthur.barton.de Git - bup.git/blob - lib/bup/path.py
Stop forcing LC_CTYPE=ISO-8859-1
[bup.git] / lib / bup / path.py
1
2 from __future__ import absolute_import
3 import os, sys
4
5 # Eventually, if we physically move the source tree cmd/ to lib/, then
6 # we could use realpath here and save some stats...
7
8 fsencode = os.fsencode if sys.version_info[0] >= 3 else lambda x: x
9
10 _libdir = os.path.abspath(os.path.dirname(fsencode(__file__)) + b'/..')
11 _resdir = _libdir
12 _exedir = os.path.abspath(_libdir + b'/cmd')
13 _exe = os.path.join(_exedir, b'bup')
14
15
16 def exe():
17     return _exe
18
19 def exedir():
20     return _exedir
21
22 cmddir = exedir
23
24 def libdir():
25     return _libdir
26
27 def resource_path(subdir=b''):
28     return os.path.join(_resdir, subdir)