From 5a933b0743efd2468c3e2b29bbaa8cd873687d55 Mon Sep 17 00:00:00 2001 From: Mike Gilligan Date: Wed, 30 Oct 2013 10:46:53 -0700 Subject: [PATCH] Moved app.ini to `configs` directory --- MANIFEST.in | 2 +- gtfsdb/config.py | 5 ++--- app.ini => gtfsdb/configs/app.ini | 0 3 files changed, 3 insertions(+), 4 deletions(-) rename app.ini => gtfsdb/configs/app.ini (100%) diff --git a/MANIFEST.in b/MANIFEST.in index 682850f..946e5c9 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,2 @@ -include *.ini +recursive-include gtfsdb/configs * recursive-include gtfsdb/data * diff --git a/gtfsdb/config.py b/gtfsdb/config.py index dd31b9b..1b8cab4 100644 --- a/gtfsdb/config.py +++ b/gtfsdb/config.py @@ -1,11 +1,10 @@ from ConfigParser import ConfigParser import logging.config import os -from pkg_resources import get_distribution +from pkg_resources import resource_filename -ini_file = os.path.join(get_distribution('gtfsdb').location, 'app.ini') config = ConfigParser() -config.read(ini_file) +config.read(os.path.join(resource_filename('gtfsdb', 'configs'), 'app.ini')) if config.has_section('loggers'): logging.config.fileConfig(ini_file, disable_existing_loggers=False) diff --git a/app.ini b/gtfsdb/configs/app.ini similarity index 100% rename from app.ini rename to gtfsdb/configs/app.ini