summaryrefslogtreecommitdiff
path: root/trunk/setup.py
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/setup.py')
-rw-r--r--trunk/setup.py51
1 files changed, 51 insertions, 0 deletions
diff --git a/trunk/setup.py b/trunk/setup.py
new file mode 100644
index 0000000..efafd60
--- /dev/null
+++ b/trunk/setup.py
@@ -0,0 +1,51 @@
+# setup.py - distutils module for Dimbola
+# Copyright (C) 2009 Lars Wirzenius <liw@liw.fi>
+#
+# 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 3 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, see <http://www.gnu.org/licenses/>.
+
+
+from distutils.core import setup
+from DistUtilsExtra.command import *
+
+# We can't just import the dimbola package, since that would import
+# gtk, which doesn't work without X, and we need to be able build
+# even without X. Thus, we kludge.
+
+import re
+version = None
+for line in file('dimbola/__init__.py'):
+ m = re.match(r'^version = \'(?P<version>\d+\.\d+\.\d+)\'', line)
+ if m:
+ version = m.group('version')
+assert version is not None
+
+
+setup(name='dimbola',
+ version=version,
+ description='photo management',
+ author='Lars Wirzenius',
+ author_email='liw@liw.fi',
+ packages=['dimbola', 'dimbola/plugins'],
+ package_data={'dimbola': ['ui.ui', 'plugins/*.ui', 'NEWS.html']},
+ scripts=['dimbola-gtk'],
+ data_files=[
+ ('share/applications', ['dimbola.desktop']),
+ ('share/man/man1', ['dimbola-gtk.1']),
+ ],
+ cmdclass = { "build" : build_extra.build_extra,
+ "build_i18n" : build_i18n.build_i18n,
+ "build_help" : build_help.build_help,
+ "build_icons" : build_icons.build_icons }
+ )
+