[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue-appserver setup.py
From: |
Reinhard Mueller |
Subject: |
gnue-appserver setup.py |
Date: |
Tue, 16 Sep 2003 17:58:25 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue-appserver
Branch:
Changes by: Reinhard Mueller <address@hidden> 03/09/16 17:58:25
Modified files:
. : setup.py
Log message:
A little work on setup.py
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/setup.py.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
Patches:
Index: gnue-appserver/setup.py
diff -c gnue-appserver/setup.py:1.13 gnue-appserver/setup.py:1.14
*** gnue-appserver/setup.py:1.13 Thu Aug 14 17:05:48 2003
--- gnue-appserver/setup.py Tue Sep 16 17:58:25 2003
***************
*** 1,5 ****
--- 1,7 ----
#!/usr/bin/env python
#
+ # GNU Enterprise Application Server - Installation Procedure
+ #
# Copyright 2001-2003 Free Software Foundation
#
# This file is part of GNU Enterprise.
***************
*** 19,24 ****
--- 21,27 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
+ # $Id: setup.py,v 1.14 2003/09/16 21:58:25 reinhard Exp $
import sys
import string
***************
*** 26,39 ****
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':
--- 29,47 ----
import os.path
import copy
! from src import PACKAGE, VERSION
+ #
-----------------------------------------------------------------------------
+ # Check Python version
+ #
-----------------------------------------------------------------------------
! if sys.hexversion < 0x02010000:
! print "%s needs at least Python version 2.1" % PACKAGE
! sys.exit()
!
! #
-----------------------------------------------------------------------------
! # distutils won't allow us to set absolute path prefix on windows
! #
-----------------------------------------------------------------------------
if not 'sdist' in sys.argv:
if sys.platform != 'win32':
***************
*** 44,61 ****
except:
pass
! try:
! from distutils.core import setup
! from distutils.command.build_scripts import build_scripts
! # 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 """
--- 52,70 ----
except:
pass
! #
-----------------------------------------------------------------------------
! # Initalize stuff
! #
-----------------------------------------------------------------------------
!
! from distutils.core import setup
! from distutils.command.build_scripts import build_scripts
!
! docfiles = None
! manfiles = None
!
! #
-----------------------------------------------------------------------------
! # sdist (Source distribution): build docs
! #
-----------------------------------------------------------------------------
if 'sdist' in sys.argv:
print """
***************
*** 84,89 ****
--- 93,101 ----
../scripts/gacvs --generate-man-page
""")
+ #
-----------------------------------------------------------------------------
+ # build and install: Check dependencies
+ #
-----------------------------------------------------------------------------
if ('build' in sys.argv) or ('install' in sys.argv):
***************
*** 174,193 ****
"""
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):
--- 186,225 ----
"""
sys.exit()
+ # List non-program files to be installed
+ docfiles = ['README', 'INSTALL', 'AUTHORS', 'COPYING', 'NEWS', 'THANKS']
+ for file in ('doc/api/api.html',
+ 'doc/api/api.txt',
+ 'doc/api/api.pdf',
+ 'doc/whitepaper/whitepaper.html',
+ 'doc/whitepaper/whitepaper.txt',
+ 'doc/whitepaper/whitepaper.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-appserver.1'):
+ if os.path.isfile(file):
+ manfiles.append(file)
+ else:
+ print "WARNING: File %s does not exist... not installing!" % file
+
+ #
-----------------------------------------------------------------------------
# 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):
***************
*** 254,291 ****
fout.close()
print "OK"
! docfiles = ['README', 'INSTALL', 'AUTHORS', 'COPYING', 'NEWS', 'THANKS']
! for file in ('doc/api/api.html',
! 'doc/api/api.txt',
! 'doc/api/api.pdf',
! 'doc/whitepaper/whitepaper.html',
! 'doc/whitepaper/whitepaper.txt',
! 'doc/whitepaper/whitepaper.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-appserver.1',
! 'man/gnue-appserver.1'):
! if os.path.isfile(file):
! manfiles.append(file)
! else:
! print "WARNING: File %s does not exist... not installing!" % file
!
!
- #
# 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 = ""
setup (name = "GNUe-AppServer",
version = VERSION + suffix,
description = "GNU Enterprise Application Server",
--- 286,308 ----
fout.close()
print "OK"
! #
-----------------------------------------------------------------------------
! # GNUE_VERSION_SUFFIX handling
! #
-----------------------------------------------------------------------------
# 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 = ""
+ #
-----------------------------------------------------------------------------
+ # Call the actual setup routine
+ #
-----------------------------------------------------------------------------
+
setup (name = "GNUe-AppServer",
version = VERSION + suffix,
description = "GNU Enterprise Application Server",
***************
*** 309,315 ****
--- 326,334 ----
packages = ["gnue.appserver",
"gnue.appserver.classrep",
"gnue.appserver.language",],
+
package_dir = {"gnue.appserver" : "src"},
+
scripts = ["scripts/gnue-appserver"]
)
***************
*** 322,339 ****
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""")
-
-
-
-
-
-
-
-
-
-
-
-
--- 341,350 ----
A sample is provided in that directory that you can typically just copy
over.
"""
+ #
-----------------------------------------------------------------------------
+ # Clean up
+ #
-----------------------------------------------------------------------------
+
if not 'sdist' in sys.argv:
if sys.platform != 'win32':
os.system (""" /bin/rm -rf setup.cfg""")
- gnue-appserver setup.py,
Reinhard Mueller <=
- gnue-appserver setup.py, Reinhard Mueller, 2003/09/18
- gnue-appserver setup.py, Jason Cater, 2003/09/19
- gnue-appserver setup.py, Reinhard Mueller, 2003/09/19
- gnue-appserver setup.py, Reinhard Mueller, 2003/09/19
- gnue-appserver setup.py, Reinhard Mueller, 2003/09/19
- gnue-appserver setup.py, Bajusz Tamás, 2003/09/19
- gnue-appserver setup.py, Reinhard Mueller, 2003/09/22
- gnue-appserver setup.py, Jan Ischebeck, 2003/09/22
- gnue-appserver setup.py, Bajusz Tamás, 2003/09/24
- gnue-appserver setup.py, Reinhard Mueller, 2003/09/25