[pybliographer/wip/gtk3] build: Fix running from tarball source



commit b7fc0126b0c6099489c23daca7df52d0ac455d8a
Author: Germán Poo-Caamaño <gpoo gnome org>
Date:   Thu Oct 12 12:54:42 2017 -0300

    build: Fix running from tarball source
    
    Detect the presence of a file that is actually distributed in
    tarballs but not in an installed system.

 Pyblio/version.py.in |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/Pyblio/version.py.in b/Pyblio/version.py.in
index 920f42c..f8d1575 100644
--- a/Pyblio/version.py.in
+++ b/Pyblio/version.py.in
@@ -2,19 +2,18 @@
 
 import os.path
 
-_curdir = os.path.dirname(os.path.realpath(__file__))
-_topdir = os.path.dirname(os.path.join(_curdir, '..', '..'))
-_installed = not os.path.exists(os.path.join(_topdir, 'pybliographer.doap'))
+_topdir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+_installed = not os.path.exists(os.path.join(_topdir, 'pybliographer.in'))
+
+version = '@version@'
 
 if _installed:
     datadir = '@p_datadir@'
     pybdir = '@datapyb@'
     localedir = '@locale_dir@'
-    version = '@version@'
     pixmapsdir = os.path.join(pybdir, 'pixmaps')
 else:
     datadir = os.path.join(_topdir, 'data')
     pybdir = _topdir
     localedir = None
-    version = '@version@'
     pixmapsdir = os.path.join(datadir, 'pixmaps')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]