[Pymoul-svn] SF.net SVN: pymoul: [24] pymoul/trunk
Status: Alpha
Brought to you by:
tiran
From: <ti...@us...> - 2007-01-15 15:52:39
|
Revision: 24 http://pymoul.svn.sourceforge.net/pymoul/?rev=24&view=rev Author: tiran Date: 2007-01-15 07:52:35 -0800 (Mon, 15 Jan 2007) Log Message: ----------- Removed egg info stuff from svn Updated some scripts to support Linux and Mac although both systems aren't supported yet Modified Paths: -------------- pymoul/trunk/setup.py pymoul/trunk/setup_win32.py pymoul/trunk/src/moul/cli/moullauncher.py pymoul/trunk/src/moul/config/__init__.py pymoul/trunk/src/moul/qt/moulqt.py Added Paths: ----------- pymoul/trunk/src/moul/config/darwin.py pymoul/trunk/src/moul/config/linux2.py Removed Paths: ------------- pymoul/trunk/src/pyMoul.egg-info/ Property Changed: ---------------- pymoul/trunk/setup.py pymoul/trunk/src/ pymoul/trunk/src/moul/cli/moullauncher.py pymoul/trunk/src/moul/qt/moulqt.py Modified: pymoul/trunk/setup.py =================================================================== --- pymoul/trunk/setup.py 2007-01-15 15:19:00 UTC (rev 23) +++ pymoul/trunk/setup.py 2007-01-15 15:52:35 UTC (rev 24) @@ -1,4 +1,4 @@ -#/usr/bin/env python2.5 +#!/usr/bin/env python2.5 """pyMoul: Python tools for Myst Online - URU Live (MOUL) TODO: Long description of pyMoul @@ -7,8 +7,9 @@ import os import time # boot strap easy setup +SETUPTOOLS_VERSION = "0.6c1" from ez_setup import use_setuptools -use_setuptools() +use_setuptools(version=SETUPTOOLS_VERSION) from setuptools import setup from setuptools import find_packages @@ -42,14 +43,13 @@ ) setup_options = dict( - setup_requires = ["setuptools>=0.6c"], + setup_requires = ["setuptools>="+SETUPTOOLS_VERSION,], install_requires = [], - options = {}, data_files = [], package_dir = {'' : 'src'}, packages = find_packages('src', exclude="moul.qt"), include_package_data = True, - zip_safe = True, + zip_safe = False, ) def writeMetadata(): @@ -75,12 +75,14 @@ kwargs.update(setup_options) # Do some windows stuff -if sys.platform.startswith('win'): +if sys.platform.startswith('win32'): from setup_win32 import updateSetupOptions from setup_win32 import updateSetupOptionsQT from setup_win32 import upxPack updateSetupOptions(kwargs) updateSetupOptionsQT(kwargs) +elif sys.platform.startswith('linux2'): + kwargs['packages'].append('moul.qt') setup(**kwargs) Property changes on: pymoul/trunk/setup.py ___________________________________________________________________ Name: svn:executable + * Modified: pymoul/trunk/setup_win32.py =================================================================== --- pymoul/trunk/setup_win32.py 2007-01-15 15:19:00 UTC (rev 23) +++ pymoul/trunk/setup_win32.py 2007-01-15 15:52:35 UTC (rev 24) @@ -63,6 +63,7 @@ "icon_resources": [(1, "src/moul/uru.ico")] } ] + kw.setdefault('options', {}) pexe = kw['options'].setdefault('py2exe', {}) pexe['compressed'] = 100 # compress zip file pexe['optimize'] = 0 # 0,1,2 Property changes on: pymoul/trunk/src ___________________________________________________________________ Name: svn:ignore + pyMoul.egg-info Modified: pymoul/trunk/src/moul/cli/moullauncher.py =================================================================== --- pymoul/trunk/src/moul/cli/moullauncher.py 2007-01-15 15:19:00 UTC (rev 23) +++ pymoul/trunk/src/moul/cli/moullauncher.py 2007-01-15 15:52:35 UTC (rev 24) @@ -1,3 +1,4 @@ +#!/usr/bin/env python2.5 # pyMoul - Python interface to Myst Online URU Live # Copyright (C) 2007 Christian Heimes <christian (at) cheimes (dot) de> Property changes on: pymoul/trunk/src/moul/cli/moullauncher.py ___________________________________________________________________ Name: svn:executable + * Modified: pymoul/trunk/src/moul/config/__init__.py =================================================================== --- pymoul/trunk/src/moul/config/__init__.py 2007-01-15 15:19:00 UTC (rev 23) +++ pymoul/trunk/src/moul/config/__init__.py 2007-01-15 15:52:35 UTC (rev 24) @@ -23,7 +23,7 @@ import sys _marker=object() - +# XXX: what about cygwin, bsd and others? if sys.platform.startswith('win32'): from moul.config.win32 import ( getMoulUserDataDir, @@ -31,6 +31,20 @@ _startMOUL, EXEC_NAME ) +elif sys.platform.startswith('linux2'): + from moul.config.linux import ( + getMoulUserDataDir, + getPyMoulIniLocation, + _startMOUL, + EXEC_NAME + ) +elif sys.platform.startswith('darwin'): + from moul.config.darwin import ( + getMoulUserDataDir, + getPyMoulIniLocation, + _startMOUL, + EXEC_NAME + ) else: raise RuntimeError('platform %s not supported' % sys.platform) Added: pymoul/trunk/src/moul/config/darwin.py =================================================================== --- pymoul/trunk/src/moul/config/darwin.py (rev 0) +++ pymoul/trunk/src/moul/config/darwin.py 2007-01-15 15:52:35 UTC (rev 24) @@ -0,0 +1,53 @@ +# pyMoul - Python interface to Myst Online URU Live +# Copyright (C) 2007 Christian Heimes <christian (at) cheimes (dot) de> + +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., 59 +# Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +"""Darwin (Mac OS X) configuration for pyMoul + +XXX: untested! +""" +import os +from moul.log import LOG +LOG.warning('Darwin/Mac support is not tested') + +MOUL_DIR = "Uru Live" +INI_FILE = ('pyMoul', 'pymoul.ini') +EXEC_NAME = "UruLauncher" +HOME = os.environ('HOME') + +def getMoulUserDataDir(): + """Get path of MOUL data directory + + The MOUL data directory contains log files, chatlogs, KI images and many + more things. + """ + moul_data = os.path.join(HOME, MOUL_DIR) + +def getPyMoulIniLocation(): + """Get path to the pyMoul ini file + """ + ini_file = os.path.join(HOME, *INI_FILE) + return ini_file + +def _startMOUL(installdir, *args): + """Start MOUL + """ + # P_DETACH is similar to P_NOWAIT, but the new process is detached from + # the console of the calling process. + mode = os.P_DETACH + path = os.path.join(installdir, EXEC_NAME) + args = (EXEC_NAME,) + args + return os.spawnv(mode, path, args) Added: pymoul/trunk/src/moul/config/linux2.py =================================================================== --- pymoul/trunk/src/moul/config/linux2.py (rev 0) +++ pymoul/trunk/src/moul/config/linux2.py 2007-01-15 15:52:35 UTC (rev 24) @@ -0,0 +1,53 @@ +# pyMoul - Python interface to Myst Online URU Live +# Copyright (C) 2007 Christian Heimes <christian (at) cheimes (dot) de> + +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., 59 +# Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +"""Linux configuration for pyMoul + +XXX: untested! +""" +import os +from moul.log import LOG +LOG.warning('Linux support is not tested') + +MOUL_DIR = "Uru Live" +INI_FILE = ('pyMoul', 'pymoul.ini') +EXEC_NAME = "UruLauncher" +HOME = os.environ('HOME') + +def getMoulUserDataDir(): + """Get path of MOUL data directory + + The MOUL data directory contains log files, chatlogs, KI images and many + more things. + """ + moul_data = os.path.join(HOME, MOUL_DIR) + +def getPyMoulIniLocation(): + """Get path to the pyMoul ini file + """ + ini_file = os.path.join(HOME, *INI_FILE) + return ini_file + +def _startMOUL(installdir, *args): + """Start MOUL + """ + # P_DETACH is similar to P_NOWAIT, but the new process is detached from + # the console of the calling process. + mode = os.P_DETACH + path = os.path.join(installdir, EXEC_NAME) + args = (EXEC_NAME,) + args + return os.spawnv(mode, path, args) Modified: pymoul/trunk/src/moul/qt/moulqt.py =================================================================== --- pymoul/trunk/src/moul/qt/moulqt.py 2007-01-15 15:19:00 UTC (rev 23) +++ pymoul/trunk/src/moul/qt/moulqt.py 2007-01-15 15:52:35 UTC (rev 24) @@ -1,3 +1,4 @@ +#!/usr/bin/env python2.5 import sys from PyQt4 import QtCore, QtGui Property changes on: pymoul/trunk/src/moul/qt/moulqt.py ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |