From 14b58c528e630ad8528099525f59e896a1cdaec2 Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 10 Feb 2015 17:40:53 +0100 Subject: Update setup files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - remove “make uninstall” target which was broken a long time ago - move very install action to the setup.py (alias “make install” to “python setup.py install” - add some stuff to “make clean” - update the config.py to search the default config file using pkg_resources (more reliable than dirname(__file__)) - install the html doc only if available - use README.rst for the setup.py long_description - also, update the copyright notice to 2015 --- src/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/config.py b/src/config.py index 43b88c98..2980e50b 100644 --- a/src/config.py +++ b/src/config.py @@ -15,6 +15,7 @@ DEFSECTION = "Poezio" import logging.config import os import sys +import pkg_resources from gettext import gettext as _ from configparser import RawConfigParser, NoOptionError, NoSectionError @@ -527,9 +528,8 @@ def run_cmdline_args(CONFIG_PATH): # Copy a default file if none exists if not path.isfile(options.filename): - default = path.join(path.dirname(__file__), - '../data/default_config.cfg') - other = path.join(path.dirname(__file__), 'default_config.cfg') + default = path.join(path.dirname(__file__), '../data/default_config.cfg') + other = pkg_resources.resource_filename('poezio', 'default_config.cfg') if path.isfile(default): copy2(default, options.filename) elif path.isfile(other): -- cgit v1.2.3