[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue common/setup.py common/src/schema/scripter...
From: |
Jason Cater |
Subject: |
gnue common/setup.py common/src/schema/scripter... |
Date: |
Tue, 01 Apr 2003 17:52:29 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Jason Cater <address@hidden> 03/04/01 17:52:29
Modified files:
common : setup.py
common/src/schema/scripter: Scripter.py
designer : setup.py
Added files:
common/scripts : gnue-schema.in
designer/setupext: __init__.py install_data.py
Removed files:
common/scripts : gnue-schema-scripter.in
Log message:
updates to generate prereleases
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/setup.py.diff?tr1=1.53&tr2=1.54&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/scripts/gnue-schema.in?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/schema/scripter/Scripter.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/setup.py.diff?tr1=1.47&tr2=1.48&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/setupext/__init__.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/designer/setupext/install_data.py?rev=1.1
Patches:
Index: gnue/common/setup.py
diff -c gnue/common/setup.py:1.53 gnue/common/setup.py:1.54
*** gnue/common/setup.py:1.53 Sun Feb 23 18:40:22 2003
--- gnue/common/setup.py Tue Apr 1 17:52:29 2003
***************
*** 37,46 ****
GNU Enterprise requires at least Python 2.0 (recommended: 2.1+).
If you have a later version installed, you should run setup.py
! against that version. For example, if you have Python 2.1
installed, you may need to run:
! python2.1 setup.py
""" % string.split(sys.version)[0]
print "-" * 70
sys.exit()
--- 37,46 ----
GNU Enterprise requires at least Python 2.0 (recommended: 2.1+).
If you have a later version installed, you should run setup.py
! against that version. For example, if you have Python 2.2
installed, you may need to run:
! python2.2 setup.py
""" % string.split(sys.version)[0]
print "-" * 70
sys.exit()
***************
*** 85,90 ****
--- 85,103 ----
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/gsscvs --generate-man-page
+ """)
+
+
dfiles = [
Data_Files(
base_dir = 'install_data',
***************
*** 108,113 ****
--- 121,131 ----
preserve_path = 1),
Data_Files(
base_dir = 'install_data',
+ copy_to = 'man/man1',
+ template = ['recursive-include man *.1'],
+ preserve_path = 1),
+ Data_Files(
+ base_dir = 'install_data',
copy_to = 'doc/common',
template = ['recursive-include doc *',
'prune doc/CVS'],
***************
*** 215,238 ****
output.close()
- # 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)
- if 'install' in sys.argv:
- input = open('site_config.cfg')
- file = input.readlines()
- input.close()
- print "Writing site configuration to %s" % site_config
- output = open(site_config,'w')
- output.writelines(file)
- output.close()
- except ValueError:
- pass
#
# You can run:
--- 233,312 ----
output.close()
+ 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()
+
+
+ # 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)
+ if 'install' in sys.argv:
+ input = open('site_config.cfg')
+ file = input.readlines()
+ input.close()
+ print "Writing site configuration to %s" % site_config
+ output = open(site_config,'w')
+ output.writelines(file)
+ output.close()
+ config_line = "os.environ['GNUE_INSTALLED_SITE_CFG']='%s'\n" % site_config
+
+ except ValueError:
+ config_line = ""
#
# You can run:
***************
*** 254,260 ****
# Override certain command classes with our own ones
cmdclass = {'install_data':install_Data_Files,
'build_scripts':my_build_scripts},
! # scripts = ["scripts/gnuedtd"],
data_files = dfiles,
packages = ["gnue",
"gnue.common",
--- 328,334 ----
# Override certain command classes with our own ones
cmdclass = {'install_data':install_Data_Files,
'build_scripts':my_build_scripts},
! scripts = ["scripts/gnue-schema"],
data_files = dfiles,
packages = ["gnue",
"gnue.common",
***************
*** 380,386 ****
"gnue.common.schema",
"gnue.common.schema.scripter",
"gnue.common.schema.scripter.processors",
! "gnue.common.utils",
],
package_dir = {"gnue": 'module/base',
--- 454,460 ----
"gnue.common.schema",
"gnue.common.schema.scripter",
"gnue.common.schema.scripter.processors",
! "gnue.common.utils",
],
package_dir = {"gnue": 'module/base',
Index: gnue/common/src/schema/scripter/Scripter.py
diff -c gnue/common/src/schema/scripter/Scripter.py:1.7
gnue/common/src/schema/scripter/Scripter.py:1.8
*** gnue/common/src/schema/scripter/Scripter.py:1.7 Fri Feb 28 00:49:11 2003
--- gnue/common/src/schema/scripter/Scripter.py Tue Apr 1 17:52:29 2003
***************
*** 42,65 ****
# GClientApp() overrides
#
VERSION = VERSION
! COMMAND = "gnue-schema-scripter"
NAME = "GNUe Schema Scripter"
USAGE = "[options] file [old-schema]"
COMMAND_OPTIONS = [
[ 'drop_tables',None,'drop-tables', 0, None, None,
! 'Generate commands to drop relevant tables.'],
[ 'ignore_schema','S','no-create', 0, None, None,
! 'Do not generate schema creation code.'],
[ 'ignore_data','D','no-data', 0, None, None,
! 'Do not generate data insertion code.'],
[ 'upgrade_schema','u','upgrade-schema', 0, None, None,
'Generate code to upgrade an older version of a schema to '
'the recent version. You must specify a previous schema with on the
'
! 'command line.'],
[ 'upgrade_data','U','upgrade-data', 0, None, None,
'Generate code to upgrade an older version of schema data to '
'the recent version. You must specify a previous schema with on the
'
! 'command line.'],
[ 'list_vendors','l','list-vendors', 0, None, None,
'List all supported vendors.'],
[ 'output','o','output', 1, None, 'dest',
--- 42,65 ----
# GClientApp() overrides
#
VERSION = VERSION
! COMMAND = "gnue-schema"
NAME = "GNUe Schema Scripter"
USAGE = "[options] file [old-schema]"
COMMAND_OPTIONS = [
[ 'drop_tables',None,'drop-tables', 0, None, None,
! 'Generate commands to drop relevant tables. * NOT IMPLEMENTED'],
[ 'ignore_schema','S','no-create', 0, None, None,
! 'Do not generate schema creation code. * NOT IMPLEMENTED'],
[ 'ignore_data','D','no-data', 0, None, None,
! 'Do not generate data insertion code. * NOT IMPLEMENTED'],
[ 'upgrade_schema','u','upgrade-schema', 0, None, None,
'Generate code to upgrade an older version of a schema to '
'the recent version. You must specify a previous schema with on the
'
! 'command line. * NOT IMPLEMENTED'],
[ 'upgrade_data','U','upgrade-data', 0, None, None,
'Generate code to upgrade an older version of schema data to '
'the recent version. You must specify a previous schema with on the
'
! 'command line. * NOT IMPLEMENTED'],
[ 'list_vendors','l','list-vendors', 0, None, None,
'List all supported vendors.'],
[ 'output','o','output', 1, None, 'dest',
Index: gnue/designer/setup.py
diff -c gnue/designer/setup.py:1.47 gnue/designer/setup.py:1.48
*** gnue/designer/setup.py:1.47 Mon Jan 20 15:28:14 2003
--- gnue/designer/setup.py Tue Apr 1 17:52:29 2003
***************
*** 42,49 ****
pass
try:
! from distutils.core import setup
from distutils.command.build_scripts import build_scripts
except ImportError:
print """
Setup requires that python's distutils be
--- 42,51 ----
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
***************
*** 54,72 ****
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 DevelopersGuide-Forms.lyx
- lyx --export pdf DevelopersGuide-Forms.lyx
- """)
!
! print "Now, we are going to create the man pages for our tools."
os.system( """
if [ ! -e man ]
then
--- 56,63 ----
if 'sdist' in sys.argv:
! print "We are going to create the man pages for our tools."
os.system( """
if [ ! -e man ]
then
***************
*** 189,200 ****
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)
--- 180,191 ----
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)
***************
*** 219,230 ****
--- 210,262 ----
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
***************
*** 235,241 ****
except KeyError:
suffix = ""
! setup (name = "GNUe-Designer",
version = VERSION+suffix,
description = "GNU Enterprise Designer",
long_description = "",
--- 267,273 ----
except KeyError:
suffix = ""
! distutils.core.setup (name = "GNUe-Designer",
version = VERSION+suffix,
description = "GNU Enterprise Designer",
long_description = "",
***************
*** 243,251 ****
author_email = "address@hidden",
url = "http://www.gnue.org",
# Override certain command classes with our own ones
! cmdclass = {'build_scripts':my_build_scripts},
! data_files = [ ('doc/designer', docfiles),
! ('man/man1', manfiles) ],
packages = ["gnue.designer",
"gnue.designer.base",
"gnue.designer.base.settings",
--- 275,281 ----
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.settings",
***************
*** 274,280 ****
],
package_dir = {"gnue.designer" : "src",
},
! scripts = ["scripts/gnue-designer"]
)
if not 'sdist' in sys.argv:
--- 304,312 ----
],
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:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue common/setup.py common/src/schema/scripter...,
Jason Cater <=