2007-04-03 06:10:36 +00:00
"""
Setup script for Gaphor .
Run ' python setup.py develop ' to set up a development environment , including
dependencies .
"""
2003-03-04 05:08:40 +00:00
2010-10-15 16:52:36 +02:00
VERSION = ' 0.16.0 '
2007-04-03 07:17:35 +00:00
2007-05-22 09:34:30 +00:00
import os
2007-03-15 13:41:24 +00:00
import sys
sys . path . insert ( 0 , ' . ' )
2003-03-04 05:08:40 +00:00
2007-03-15 13:41:24 +00:00
from ez_setup import use_setuptools
2003-03-04 05:08:40 +00:00
2007-03-15 13:41:24 +00:00
use_setuptools ( )
2006-06-02 09:37:25 +00:00
2007-03-15 13:41:24 +00:00
from setuptools import setup , find_packages
2007-05-22 09:34:30 +00:00
from distutils . cmd import Command
2010-06-24 08:06:23 +02:00
#try:
from sphinx . setup_command import BuildDoc
#except ImportError, e:
# print 'No Sphynx found'
2006-05-29 12:49:01 +00:00
2007-02-28 14:09:17 +00:00
from utils . command . build_mo import build_mo
from utils . command . build_pot import build_pot
from utils . command . build_uml import build_uml
2007-04-05 07:49:30 +00:00
from utils . command . install_lib import install_lib
2007-02-28 14:09:17 +00:00
from utils . command . run import run
2003-03-04 05:08:40 +00:00
2010-06-30 07:26:56 +02:00
LINGUAS = [ ' ca ' , ' es ' , ' fr ' , ' nl ' , ' sv ' ]
2004-03-22 15:15:14 +00:00
2010-03-08 07:16:25 +01:00
2007-09-20 06:42:03 +00:00
# Wrap setuptools' build_py command, so we're sure build_uml is performed
# before the build_py code.
from setuptools . command . build_py import build_py
class build_py_with_sub_commands ( build_py ) :
def run ( self ) :
for cmd_name in self . get_sub_commands ( ) :
self . run_command ( cmd_name )
build_py . run ( self )
build_py_with_sub_commands . sub_commands . append ( ( ' build_uml ' , None ) )
2007-03-15 13:41:24 +00:00
setup (
name = ' gaphor ' ,
2007-04-03 07:17:35 +00:00
version = VERSION ,
2010-01-25 14:25:50 +01:00
url = ' http://gaphor.sourceforge.net ' ,
2007-03-15 13:41:24 +00:00
author = ' Arjan J. Molenaar ' ,
author_email = ' arjanmol@users.sourceforge.net ' ,
license = ' GNU General Public License ' ,
description = ' Gaphor is a UML modeling tool ' ,
2007-08-01 13:59:01 +00:00
long_description = """
Gaphor is a UML modeling tool written in Python .
It uses the GTK + environment for user interaction .
""" ,
2007-03-15 13:41:24 +00:00
classifiers = [
' Development Status :: 4 - Beta ' ,
' Environment :: X11 Applications :: GTK ' ,
' Intended Audience :: Developers ' ,
' Intended Audience :: End Users/Desktop ' ,
' Intended Audience :: Information Technology ' ,
' License :: OSI Approved :: GNU General Public License (GPL) ' ,
' Operating System :: MacOS :: MacOS X ' ,
' Operating System :: Microsoft :: Windows ' ,
' Operating System :: POSIX ' ,
' Operating System :: Unix ' ,
' Programming Language :: Python ' ,
' Topic :: Multimedia :: Graphics :: Editors :: Vector-Based ' ,
' Topic :: Software Development :: Documentation ' ,
] ,
2007-04-04 06:56:22 +00:00
keywords = ' model modeling modelling uml diagram python tool ' ,
2007-03-15 13:41:24 +00:00
2007-04-04 06:56:22 +00:00
packages = find_packages ( exclude = [ ' ez_setup ' , ' utils* ' ] ) ,
2007-03-15 13:41:24 +00:00
2007-04-04 06:56:22 +00:00
include_package_data = True ,
2007-03-15 13:41:24 +00:00
install_requires = [
# 'PyGTK >= 2.8.0', - Exclude, since it will not build anyway
2010-04-20 07:13:31 +02:00
' gaphas >= 0.7.0 ' ,
2007-10-02 11:33:25 +00:00
' zope.component >= 3.4.0 ' , # - won't compile on windows.
2007-03-15 13:41:24 +00:00
] ,
zip_safe = False ,
#test_suite = 'nose.collector',
entry_points = {
' console_scripts ' : [
' gaphor = gaphor:main ' ,
2008-03-18 11:23:33 +00:00
' gaphorconvert = gaphor.tools.gaphorconvert:main ' ,
2007-03-15 13:41:24 +00:00
] ,
2007-04-03 06:10:36 +00:00
' gaphor.services ' : [
2011-01-05 18:53:52 +01:00
' component_registry = gaphor.services.componentregistry:ZopeComponentRegistry ' ,
2010-02-08 17:44:51 +01:00
' event_dispatcher = gaphor.services.eventdispatcher:EventDispatcher ' ,
2007-05-11 07:03:20 +00:00
' adapter_loader = gaphor.services.adapterloader:AdapterLoader ' ,
2007-04-15 20:47:55 +00:00
' properties = gaphor.services.properties:Properties ' ,
2007-04-03 06:10:36 +00:00
' undo_manager = gaphor.services.undomanager:UndoManager ' ,
2011-01-06 07:49:38 +01:00
' element_factory = gaphor.UML.elementfactory:ElementFactoryService ' ,
2007-05-10 09:34:06 +00:00
' file_manager = gaphor.services.filemanager:FileManager ' ,
2008-08-30 19:39:57 +00:00
#'backup_service = gaphor.services.backupservice:BackupService',
2007-05-23 11:25:48 +00:00
' diagram_export_manager = gaphor.services.diagramexportmanager:DiagramExportManager ' ,
2007-05-11 12:57:00 +00:00
' action_manager = gaphor.services.actionmanager:ActionManager ' ,
2007-05-23 11:25:48 +00:00
' gui_manager = gaphor.services.guimanager:GUIManager ' ,
2007-05-23 06:40:17 +00:00
' copy = gaphor.services.copyservice:CopyService ' ,
2008-02-26 07:59:05 +00:00
' sanitizer = gaphor.services.sanitizerservice:SanitizerService ' ,
2009-02-18 20:28:07 +00:00
' element_dispatcher = gaphor.services.elementdispatcher:ElementDispatcher ' ,
2009-04-20 19:21:42 +00:00
#'property_dispatcher = gaphor.services.propertydispatcher:PropertyDispatcher',
2007-06-11 09:40:30 +00:00
' xmi_export = gaphor.plugins.xmiexport:XMIExport ' ,
2007-06-11 11:15:48 +00:00
' diagram_layout = gaphor.plugins.diagramlayout:DiagramLayout ' ,
' pynsource = gaphor.plugins.pynsource:PyNSource ' ,
2010-02-09 06:28:29 +01:00
#'check_metamodel = gaphor.plugins.checkmetamodel:CheckModelWindow',
2010-03-12 21:08:19 +01:00
#'live_object_browser = gaphor.plugins.liveobjectbrowser:LiveObjectBrowser',
2007-06-12 09:22:58 +00:00
' alignment = gaphor.plugins.alignment:Alignment ' ,
2007-06-14 20:22:57 +00:00
' help = gaphor.services.helpservice:HelpService ' ,
2007-04-11 06:42:22 +00:00
] ,
2007-05-08 10:24:46 +00:00
' gaphor.uicomponents ' : [
' mainwindow = gaphor.ui.mainwindow:MainWindow ' ,
' consolewindow = gaphor.ui.consolewindow:ConsoleWindow ' ,
2009-04-15 20:39:23 +00:00
' elementeditor = gaphor.ui.elementeditor:ElementEditor ' ,
2007-04-03 06:10:36 +00:00
] ,
2007-03-15 13:41:24 +00:00
} ,
cmdclass = {
2007-09-20 06:42:03 +00:00
' build_py ' : build_py_with_sub_commands ,
2007-03-15 13:41:24 +00:00
' build_uml ' : build_uml ,
2010-06-24 08:06:23 +02:00
' build_doc ' : BuildDoc ,
2007-03-15 13:41:24 +00:00
' build_mo ' : build_mo ,
' build_pot ' : build_pot ,
2007-05-14 13:04:40 +00:00
' install_lib ' : install_lib ,
2007-03-15 13:41:24 +00:00
' run ' : run ,
} ,
2007-05-14 13:04:40 +00:00
2009-07-08 16:00:32 +02:00
setup_requires = [
2011-01-07 09:39:41 +01:00
' Sphinx >= 1.0.6 ' ,
2009-07-08 16:00:32 +02:00
' nose >= 0.10.4 ' ,
' setuptools-git >= 0.3.4 '
2010-03-08 07:16:25 +01:00
] ,
2007-05-14 13:04:40 +00:00
test_suite = ' nose.collector ' ,
2007-03-15 13:41:24 +00:00
options = dict (
build_pot = dict (
all_linguas = ' , ' . join ( LINGUAS ) ,
) ,
build_mo = dict (
all_linguas = ' , ' . join ( LINGUAS ) ,
) ,
2007-07-13 13:39:54 +00:00
) ,
2003-03-04 05:08:40 +00:00
)
2007-05-14 13:04:40 +00:00
2007-05-15 03:43:33 +00:00
# vim:sw=4:et:ai