openshot.developers team mailing list archive
-
openshot.developers team
-
Mailing list archive
-
Message #00168
Re: Lock file location and multi-user systems?
On Wed, 2009-08-26 at 13:31 -0500, Jonathan Thomas wrote:
> TJ, if it would help. I can make many of these changes to OpenShot
> and check it back into the trunk. Changes such as moving the
> ~/thumbnail/ and ~/queue/ folder, moving the .lock file, moving the
> XML file, and so on.
I've got most of it done now so I'd suggest waiting and reviewing my
patches, and then if you want to alter the way I've done it feel free.
It's good practice for me getting up to speed with Python :)
> As far as the launcher, shouldn't it exist in /usr/local/bin, instead
> of /usr/bin?
No, 'standard' system packages should install their launcher to
"/usr/bin/". "/usr/local/bin" is for the user's self-built applications
along with "/usr/local/lib/", "/usr/local/share/" and so on. The "local"
hierarchy provides a way for self-built applications to take precedence
over system-provided applications and libraries since usually PATH will
have "/usr/local/bin" before "/usr/bin/".
> And I guess you are saying that the launcher can be a Python script
> instead of a bash script?
Yes, it's a pretty simple one:
-----
#!/usr/bin/env python
# Copyright message...
import openshot, os, sys
sys.path.insert(0, os.path.dirname(openshot.__file__))
from openshot.openshot import main
main(app_file = __file__)
-----
I've refactored ./OpenShot.py to ./openshot/openshot.main()
To make handling the Python 'packages' concept much easier I've also
moved "./classes/", "./language/" and "./windows/" to be under
"./openshot/ and created "./locale/" to contain just the PO files
(separate from the language class files) - this makes it much simpler to
configure python-support's setup() constructor:
-----
import glob, os
from distutils.core import setup
from openshot.classes import info
LOCALE_PATH = 'share/'
#Create an array with all the locale filenames
locale_files = []
for filepath in glob.glob("locale/*/LC_MESSAGES/openshot.mo"):
targetpath = os.path.dirname(os.path.join(LOCALE_PATH, filepath))
locale_files.append((targetpath, [filepath]))
setup(
scripts = ['bin/openshot'],
packages = ['openshot', 'openshot.classes', 'openshot.language', 'openshot.windows'],
data_files = locale_files,
**info.SETUP
)
-----
I've also added ./openshot/classes/info.py which declares all the
important static values that distutils.setup() requires including all
the author attribution. These definitions could also be used in the
application at run-time (e.g. for the About dialog) to ensure there is
only one source:
-----
VERSION = "0.9.24"
DATE = "20090826120000"
NAME = 'OpenShot'
GPL_VERSION = '3'
SUPPORTED_LANGUAGES = ['English', 'French', 'Finnish']
# names of all contributers, using 'u' for unicode encoding
AF = {'name': u'Andy Finch', 'email': 'we.rocked.in79@xxxxxxxxx'}
HMC = {'name': u'Helen McCall', 'email': 'wildnfree@xxxxxxxxxxxxxxxx'}
JT = {'name': u'Jonathan Thomas', 'email': 'jonathan.oomph@xxxxxxxxx'}
OG = {'name': u'Olivier Girard', 'email': 'eolinwen@xxxxxxxxx'}
TJ = {'name': u'TJ', 'email': 'ubuntu@xxxxxxxxxxx'}
#credits
CREDITS = {
'code' : [AF, HMC, JT, OG, TJ],
'documentation' : [HMC, JT, OG],
'translation' : [OG],
}
SETUP = {
'name' : NAME,
'version' : VERSION,
'author' : JT['name'] + ' and others',
'author_email' : JT['email'],
'maintainer' : JT['name'],
'maintainer_email' : JT['email'],
'url' : 'http://www.openshotvideo.com/',
'license' : 'GNU GPL v.' + GPL_VERSION,
'description' : 'Non-Linear Video Editor',
'long_description' : 'OpenShot Video Editor is a free, open-source, non-linear video editor, based on Python, GTK, and MLT.\n\n'
'It can edit video and audio files, composite and transition video files,'
' and mix multiple layers of video and audio together and render the output in many different formats.',
# see http://pypi.python.org/pypi?%3Aaction=list_classifiers
'classifiers' : [
'Development Status :: 4 - Beta',
'Environment :: X11 Applications',
'Environment :: X11 Applications :: GTK',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Operating System :: OS Independent',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Topic :: Artistic Software',
'Topic :: Multimedia :: Video :: Non-Linear Editor',] +
['Natural Language :: ' + language for language in SUPPORTED_LANGUAGES
],
}
-----
References