fa0eb6cebe
Uses GRAMPS_RESOURCES to override the root location of the Gramps data files (which would normally be $(prefix)/share). In setup.py install, writes $(prefix)/share to gen/utils/resource-path, installs that file, then deletes it again from the source tree. The presence or absence determines whether Gramps is running from the source directory or from an installation. Const.py is now a static file; const.py.in is no longer used. Note that because importing const into setup tried to initialize things that we don't want initialized, VERSION is removed, and imported from gramps.version -- a file which will be added in the next change. Consequently, this commit will not run. svn: r21613
34 lines
1.1 KiB
Python
34 lines
1.1 KiB
Python
#! /usr/bin/env python
|
|
#
|
|
# Gramps - a GTK+/GNOME based genealogy program
|
|
#
|
|
# Copyright (C) 2012 Benny Malengier
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
#
|
|
|
|
# $Id$
|
|
|
|
"""
|
|
This is a stub to start Gramps. It is provided for the sole reason of being
|
|
able to run gramps from the source directory without setting PYTHONPATH
|
|
|
|
From this position, import gramps works great
|
|
"""
|
|
import os
|
|
os.environ['GRAMPS_RESOURCES'] = os.path.dirname(os.path.abspath(__file__))
|
|
import gramps.grampsapp as app
|
|
app.main()
|