projects
/
zzz-pokedex.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename a bunch of sprites to use identifiers. Helps #365
[zzz-pokedex.git]
/
pokedex
/
defaults.py
diff --git
a/pokedex/defaults.py
b/pokedex/defaults.py
index
7321291
..
b2b0adf
100644
(file)
--- a/
pokedex/defaults.py
+++ b/
pokedex/defaults.py
@@
-1,13
+1,13
@@
""" pokedex.defaults - logic for finding default paths """
import os
""" pokedex.defaults - logic for finding default paths """
import os
-import pkg_resources
def get_default_db_uri_with_origin():
uri = os.environ.get('POKEDEX_DB_ENGINE', None)
origin = 'environment'
if uri is None:
def get_default_db_uri_with_origin():
uri = os.environ.get('POKEDEX_DB_ENGINE', None)
origin = 'environment'
if uri is None:
+ import pkg_resources
sqlite_path = pkg_resources.resource_filename('pokedex',
'data/pokedex.sqlite')
uri = 'sqlite:///' + sqlite_path
sqlite_path = pkg_resources.resource_filename('pokedex',
'data/pokedex.sqlite')
uri = 'sqlite:///' + sqlite_path
@@
-20,6
+20,7
@@
def get_default_index_dir_with_origin():
origin = 'environment'
if index_dir is None:
origin = 'environment'
if index_dir is None:
+ import pkg_resources
index_dir = pkg_resources.resource_filename('pokedex',
'data/whoosh-index')
origin = 'default'
index_dir = pkg_resources.resource_filename('pokedex',
'data/whoosh-index')
origin = 'default'
@@
-27,6
+28,7
@@
def get_default_index_dir_with_origin():
return index_dir, origin
def get_default_csv_dir_with_origin():
return index_dir, origin
def get_default_csv_dir_with_origin():
+ import pkg_resources
csv_dir = pkg_resources.resource_filename('pokedex', 'data/csv')
origin = 'default'
csv_dir = pkg_resources.resource_filename('pokedex', 'data/csv')
origin = 'default'