commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue-designer ./MANIFEST.in ./setup.py scripts/...


From: Reinhard Mueller
Subject: gnue-designer ./MANIFEST.in ./setup.py scripts/...
Date: Sun, 05 Oct 2003 05:34:56 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue-designer
Branch:         
Changes by:     Reinhard Mueller <address@hidden>       03/10/05 05:34:56

Modified files:
        .              : MANIFEST.in setup.py 
        scripts        : .cvsignore 
        src            : __init__.py 
Added files:
        scripts        : gnue-designer 
Removed files:
        .              : setup.cfg setup.cfg.in 
        scripts        : gnue-designer.in 
        setupext       : __init__.py install_data.py 

Log message:
        Changed setup routine to use GSetup.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-designer/MANIFEST.in.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-designer/setup.py.diff?tr1=1.53&tr2=1.54&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-designer/scripts/gnue-designer?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-designer/scripts/.cvsignore.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-designer/src/__init__.py.diff?tr1=1.23&tr2=1.24&r1=text&r2=text

Patches:
Index: gnue-designer/MANIFEST.in
diff -c gnue-designer/MANIFEST.in:1.8 gnue-designer/MANIFEST.in:1.9
*** gnue-designer/MANIFEST.in:1.8       Wed Apr  2 00:37:37 2003
--- gnue-designer/MANIFEST.in   Sun Oct  5 05:34:55 2003
***************
*** 1,16 ****
  include AUTHORS
  include BUGS
- include COPYING
  include ChangeLog
! include INSTALL*
  include NEWS
! include README*
  include TODO
! include FAQ
  include images/*
! include setupext/*.py
  
! include scripts/gnue-designer.in
! include setup.cfg.in
! recursive-include doc *.txt *.pdf
! include man/*.1
--- 1,14 ----
  include AUTHORS
  include BUGS
  include ChangeLog
! include COPYING
! include INSTALL
  include NEWS
! include README
  include TODO
! 
  include images/*
! include scripts/gnue-designer
  
! recursive-include doc *.sxw *.txt *.html
! recursive-include packaging *
Index: gnue-designer/scripts/.cvsignore
diff -c gnue-designer/scripts/.cvsignore:1.1 
gnue-designer/scripts/.cvsignore:1.2
*** gnue-designer/scripts/.cvsignore:1.1        Thu Sep  6 04:43:50 2001
--- gnue-designer/scripts/.cvsignore    Sun Oct  5 05:34:56 2003
***************
*** 1,35 ****
- *.lo
- *.bak
- *.pyc
- .deps
- .libs
- _libs
- Makefile
- Makefile.in
- aclocal.m4
- config.cache
- config.guess
- config.h
- config.h.in
- config.h.win32
- config.log
- config.status
- config.sub
- configure
- configure.scan
- libtool
- ltconfig
- ltmain.sh
- stamp-h
- stamp-h.in
- stamp.h
- version.h
- config.h.in
- .exrc
- install-sh
- missing
- mkinstalldirs
- ABOUT-NLS
- build
  gfdes
! gfdesigner
--- 1,2 ----
  gfdes
! gdes
Index: gnue-designer/setup.py
diff -c gnue-designer/setup.py:1.53 gnue-designer/setup.py:1.54
*** gnue-designer/setup.py:1.53 Thu Sep 18 23:59:34 2003
--- gnue-designer/setup.py      Sun Oct  5 05:34:55 2003
***************
*** 1,5 ****
--- 1,7 ----
  #!/usr/bin/env python
  #
+ # GNU Enterprise Designer - Installation Procedure
+ #
  # Copyright 2001-2003 Free Software Foundation
  #
  # This file is part of GNU Enterprise.
***************
*** 19,324 ****
  # write to the Free Software Foundation, Inc., 59 Temple Place
  # - Suite 330, Boston, MA 02111-1307, USA.
  #
  
  import sys
- import string
  import os
- import os.path
- 
- from src import VERSION
- #
- # hack to deal w/ fact distutils won't
- # allow us to set absolute path prefix
- # on windows
- #
  
! if not 'sdist' in sys.argv:
!     if sys.platform != 'win32' and '--prefix' not in sys.argv and '--root' 
not in sys.argv:
!         os.system ("""cp setup.cfg.in setup.cfg""")
!     else:
!         try:
!             os.remove('setup.cfg')
!         except:
!             pass
  
  try:
!   import distutils
!   from distutils.command.build_scripts import build_scripts
!   from distutils.command.build import build
!   from setupext import Data_Files, install_Data_Files
  except ImportError:
!   print """
! Setup requires that python's distutils be
! installed.  You can get a copy of it from
! http://www.python.org/sigs/distutils-sig/
!     """
!   sys.exit()
! 
! 
! if 'sdist' in sys.argv:
  
!   print "We are going to create the man pages for our tools."
!   os.system( """
! if [ ! -e man ]
! then
! mkdir man
! fi
! cd man
! ../scripts/gfdes --generate-man-page
! """)
  
  
! 
! # Skip dependency checks?
! try:
!   index = sys.argv.index('--skip-tests')
!   print "Skipping dependency checks..."
!   doTests = 0
!   sys.argv.pop(index)
! 
! except ValueError:
!   doTests = 1
! 
! 
! 
! if doTests and 'build' in sys.argv:
! #  # Verify that PyXML is installed
! #  try:
! #    print "Checking for PyXML....",
! #    from xml.sax import saxexts
! #    from xml.sax import saxlib
! #    print "OK"
! #  except ImportError:
! #    print """
! #Your system does not appear to have the
! #PyXML module installed.  GNUe Forms will
! #not function without it.  It is available
! #at http://sourceforge.net/projects/pyxml
! #"""
! #    sys.exit()
! 
!   #
!   # Verify at least one UI is installed
!   #
!   UIOK = 0
! 
!   # wxPython
!   try:
!     print "  wxPython....",
!     from wxPython.wx import *
!     print "OK"
!     UIOK = 1
!   except ImportError:
!     print "No"
! 
!   if UIOK != 1:
!     print """
! No valid UI drivers are installed on this machine:
!   wxPython - www.wxpython.org
  """
!     sys.exit()
! 
! 
! # Site config stuff
! try:
!   index = sys.argv.index('--cfg-file')
!   site_config = os.path.join(os.path.abspath(sys.argv[index+1]))
!   sys.argv.pop(index)
!   sys.argv.pop(index)
!   config_line = "os.environ['GNUE_INSTALLED_SITE_CFG']='%s'\n" % site_config
! 
! except ValueError:
!   config_line = ""
! 
! 
! class my_build_scripts(build_scripts):
!   def finalize_options(self):
!     build_scripts.finalize_options(self)
! 
!     if self.finalized:
!       return
! 
!     dict = self.distribution.get_option_dict("install")
! 
!     if sys.platform != 'win32':
!       gnue_env = \
!                "#######\n" \
!                + "# The following variable were set when GNUe was 
installed\n" \
!                + "import os, sys\n" \
!                + "sys.path.append('%s')\n" % dict['install_lib'][1] \
!                + "INST_GNUE_CONNECTIONS='%s/etc/connections.conf'\n" % 
dict['prefix'][1] \
!                + "os.environ['INSTALL_LIB']='%s'\n" % dict['install_lib'][1] \
!                + "os.environ['INSTALL_PREFIX']='%s'\n" % dict['prefix'][1] \
!                + config_line \
!                + "#######\n"
!     else:
!       gnue_env = \
!                "#######\n" \
!              + "# The following variables were set when GNUe was installed\n" 
   \
!              + "# (Generated for a Win32 system)\n" \
!              + "import os, sys\n" \
!              + "if __name__ == '__main__': \n" \
!              + "  _BASE = 
os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]),'..'))\n" \
!              + "  try:\n" \
!              + "    os.environ['PATH']= 
os.path.abspath(os.path.dirname(sys.argv[0])) + ';' + os.environ['PATH']\n" \
!              + "  except KeyError:\n" \
!              + "    os.environ['PATH']= 
os.path.abspath(os.path.dirname(sys.argv[0]))\n" \
!              + "else: \n" \
!              + "  _BASE = 
os.path.abspath(os.path.join(os.path.dirname(__file__),'..'))\n" \
!              + 
"INST_GNUE_CONNECTIONS=os.path.join(_BASE,'etc','connections.conf')\n" \
!              + "os.environ['INSTALL_PREFIX']=_BASE\n"                \
!              + "os.environ['INSTALL_LIB']=_BASE\n"                   \
!              + "os.putenv('PYTHONCASEOK','1')\n" \
!              + "if os.path.isdir(os.path.join(_BASE,'extras')):\n" \
!              + "  sys.path.append(os.path.join(_BASE,'extras'))\n" \
!              + config_line \
!              + "#######\n\n"
! 
! 
!     for script in self.scripts:
! 
!       fin = open(script+".in", "r")
!       fout = open(script, "w")
! 
!       print "Generating script %s from %s.in" % (script,script)
! 
!       lines = fin.readlines()
! 
!       for i in range(0, len(lines)):
!         if string.strip(lines[i]) == "__GNUEENV__":
!           lines[i] = gnue_env
! 
!       fout.writelines(lines)
! 
!       fin.close()
!       fout.close()
! 
! 
! 
! docfiles = []
! #for file in ('doc/DevelopersGuide-Forms.txt',
! #             'doc/DevelopersGuide-Forms.pdf'):
! #  if os.path.isfile(file):
! #    docfiles.append(file)
! #  else:
! #    print "WARNING: File %s does not exist... not installing!" % file
! 
! manfiles = []
! for file in ('man/gnue-designer.1',):
!   if os.path.isfile(file):
!     manfiles.append(file)
!   else:
!     print "WARNING: File %s does not exist... not installing!" % file
! 
! dfiles = [
!   Data_Files(
!              base_dir = 'install_data',
!              copy_to = '',
!              template = ['recursive-include translations *',
!                          'prune translations/CVS'],
!              preserve_path = 1),
!   Data_Files(
!              base_dir = 'install_data',
!              copy_to = 'doc/common',
!              template = ['recursive-include doc *',
!                          'prune doc/CVS'],
!              strip_dirs = 1, # This is a number, not true/false
!              preserve_path = 1)
!   ]
! 
! #
! # Verify DB driver of some sort installed
! #
! #  Maybe later :)
! 
! dfiles = [
!   Data_Files(
!              base_dir = 'install_data',
!              copy_to = 'doc/designer',
!              template = ['recursive-include doc *.pdf',
!                          'recursive-include doc *.html',
!                          'recursive-include doc *.txt',
!                          'prune doc/CVS'],
!              strip_dirs = 1, # This is a number, not true/false
!              preserve_path = 1),
!   Data_Files(
!              base_dir = 'install_data',
!              copy_to = 'shared/images/designer',
!              template = ['recursive-include images *.png',
!                          'recursive-include images *.xpm',
!                          'recursive-include images *.ico',
!                          'prune images/CVS'],
!              strip_dirs = 1, # This is a number, not true/false
!              preserve_path = 1),
!   Data_Files(
!              base_dir = 'install_data',
!              copy_to = 'man/man1',
!              template = ['recursive-include man *'],
!              strip_dirs = 1, # This is a number, not true/false
!              preserve_path = 1) ]
! 
! #
! # You can run:
! #   $ GNUE_VERSION_SUFFIX=-pre1 ./setup.py sdist
! # and the packages will be created as GNUe-App-0.x.x-pre1.tar.gz
! #
! try:
!   suffix = os.environ['GNUE_VERSION_SUFFIX']
! except KeyError:
!   suffix = ""
! 
! distutils.core.setup (name = "GNUe-Designer",
!        version = VERSION+suffix,
!        description = "GNU Enterprise Designer",
!        long_description = "",
!        author = "GNUe Designer Team",
!        author_email = "address@hidden",
!        url = "http://www.gnue.org";,
!        # Override certain command classes with our own ones
!        data_files = dfiles,
!        packages = ["gnue.designer",
!                    "gnue.designer.base",
!                    "gnue.designer.base.docks",
!                    "gnue.designer.base.settings",
!                    "gnue.designer.base.tools",
!                    "gnue.designer.base.settings",
!                    "gnue.designer.base.startup",
!                    "gnue.designer.base.uihelpers",
!                    "gnue.designer.forms",
!                    "gnue.designer.forms.LayoutEditor",
!                    "gnue.designer.forms.LayoutEditor.renderers",
!                    "gnue.designer.forms.LayoutEditor.renderers.Base",
!                    "gnue.designer.forms.LayoutEditor.renderers.native",
!                    "gnue.designer.forms.LayoutEditor.renderers.curses",
!                    "gnue.designer.forms.events",
!                    "gnue.designer.forms.wizards",
!                    "gnue.designer.navigator",
!                    "gnue.designer.navigator.wizards",
!                    "gnue.designer.reports",
!                    "gnue.designer.reports.Default",
!                    "gnue.designer.reports.Standard",
!                    "gnue.designer.reports.Labels",
!                    "gnue.designer.reports.MailMerge",
!                    "gnue.designer.reports.SimpleTabulation",
!                    "gnue.designer.reports.wizards",
!                    "gnue.designer.schema",
!                    "gnue.designer.schema.DiaEditor",
!                    "gnue.designer.schema.wizards",
!                    "gnue.designer.templates",
!                    "gnue.designer.templates.forms",
!                    "gnue.designer.templates.reports",
!                    "gnue.designer.templates.schema"
!                    ],
!        package_dir = {"gnue.designer" : "src",
!                      },
!        scripts = ["scripts/gnue-designer"],
!        cmdclass = {'install_data':install_Data_Files,
!                    'build_scripts':my_build_scripts},
!        )
! 
! if not 'sdist' in sys.argv:
!     if sys.platform != 'win32':
!         os.system (""" /bin/rm -rf setup.cfg""")
! 
  
  
--- 21,117 ----
  # write to the Free Software Foundation, Inc., 59 Temple Place
  # - Suite 330, Boston, MA 02111-1307, USA.
  #
+ # $Id: setup.py,v 1.54 2003/10/05 09:34:55 reinhard Exp $
  
  import sys
  import os
  
! from src import PACKAGE, VERSION
  
  try:
!   from gnue.common.setup import GSetup
  except ImportError:
!   print "You need GNUe-Common 0.5.2 or newer installed to install %s" % 
PACKAGE
!   sys.exit (1)
  
! # 
=============================================================================
  
+ class setup (GSetup):
  
!   # 
---------------------------------------------------------------------------
!   # Definition of basic parameters for distribution and installation.
!   # Please add new files/directories that should be installed here.
!   # Note that you also have to add them to MANIFEST.in.
!   # 
---------------------------------------------------------------------------
! 
!   def set_params (self, params):
!   
!     # The Work
!     params ["name"]             = PACKAGE
!     params ["version"]          = VERSION
!     params ["description"]      = "GNU Enterprise Designer"
!     params ["long_description"] = ""
!     params ["license"]          = "GPL"
! 
!     # The Author
!     params ["author"]       = "GNU Enterprise Team"
!     params ["author_email"] = "address@hidden"
!     params ["url"]          = "http://www.gnue.org";
! 
!     # The Programs
!     params ["package_dir"] = {"gnue.designer": "src"}
!     params ["scripts"]     = ["scripts/gnue-designer"]
! 
!     # The Data
!     imagefiles  = self.allfiles ("images")
!     docfiles    = self.allfiles ("doc")
! 
!     params ["data_files"] = \
!       [("share/gnue/images/designer", imagefiles),
!        ("share/doc/gnue-designer",    docfiles)]
! 
!   # 
---------------------------------------------------------------------------
!   # Build files to be distributed and installed:
!   # Should generate the files that go in a distribution but aren't in CVS.
!   # Gets called on sdist (always) and on build/install (only when run from 
CVS).
!   # 
---------------------------------------------------------------------------
! 
!   def build_files (self):
!     # nothing to do here
!     pass
! 
!   # 
---------------------------------------------------------------------------
!   # Check dependencies for installation:
!   # Should sys.exit(1) in case any requirement isn't met.
!   # Gets called on install.
!   # 
---------------------------------------------------------------------------
! 
!   def check_dependencies (self):
! 
!     # 
-------------------------------------------------------------------------
!     # Verify at least one UI is installed
!     UIOK = 0
! 
!     # wxPython
! #   print "checking wxPython library"
! #   try:
! #     import wxPython
! #     UIOK = 1
! #   except ImportError:
! #     pass
!     UIOK = 1    # FIXME: wxPython import also fails when we don't run under X
! 
!     if UIOK != 1:
!       print "---"
!       print """
! No valid UI drivers are installed on this machine.
! Please install one of the following packages:
!   wxPython      - www.wxpython.org
! The file 'INSTALL' contains more information about dependencies.
  """
!       sys.exit (1)
  
+ # 
=============================================================================
  
+ if __name__ == "__main__":
+   setup().run()
Index: gnue-designer/src/__init__.py
diff -c gnue-designer/src/__init__.py:1.23 gnue-designer/src/__init__.py:1.24
*** gnue-designer/src/__init__.py:1.23  Thu Aug 21 11:57:29 2003
--- gnue-designer/src/__init__.py       Sun Oct  5 05:34:56 2003
***************
*** 57,63 ****
  __hexversion__ = HEXVERSION
  
  
! PACKAGE='GNUe Designer'
  TITLE = 'GNUe Designer'
  
  
--- 57,63 ----
  __hexversion__ = HEXVERSION
  
  
! PACKAGE='GNUe-Designer'
  TITLE = 'GNUe Designer'
  
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]