[KoCo-CVS] [Commit] KoreanCodecs setup.py
Brought to you by:
perky
From: Chang <pe...@us...> - 2002-04-27 03:27:44
|
perky 02/04/26 20:27:17 Modified: . setup.py Log: - Add trigger '--without-extension' not to install C extensions Revision Changes Path 1.17 +22 -13 KoreanCodecs/setup.py Index: setup.py =================================================================== RCS file: /cvsroot/koco/KoreanCodecs/setup.py,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- setup.py 26 Apr 2002 11:39:35 -0000 1.16 +++ setup.py 27 Apr 2002 03:27:17 -0000 1.17 @@ -1,14 +1,21 @@ #!/usr/bin/env python -# $Id: setup.py,v 1.16 2002/04/26 11:39:35 perky Exp $ +# $Id: setup.py,v 1.17 2002/04/27 03:27:17 perky Exp $ import sys from distutils.core import setup, Extension from distutils.command.install import install -with_aliases = 1 -if '--without-aliases' in sys.argv: - with_aliases = 0 - sys.argv.remove('--without-aliases') +flavors = { + 'aliases': 1, + 'extension': 1, +} +for flname in flavors.keys(): + if '--without-'+flname in sys.argv: + sys.argv.remove('--without-'+flname) + flavors[flname] = 0 + if '--with-'+flname in sys.argv: + sys.argv.remove('--with-'+flname) + flavors[flname] = 1 class Install(install): def initialize_options (self): @@ -21,15 +28,17 @@ def finalize_options (self): org_install_lib = self.install_lib install.finalize_options(self) - self.install_libbase = self.install_lib = org_install_lib or self.install_purelib + self.install_libbase = self.install_lib = \ + org_install_lib or self.install_purelib setup (name = "KoreanCodecs", - version = "2.0.3a2", + version = "2.0.3a3", description = "Korean Codecs for Python Unicode Support", - long_description = "This package provides Unicode codecs that make " - "Python aware of Korean character encodings such as EUC-KR, CP949 " - "and ISO-2022-KR. By using this package, Korean characters can be treated " - "as a character string instead of a byte sequence.", + long_description = "This package provides Unicode codecs that " + "make Python aware of Korean character encodings such as " + "EUC-KR, CP949 and ISO-2022-KR. By using this package, " + "Korean characters can be treated as a character string " + "instead of a byte sequence.", author = "Hye-Shik Chang", author_email = "pe...@fa...", license = "Python License", @@ -39,7 +48,7 @@ 'korean.mappings', 'korean.c', 'korean.python'], - ext_modules = [ + ext_modules = flavors['extension'] and [ Extension("korean.c._koco", ["src/_koco.c"]), Extension("korean.c.hangul", ["src/hangul.c"]), - ]) + ] or []) |