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:
parent
89aa0fb726
commit
b8f19741e0
|
@ -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
|
free-poker-tools (0.10.99) unstable; urgency=low
|
||||||
|
|
||||||
* Initial packaging release.
|
* Initial packaging release.
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
/usr/share/python-support/python-fpdb/fpdb/fpdb.py /usr/bin/fpdb
|
/usr/share/pyshared/fpdb/fpdb.py /usr/bin/fpdb
|
||||||
|
|
|
@ -35,7 +35,13 @@ import xml.dom.minidom
|
||||||
from xml.dom.minidom import Node
|
from xml.dom.minidom import Node
|
||||||
|
|
||||||
import logging, logging.config
|
import logging, logging.config
|
||||||
logging.config.fileConfig(os.path.join(sys.path[0],"logging.conf"))
|
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 = logging.getLogger("config")
|
||||||
log.debug("config logger initialised")
|
log.debug("config logger initialised")
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,13 @@ import Tourney
|
||||||
from Exceptions import *
|
from Exceptions import *
|
||||||
|
|
||||||
import logging, logging.config
|
import logging, logging.config
|
||||||
logging.config.fileConfig(os.path.join(sys.path[0],"logging.conf"))
|
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')
|
log = logging.getLogger('db')
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,13 @@ import gettext
|
||||||
gettext.install('fpdb')
|
gettext.install('fpdb')
|
||||||
|
|
||||||
import logging, logging.config
|
import logging, logging.config
|
||||||
logging.config.fileConfig(os.path.join(sys.path[0],"logging.conf"))
|
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")
|
log = logging.getLogger("parser")
|
||||||
|
|
||||||
import pygtk
|
import pygtk
|
||||||
|
|
|
@ -43,7 +43,13 @@ import Configuration
|
||||||
import Exceptions
|
import Exceptions
|
||||||
|
|
||||||
import logging, logging.config
|
import logging, logging.config
|
||||||
logging.config.fileConfig(os.path.join(sys.path[0],"logging.conf"))
|
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')
|
log = logging.getLogger('importer')
|
||||||
|
|
||||||
# database interface modules
|
# database interface modules
|
||||||
|
|
11
setup.py
11
setup.py
|
@ -5,7 +5,7 @@ from distutils.core import setup
|
||||||
|
|
||||||
setup(name = 'fpdb',
|
setup(name = 'fpdb',
|
||||||
description = 'Free Poker Database',
|
description = 'Free Poker Database',
|
||||||
version = '0.10.999',
|
version = '0.11.3',
|
||||||
author = 'FPDB team',
|
author = 'FPDB team',
|
||||||
author_email = 'fpdb-main@lists.sourceforge.net',
|
author_email = 'fpdb-main@lists.sourceforge.net',
|
||||||
packages = ['fpdb'],
|
packages = ['fpdb'],
|
||||||
|
@ -13,5 +13,12 @@ setup(name = 'fpdb',
|
||||||
data_files = [
|
data_files = [
|
||||||
('/usr/share/doc/python-fpdb',
|
('/usr/share/doc/python-fpdb',
|
||||||
['docs/readme.txt', 'docs/release-notes.txt',
|
['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'])
|
||||||
|
]
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user