[KoCo-CVS] [Commit] KoreanCodecs setup.py
Brought to you by:
perky
From: Chang <pe...@us...> - 2002-04-17 10:43:24
|
perky 02/04/17 03:43:21 Modified: . setup.py Log: (Catch up JapaneseCodecs 1.4.5's style) - Change pth filename same to package name - Add --without-aliases option onto setup.py - Move alias codes from __init__.py to aliases.py Revision Changes Path 1.11 +17 -8 KoreanCodecs/setup.py Index: setup.py =================================================================== RCS file: /cvsroot/koco/KoreanCodecs/setup.py,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- setup.py 8 Apr 2002 12:45:25 -0000 1.10 +++ setup.py 17 Apr 2002 10:43:21 -0000 1.11 @@ -1,14 +1,23 @@ #!/usr/bin/env python -# Hye-Shik Chang <16 Feb 2002> +# $Id: setup.py,v 1.11 2002/04/17 10:43:21 perky Exp $ +import sys from distutils.core import setup, Extension +from distutils.command.install import install -# XXX: I think this is not proper way. How can I make clean this? -from distutils.command.install import INSTALL_SCHEMES -for paths in INSTALL_SCHEMES.values(): - paths['data'] = paths['purelib'] # change data directory to site dir for install .pth +with_aliases = 1 +if '--without-aliases' in sys.argv: + with_aliases = 0 + sys.argv.remove('--without-aliases') -dist = setup (name = "KoreanCodecs", +class Install(install): + def finalize_options (self): + install.finalize_options(self) + if with_aliases: + self.distribution.data_files = [ + (self.install_purelib, ["misc/korean.pth"])] + +setup (name = "KoreanCodecs", version = "2.0.3", description = "Korean Codecs for Python Unicode Support", long_description = "This package provides Unicode codecs that make " @@ -19,8 +28,8 @@ author_email = "pe...@fa...", license = "Python License", url = "http://sourceforge.net/projects/koco", - data_files = [('.', ['misc/KoreanCodecs.pth'])], - platforms = ['independant'], + cmdclass = {'install': Install}, + platforms = ['independent'], packages = ['korean', 'korean.mappings', 'korean.c', |