Merge branch 'master' of git://git.assembla.com/fpdb
This commit is contained in:
commit
09dba1001e
60
packaging/gentoo/current_testing.ebuild
Normal file
60
packaging/gentoo/current_testing.ebuild
Normal file
|
@ -0,0 +1,60 @@
|
|||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# created by Steffen Schaumburg, steffen@schaumburger.info
|
||||
|
||||
inherit eutils
|
||||
inherit games
|
||||
|
||||
EAPI="2"
|
||||
NEED_PYTHON=2.5
|
||||
|
||||
DESCRIPTION="A free/open source tracker/HUD for use with online poker"
|
||||
HOMEPAGE="http://fpdb.wiki.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/Snapshots/${P}.tar.bz2"
|
||||
|
||||
LICENSE="AGPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
#note: this should work on other architectures too, please send me your experiences
|
||||
|
||||
IUSE="graph mysql postgres sqlite"
|
||||
RDEPEND="
|
||||
mysql? ( virtual/mysql
|
||||
dev-python/mysql-python )
|
||||
postgres? ( dev-db/postgresql-server
|
||||
dev-python/psycopg )
|
||||
sqlite? ( dev-lang/python[sqlite]
|
||||
dev-python/numpy )
|
||||
>=x11-libs/gtk+-2.10
|
||||
dev-python/pygtk
|
||||
graph? ( dev-python/numpy
|
||||
dev-python/matplotlib[gtk] )
|
||||
dev-python/python-xlib
|
||||
dev-python/pytz"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_install() {
|
||||
insinto "${GAMES_DATADIR}"/${PN}
|
||||
doins -r gfx
|
||||
doins -r pyfpdb
|
||||
doins readme.txt
|
||||
|
||||
exeinto "${GAMES_DATADIR}"/${PN}
|
||||
doexe run_fpdb.py
|
||||
|
||||
dodir "${GAMES_BINDIR}"
|
||||
dosym "${GAMES_DATADIR}"/${PN}/run_fpdb.py "${GAMES_BINDIR}"/${PN}
|
||||
|
||||
newicon gfx/fpdb-icon.png ${PN}.png
|
||||
make_desktop_entry ${PN}
|
||||
|
||||
prepgamesdirs
|
||||
fperms +x "${GAMES_DATADIR}"/${PN}/pyfpdb/*.pyw
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
games_pkg_postinst
|
||||
elog "Note that if you really want to use mysql or postgresql you will have to create"
|
||||
elog "the database and user yourself and enter it into the fpdb config."
|
||||
elog "You can find the instructions on the project's website."
|
||||
}
|
|
@ -1,2 +1,5 @@
|
|||
If you want to run a stable version please use current_stable.ebuild
|
||||
If you want to run a testing version please use current_testing.ebuild
|
||||
|
||||
To use the ebuild please simply copy it into your local portage tree and rename it to fpdb-version.ebuild, for example fpdb-0.20.1.ebuild or fpdb-0.20.902.ebuild.
|
||||
Here's a little howto on how to utilise 3rd party ebuilds such as this one: http://www.gentoo-wiki.info/HOWTO_Installing_3rd_Party_Ebuilds
|
||||
|
|
|
@ -52,8 +52,13 @@ def get_default_config_path():
|
|||
if os.name == 'posix':
|
||||
config_path = os.path.join(os.path.expanduser("~"), '.fpdb')
|
||||
elif os.name == 'nt':
|
||||
config_path = os.path.join(os.environ["APPDATA"], 'fpdb')
|
||||
config_path = os.path.join(unicode(os.environ[u"APPDATA"], "latin-1"), u"fpdb")
|
||||
#print u"path after joining in get_default_config_path:",config_path
|
||||
else: config_path = False
|
||||
|
||||
try: os.mkdir(config_path)
|
||||
except: pass
|
||||
|
||||
return config_path
|
||||
|
||||
def get_exec_path():
|
||||
|
@ -110,7 +115,7 @@ def get_logger(file_name, config = "config", fallback = False, log_dir=None, log
|
|||
(conf_file,copied) = get_config(file_name, fallback = fallback)
|
||||
|
||||
if log_dir is None:
|
||||
log_dir = os.path.join(get_exec_path(), 'log')
|
||||
log_dir = os.path.join(get_exec_path(), u'log')
|
||||
#print "\nget_logger: checking log_dir:", log_dir
|
||||
check_dir(log_dir)
|
||||
if log_file is None:
|
||||
|
@ -147,7 +152,7 @@ def check_dir(path, create = True):
|
|||
msg = "Creating directory: '%s'" % (path)
|
||||
print msg
|
||||
log.info(msg)
|
||||
os.mkdir(path)
|
||||
os.mkdir(path)#, "utf-8"))
|
||||
else:
|
||||
return False
|
||||
|
||||
|
@ -555,9 +560,9 @@ class Config:
|
|||
self.dir_self = get_exec_path()
|
||||
# self.dir_config = os.path.dirname(self.file)
|
||||
self.dir_config = get_default_config_path()
|
||||
self.dir_log = os.path.join(self.dir_config, 'log')
|
||||
self.dir_database = os.path.join(self.dir_config, 'database')
|
||||
self.log_file = os.path.join(self.dir_log, 'fpdb-log.txt')
|
||||
self.dir_log = os.path.join(self.dir_config, u'log')
|
||||
self.dir_database = os.path.join(self.dir_config, u'database')
|
||||
self.log_file = os.path.join(self.dir_log, u'fpdb-log.txt')
|
||||
log = get_logger("logging.conf", "config", log_dir=self.dir_log)
|
||||
|
||||
# Parse even if there was no real config file found and we are using the example
|
||||
|
|
|
@ -511,6 +511,50 @@ or None if we fail to get the info """
|
|||
elif givenTimezone=="CET":
|
||||
givenTimezone = timezone('Europe/Berlin')
|
||||
#Note: Daylight Saving Time is standardised across the EU so this should be fine
|
||||
elif givenTimezone == 'HST': # Hawaiian Standard Time
|
||||
pass
|
||||
elif givenTimezone == 'AKT': # Alaska Time
|
||||
pass
|
||||
elif givenTimezone == 'PT': # Pacific Time
|
||||
pass
|
||||
elif givenTimezone == 'MT': # Mountain Time
|
||||
pass
|
||||
elif givenTimezone == 'CT': # Central Time
|
||||
pass
|
||||
elif givenTimezone == 'AT': # Atlantic Time
|
||||
pass
|
||||
elif givenTimezone == 'NT': # Newfoundland Time
|
||||
pass
|
||||
elif givenTimezone == 'ART': # Argentinian Time
|
||||
pass
|
||||
elif givenTimezone == 'BRT': # Brasilia Time
|
||||
pass
|
||||
elif givenTimezone == 'AKT': # Alaska Time
|
||||
pass
|
||||
elif givenTimezone == 'WET': # Western European Time
|
||||
pass
|
||||
elif givenTimezone == 'EET': # Eastern European Time
|
||||
pass
|
||||
elif givenTimezone == 'MSK': # Moscow Standard Time
|
||||
pass
|
||||
elif givenTimezone == 'IST': # India Standard Time
|
||||
pass
|
||||
elif givenTimezone == 'CCT': # China Coast Time
|
||||
pass
|
||||
elif givenTimezone == 'JST': # Japan Standard Time
|
||||
pass
|
||||
elif givenTimezone == 'AWST': # Australian Western Standard Time
|
||||
givenTimezone = timezone('Australia/West')
|
||||
elif givenTimezone == 'ACST': # Australian Central Standard Time
|
||||
givenTimezone = timezone('Australia/Darwin')
|
||||
elif givenTimezone == 'AEST': # Australian Eastern Standard Time
|
||||
# Each State on the East Coast has different DSTs.
|
||||
# Melbournce is out because I don't like AFL, Queensland doesn't have DST
|
||||
# ACT is full of politicians and Tasmania will never notice.
|
||||
# Using Sydney.
|
||||
givenTimezone = timezone('Australia/Sydney')
|
||||
elif givenTimezone == 'NZT': # New Zealand Time
|
||||
pass
|
||||
else:
|
||||
raise Error #TODO raise appropriate error
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user