[pywin32-checkins] pywin32 setup_win32all_core.py,1.18,1.19
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
|
From: <mha...@us...> - 2003-11-12 12:03:20
|
Update of /cvsroot/pywin32/pywin32
In directory sc8-pr-cvs1:/tmp/cvs-serv21926
Modified Files:
setup_win32all_core.py
Log Message:
Start of getting non-py files installed.
Index: setup_win32all_core.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/setup_win32all_core.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** setup_win32all_core.py 11 Nov 2003 11:14:40 -0000 1.18
--- setup_win32all_core.py 12 Nov 2003 12:02:56 -0000 1.19
***************
*** 1,6 ****
! # distutils setup-script for win32all core dlls, currently only
! # pywintypes and pythoncom.
#
# Thomas Heller, started in 2000 or so.
from distutils.core import setup, Extension, Command
--- 1,13 ----
! # distutils setup-script for win32all
#
# Thomas Heller, started in 2000 or so.
+ #
+ # Things known to be missing:
+ # * Commented "data files"
+ # * Install of .exe/.dlls - most .exe files go next to python.exe
+ # * "dbi" was built as .dll, as odbc depends on it. does it work?
+ # * create win32com\gen_py directory post install.
+ # * Installing the 2 system DLLs to the system directory (just notice post-
+ # setup script does this - maybe do this on std "install" too?
from distutils.core import setup, Extension, Command
***************
*** 9,12 ****
--- 16,21 ----
from distutils.dep_util import newer_group
from distutils import log
+ from distutils.sysconfig import get_python_lib
+ from distutils.filelist import FileList
import os, string, sys
***************
*** 531,534 ****
--- 540,573 ----
WinExt_pythonwin("Pythonwin", extra_link_args=["/SUBSYSTEM:WINDOWS"]),
]
+
+ # XXX - incomplete, but checking in to avoid conflicts with Thomas ;)
+ # NOTE: somewhat counter-intuitively, a result list a-la:
+ # [('Lib/site-packages\\Pythonwin', ('Pythonwin/license.txt',)),]
+ # will 'do the right thing' in terms of installing licence.txt into
+ # 'Lib/site-packages/Pythonwin/licence.txt'. I intent exploiting this to
+ # get 'com/wincom/whatever' installed to 'win32com/whatever'
+ def convert_data_files(files):
+ ret = []
+ for file in files:
+ if file.find("*") >= 0:
+ continue
+ flist = FileList(os.path.dirname(file))
+ if not flist.include_pattern(os.path.basename(file)):
+ raise RuntimeError, "No files match '%s'" % file
+ found = flist.files
+ else:
+ if not os.path.isfile(file):
+ raise RuntimeError, "No file '%s'" % file
+ path = os.path.join("Lib/site-packages", os.path.dirname(file))
+ ret.append( (path, (file,)) )
+ continue
+ # xxx - incomplete, but semi-working, and going to bed :)
+ # found = [file]
+ ret.append( ("Lib/site-packages", found) )
+
+ print ret
+ return ret
+
+
################################################################
***************
*** 555,558 ****
--- 594,612 ----
"Pythonwin": "Pythonwin"},
+ data_files=convert_data_files([
+ 'Pythonwin/pywin/*.cfg',
+ 'pywin32.chm',
+ 'Pythonwin/license.txt',
+ 'win32/license.txt',
+ # win32com readme (doesn't work for cvt_data_files)
+ # win32com/license
+ # win32com test - *.txt, *.py, *.vbs, *.js, *.sct, *.xsl
+ # win32com HTML\*
+ # win32com HTML\image\*
+ # win32comext\axscript\test - *.py, *.vbs, *.pys
+ # win32comext\axscript\demos\ie\*.*
+ # win32comext\axscript\demos\wsh\*.*
+ # win32comext\axscript\demos\asp\*.*
+ ]),
packages=['win32',
'win32com',
***************
*** 600,609 ****
# If we did any extension building...
if dist.command_obj.has_key('build_ext'):
# Print the list of extension modules we skipped building.
excluded_extensions = dist.command_obj['build_ext'].excluded_extensions
if excluded_extensions:
! print "*** NOTE: The following extensions were NOT built:"
for ext, why in excluded_extensions:
print " %s: %s" % (ext.name, why)
else:
! print "All extension modules built OK"
--- 654,666 ----
# If we did any extension building...
if dist.command_obj.has_key('build_ext'):
+ what_string = "built"
+ if dist.command_obj.has_key('install'): # just to be purdy
+ what_string += "/installed"
# Print the list of extension modules we skipped building.
excluded_extensions = dist.command_obj['build_ext'].excluded_extensions
if excluded_extensions:
! print "*** NOTE: The following extensions were NOT %s:" % what_string
for ext, why in excluded_extensions:
print " %s: %s" % (ext.name, why)
else:
! print "All extension modules %s OK" % (what_string,)
|