Reorganised files for standard module locations

This commit is contained in:
Andrew Williams
2009-01-17 03:16:29 +00:00
parent 76692c7642
commit d510b98ce9
25 changed files with 128 additions and 0 deletions

22
MANIFEST Normal file
View File

@@ -0,0 +1,22 @@
LICENSE
README
runner
setup.py
openboxlogout/__init__.py
openboxlogout/openboxlogout.py
openboxlogout/locale/en/LC_MESSAGES/cb-openbox-logout.mo
openboxlogout/locale/en_GB/LC_MESSAGES/cb-openbox-logout.mo
openboxlogout/pofiles/en.po
openboxlogout/pofiles/en_GB.po
openboxlogout/themes/default/cancel.png
openboxlogout/themes/default/logout.png
openboxlogout/themes/default/restart.png
openboxlogout/themes/default/shutdown.png
openboxlogout/themes/oxygen/cancel.png
openboxlogout/themes/oxygen/hibernate.png
openboxlogout/themes/oxygen/lock.png
openboxlogout/themes/oxygen/logout.png
openboxlogout/themes/oxygen/restart.png
openboxlogout/themes/oxygen/shutdown.png
openboxlogout/themes/oxygen/suspend.png
openboxlogout/themes/oxygen/switch.png

4
MANIFEST.in Normal file
View File

@@ -0,0 +1,4 @@
include openboxlogout README LICENSE
recursive-include openboxlogout/pofiles *
recursive-include openboxlogout/locale *
recursive-include openboxlogout/themes *

0
README Normal file
View File

BIN
dist/appname-0.1.tar.gz vendored Normal file

Binary file not shown.

BIN
dist/openboxlogout-0.1.tar.gz vendored Normal file

Binary file not shown.

12
oblogout Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/python
import os
from openboxlogout import openboxlogout
if os.path.exists('openbox-logout.conf'):
config = 'openbox-logout.conf'
else:
config = None
app = OpenboxLogout(config)
app.run()

View File

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

90
setup.py Executable file
View File

@@ -0,0 +1,90 @@
import os, sys, glob, fnmatch
## Added 10 Jan 2008
from distutils.core import setup, Extension
import distutils.command.install_data
## Code borrowed from wxPython's setup and config files
## Thanks to Robin Dunn for the suggestion.
## I am not 100% sure what's going on, but it works!
def opj(*args):
path = os.path.join(*args)
return os.path.normpath(path)
## Added 10 Jan 2008
# Specializations of some distutils command classes
class wx_smart_install_data(distutils.command.install_data.install_data):
"""need to change self.install_dir to the actual library dir"""
def run(self):
install_cmd = self.get_finalized_command('install')
self.install_dir = getattr(install_cmd, 'install_lib')
return distutils.command.install_data.install_data.run(self)
def find_data_files(srcdir, *wildcards, **kw):
# get a list of all files under the srcdir matching wildcards,
# returned in a format to be used for install_data
def walk_helper(arg, dirname, files):
if '.svn' in dirname:
return
names = []
lst, wildcards = arg
for wc in wildcards:
wc_name = opj(dirname, wc)
for f in files:
filename = opj(dirname, f)
if fnmatch.fnmatch(filename, wc_name) and not os.path.isdir(filename):
names.append(filename)
if names:
lst.append( (dirname, names ) )
file_list = []
recursive = kw.get('recursive', True)
if recursive:
os.path.walk(srcdir, walk_helper, (file_list, wildcards))
else:
walk_helper((file_list, wildcards),
srcdir,
[os.path.basename(f) for f in glob.glob(opj(srcdir, '*'))])
return file_list
## This is a list of files to install, and where:
## Make sure the MANIFEST.in file points to all the right
## directories too.
files = find_data_files('fontypythonmodules/', '*.*')
from distutils.core import setup
#This is a list of files to install, and where
#(relative to the 'root' dir, where setup.py is)
#You could be more specific.
files = ["things/*"]
setup(name = "openboxlogout",
version = "0.1",
description = "Openbox Logout",
author = "Andrew Williams",
author_email = "andy@tensixtyone.com",
url = "http://bzr.tensixtyone.com/",
#Name the folder where your packages live:
#(If you have other packages (dirs) or modules (py files) then
#put them into the package directory - they will be found
#recursively.)
packages = ['openboxlogout'],
data_files = files,
## Borrowed from wxPython too:
## Causes the data_files to be installed into the modules directory.
## Override some of the default distutils command classes with my own.
cmdclass = { 'install_data': wx_smart_install_data },
#'runner' is in the root.
scripts = ["oblogout"],
long_description = """Really long text here."""
#
#This next part it for the Cheese Shop, look a little down the page.
#classifiers = []
)