[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue-forms ./MANIFEST.in ./setup.py scripts/.cv...
From: |
Reinhard Mueller |
Subject: |
gnue-forms ./MANIFEST.in ./setup.py scripts/.cv... |
Date: |
Sat, 04 Oct 2003 16:40:23 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue-forms
Branch:
Changes by: Reinhard Mueller <address@hidden> 03/10/04 16:40:23
Modified files:
. : MANIFEST.in setup.py
scripts : .cvsignore
src : __init__.py
Added files:
scripts : gnue-forms
Removed files:
. : setup.cfg.in
scripts : gnue-forms.in
setupext : __init__.py install_data.py
Log message:
Updated setup routine to use GSetup.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-forms/MANIFEST.in.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-forms/setup.py.diff?tr1=1.85&tr2=1.86&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-forms/scripts/gnue-forms?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-forms/scripts/.cvsignore.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-forms/src/__init__.py.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
Patches:
Index: gnue-forms/MANIFEST.in
diff -c gnue-forms/MANIFEST.in:1.21 gnue-forms/MANIFEST.in:1.22
*** gnue-forms/MANIFEST.in:1.21 Wed Apr 2 15:50:23 2003
--- gnue-forms/MANIFEST.in Sat Oct 4 16:40:22 2003
***************
*** 1,20 ****
include AUTHORS
include BUGS
- include COPYING
include ChangeLog
include INSTALL*
include NEWS
include README*
include TODO
- include FAQ
! include setup.cfg.in
! include scripts/gnue-forms.in
include utils/gfd04to05.py
include images/*
include dialogs/*
- include setupext/*.py
- recursive-include samples *
recursive-include doc *.txt *.pdf *.html
! include man/*.1
--- 1,17 ----
include AUTHORS
include BUGS
include ChangeLog
+ include COPYING
+ include FAQ
include INSTALL*
include NEWS
include README*
include TODO
! include scripts/gnue-forms
include utils/gfd04to05.py
include images/*
include dialogs/*
recursive-include doc *.txt *.pdf *.html
! recursive-include samples *
Index: gnue-forms/scripts/.cvsignore
diff -c gnue-forms/scripts/.cvsignore:1.3 gnue-forms/scripts/.cvsignore:1.4
*** gnue-forms/scripts/.cvsignore:1.3 Mon Sep 16 16:18:24 2002
--- gnue-forms/scripts/.cvsignore Sat Oct 4 16:40:22 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
- gfclient
- gnue-forms
gfcvs
--- 1 ----
Index: gnue-forms/setup.py
diff -c gnue-forms/setup.py:1.85 gnue-forms/setup.py:1.86
*** gnue-forms/setup.py:1.85 Thu Sep 18 23:59:39 2003
--- gnue-forms/setup.py Sat Oct 4 16:40:22 2003
***************
*** 1,5 ****
--- 1,7 ----
#!/usr/bin/env python
#
+ # GNU Enterprise Forms - Installation Procedure
+ #
# Copyright 2001-2003 Free Software Foundation
#
# This file is part of GNU Enterprise.
***************
*** 19,364 ****
# 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
- import copy
-
- 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 docs needed for the
! ##source distro. You'll need lyx installed.
! ##"""
! ## raw_input ("Press Control-D to abort or any other key to continue")
! ## os.system ("""
! ##cd doc
! ##lyx --export text techref.lyx
! ##lyx --export pdf techref.lyx
! ##lyx --export text user_guide.lyx
! ##lyx --export pdf user_guide.lyx
! ##""")
!
!
! print "Now, we are going to create the man pages for our tools."
! os.system( """
! if [ ! -e man ]
! then
! mkdir man
! fi
! cd man
! ../scripts/gfcvs --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) or ('install' in sys.argv)):
! #
! # Verify at least one UI is installed
! #
! UIOK = 0
!
! print "Checking for available UI drivers...."
! # PyNcurses
! try:
! print " Pyncurses(Currently not working)....",
! import ncurses.form
! print "OK"
! UIOK = 0
! except ImportError:
! print "No"
!
! # Curses
! try:
! print " Curses(Currently not working)....",
! import curses
! print "OK"
! UIOK = 0
! except ImportError:
! print "No"
!
! # wxPython
! try:
! print " wxPython....",
! from wxPython.wx import *
! print "OK"
! UIOK = 1
! except ImportError:
! print "No"
!
! # We have no reliable way of verifying the above!
! UIOK = 1
!
! if UIOK != 1:
! print """
! No valid UI drivers are installed on this machine:
! wxPython - www.wxpython.org
! pyncurses - pyncurses.sourceforge.net
! python curses - Read python install docs on how to activate
! """
! sys.exit()
!
! #
! # Verify for that mx.DateTime exists
! #
! UIOK = 0
!
! print "Checking for other dependencies...."
! # PyNcurses
! try:
! print " mx DateTime....",
! from mx.DateTime import DateTime
! print "OK"
! except ImportError:
! print "No"
! print """
! the mx.DateTime Library is missing:
! you can get it from http://www.lemburg.com/files/python/mxDateTime.html
! """
! 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
!
!
! if sys.platform != 'win32':
! dict = self.distribution.get_option_dict("install")
! install_prefix = dict['prefix'][1]
!
! 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" \
! + config_line \
! + "if os.path.isdir(os.path.join(_BASE,'extras')):\n" \
! + " sys.path.append(os.path.join(_BASE,'extras'))\n" \
! + "#######\n\n"
!
! for script in self.scripts:
! print "Building %s..."% (script),
!
!
! 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()
! print "OK"
!
! docfiles = []
! for file in ('doc/Developers-Guide.pdf','doc/Developers-Guide.txt',
! 'doc/Developers-Guide.html',
! 'doc/user_guide.txt','doc/user_guide.pdf'):
! if os.path.isfile(file):
! docfiles.append(file)
! else:
! print "WARNING: File %s does not exist... not installing!" % file
!
!
! dfiles = [
! Data_Files(
! base_dir = 'install_data',
! copy_to = 'doc/forms',
! 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/forms',
! template = ['recursive-include images *.png',
! 'recursive-include images *.bmp',
! 'prune images/CVS'],
! strip_dirs = 1, # This is a number, not true/false
! preserve_path = 1),
! Data_Files(
! base_dir = 'install_data',
! copy_to = 'shared/dialogs',
! template = ['recursive-include dialogs *.gfd',
! ],
! 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-Forms",
! version = VERSION + suffix,
! description = "GNU Enterprise Forms",
! long_description = "",
! author = "GNUe Forms Team",
! author_email = "address@hidden",
! url = "http://www.gnue.org",
!
! # Override certain command classes with our own ones
!
! data_files = dfiles,
!
! packages = ["gnue.forms",
! "gnue.forms.dialogs",
! "gnue.forms.dialogs.about",
! "gnue.forms.dialogs.jumpto",
! "gnue.forms.dialogs.messageBox",
! "gnue.forms.GFObjects",
! "gnue.forms.uidrivers",
! "gnue.forms.uidrivers._base",
! "gnue.forms.uidrivers._base.widgets",
! "gnue.forms.uidrivers._commonGuiToolkit",
! "gnue.forms.uidrivers.qt",
! "gnue.forms.uidrivers.qt.widgets",
! "gnue.forms.uidrivers.qt.widgets.form",
! "gnue.forms.uidrivers.win32",
! "gnue.forms.uidrivers.win32.widgets",
! "gnue.forms.uidrivers.win32.widgets.form",
! "gnue.forms.uidrivers.wx",
! "gnue.forms.uidrivers.wx.widgets",
! "gnue.forms.uidrivers.wx.widgets.form",
! "gnue.forms.uidrivers.curses",
! "gnue.forms.uidrivers.gtk2",
! "gnue.forms.uidrivers.gtk2.widgets",
! "gnue.forms.uidrivers.gtk2.widgets.form",
! ],
! package_dir = {"gnue.forms" : "src"},
! scripts = ["scripts/gnue-forms"],
! cmdclass = {'install_data':install_Data_Files,
! 'build_scripts':my_build_scripts},
! )
!
! if 'install' in sys.argv:
! print """
! Note:
! Warnings about the files not being installed in pythons search path can
be ignored.
!
! Make sure you have a default gnue.conf file (typically in
/usr/local/gnue/etc.
! A sample is provided in that directory that you can typically just copy
over.
! """
!
! if not 'sdist' in sys.argv:
! if sys.platform != 'win32':
! os.system (""" /bin/rm -rf setup.cfg""")
--- 21,153 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
+ # $Id: setup.py,v 1.86 2003/10/04 20:40:22 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 Forms"
+ 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.forms": "src"}
+ params ["scripts"] = ["scripts/gnue-forms"]
+
+ # The Data
+ docfiles = self.allfiles ("doc")
+ imagefiles = self.allfiles ("images")
+ dialogfiles = self.allfiles ("dialogs")
+
+ params ["data_files"] = \
+ [("share/gnue/dialogs", dialogfiles),
+ ("share/gnue/images/forms", imagefiles),
+ ("share/doc/gnue-forms", 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):
+ #
-------------------------------------------------------------------------
+ # mxDateTime
+ try:
+ print "checking mxDateTime library"
+ from mx.DateTime import DateTime
+ except ImportError:
+ print "---"
+ print "Could not import the mx.DateTime package."
+ print "Please install mxDateTime from the mxtools suite."
+ print "The file 'INSTALL' contains more information about dependencies."
+ sys.exit (1)
+ #
-------------------------------------------------------------------------
+ # Verify at least one UI is installed
+ UIOK = 0
+ # PyNcurses
+ print "checking Python ncurses library (pyncurses) (currently not
working)"
+ try:
+ import ncurses.form
+ UIOK = 0
+ except ImportError:
+ pass
+ # Curses
+ print "checking Python curses library (curses) (currently not working)"
+ try:
+ import curses
+ UIOK = 0
+ except ImportError:
+ pass
+ # wxPython
+ print "checking wxPython library"
+ try:
+ from wxPython.wx import *
+ UIOK = 1
+ except ImportError:
+ pass
+ # FIXME: We have more UIDrivers!
+ # We have no reliable way of verifying the above! FIXME
+ UIOK = 1
+ 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
+ pyncurses - pyncurses.sourceforge.net
+ python curses - Read python install docs on how to activate
+ The file 'INSTALL' contains more information about dependencies.
+ """
+ sys.exit (1)
+ #
=============================================================================
+ if __name__ == "__main__":
+ setup().run()
Index: gnue-forms/src/__init__.py
diff -c gnue-forms/src/__init__.py:1.19 gnue-forms/src/__init__.py:1.20
*** gnue-forms/src/__init__.py:1.19 Thu Aug 21 11:57:38 2003
--- gnue-forms/src/__init__.py Sat Oct 4 16:40:23 2003
***************
*** 57,60 ****
__hexversion__ = HEXVERSION
! PACKAGE="GNUe Forms"
--- 57,60 ----
__hexversion__ = HEXVERSION
! PACKAGE="GNUe-Forms"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue-forms ./MANIFEST.in ./setup.py scripts/.cv...,
Reinhard Mueller <=