Fix packaging issues

Affected files:
* Configuration.py
* Database.py
* HandHistoryConverter.py
* fpdb_import.py

and setup.py to a lesser extent.

Logging requires a configuration file when initialising the class. If we
are executing from outside the source tree, this file is not present.
Catch config parser's error and try to provide the logging config file
from debian package path.

Update symlink target to match python-support from latest Debian and the
oncoming Ubuntu versions.
This commit is contained in:
Mika Bostrom 2009-10-21 20:24:46 +03:00
parent 89aa0fb726
commit b8f19741e0
7 changed files with 44 additions and 7 deletions

View File

@ -1,3 +1,9 @@
free-poker-tools (0.11.3+git20091023) unstable; urgency=low
* Snapshot release
-- Mika Bostrom <bostik+fpdb@bostik.iki.fi> Wed, 21 Oct 2009 16:47:12 +0300
free-poker-tools (0.10.99) unstable; urgency=low
* Initial packaging release.

View File

@ -1 +1 @@
/usr/share/python-support/python-fpdb/fpdb/fpdb.py /usr/bin/fpdb
/usr/share/pyshared/fpdb/fpdb.py /usr/bin/fpdb

View File

@ -35,7 +35,13 @@ import xml.dom.minidom
from xml.dom.minidom import Node
import logging, logging.config
import ConfigParser
try: # local path
logging.config.fileConfig(os.path.join(sys.path[0],"logging.conf"))
except ConfigParser.NoSectionError: # debian package path
logging.config.fileConfig('/usr/share/python-fpdb/logging.conf')
log = logging.getLogger("config")
log.debug("config logger initialised")

View File

@ -46,7 +46,13 @@ import Tourney
from Exceptions import *
import logging, logging.config
import ConfigParser
try: # local path
logging.config.fileConfig(os.path.join(sys.path[0],"logging.conf"))
except ConfigParser.NoSectionError: # debian package path
logging.config.fileConfig('/usr/share/python-fpdb/logging.conf')
log = logging.getLogger('db')

View File

@ -37,7 +37,13 @@ import gettext
gettext.install('fpdb')
import logging, logging.config
import ConfigParser
try:
logging.config.fileConfig(os.path.join(sys.path[0],"logging.conf"))
except ConfigParser.NoSectionError: # debian package path
logging.config.fileConfig('/usr/share/python-fpdb/logging.conf')
log = logging.getLogger("parser")
import pygtk

View File

@ -43,7 +43,13 @@ import Configuration
import Exceptions
import logging, logging.config
import ConfigParser
try:
logging.config.fileConfig(os.path.join(sys.path[0],"logging.conf"))
except ConfigParser.NoSectionError: # debian package path
logging.config.fileConfig('/usr/share/python-fpdb/logging.conf')
log = logging.getLogger('importer')
# database interface modules

View File

@ -5,7 +5,7 @@ from distutils.core import setup
setup(name = 'fpdb',
description = 'Free Poker Database',
version = '0.10.999',
version = '0.11.3',
author = 'FPDB team',
author_email = 'fpdb-main@lists.sourceforge.net',
packages = ['fpdb'],
@ -13,5 +13,12 @@ setup(name = 'fpdb',
data_files = [
('/usr/share/doc/python-fpdb',
['docs/readme.txt', 'docs/release-notes.txt',
'docs/tabledesign.html', 'THANKS.txt'])]
'docs/tabledesign.html', 'THANKS.txt']),
('/usr/share/pixmaps',
['gfx/fpdb-icon.png']),
('/usr/share/applications',
['files/fpdb.desktop']),
('/usr/share/python-fpdb',
['pyfpdb/logging.conf'])
]
)