Changeset 63

Show
Ignore:
Timestamp:
12/18/06 01:29:18 (2 years ago)
Author:
KirkMcDonald
Message:

Changed no_pyd, no_st, no_meta to with_pyd, with_st, with_meta

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dcompiler.py

    r61 r63  
    155155        sources.append(pythonHeaderPath) 
    156156 
    157         # flags = (no_pyd, no_st, no_meta) 
     157        # flags = (with_pyd, with_st, with_meta) 
    158158        flags = [f for f, category in macros if category == 'aux'][0] 
    159159        # And Pyd! 
    160         if not flags[0]: 
     160        if flags[0]: 
    161161            # If we're not using StackThreads, don't use iteration.d in Pyd 
    162             if flags[1] or not self._st_support: 
     162            if not flags[1] or not self._st_support: 
    163163                _pydFiles.remove('iteration.d'); 
    164164            for file in _pydFiles: 
     
    170170                sources.append(filePath) 
    171171        # And StackThreads 
    172         if self._st_support and not flags[1]: 
     172        if self._st_support and flags[1]: 
    173173            for file in _stFiles: 
    174174                filePath = os.path.join(_infraDir, 'st', file) 
     
    181181            macros.append(('Pyd_with_StackThreads', 'version')) 
    182182        # And meta 
    183         if not flags[2]: 
     183        if flags[2]: 
    184184            for file in _metaFiles: 
    185185                filePath = os.path.join(_infraDir, 'meta', file) 
     
    190190                sources.append(filePath) 
    191191        # Add the infraDir to the include path for pyd, st, and meta. 
    192         if False in flags: 
     192        if True in flags: 
    193193            includePathOpts += self._includeOpts 
    194194            includePathOpts[-1] = includePathOpts[-1] % os.path.join(_infraDir) 
  • trunk/html_doc/celerid.html

    r62 r63  
    5555    <dt><code>version_flags</code></dt> <dd>This should be a list of strings, which will be passed to the D compiler as version flags.</dd> 
    5656    <dt><code>debug_flags</code></dt> <dd>Similar to <code>version_flags</code>, the strings in this list will be passed to D as debug flags.</dd> 
    57     <dt><code>raw_only</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of Pyd, StackThreads, and meta. This is useful if you only want to write a raw Python/C extension without the overhead of Pyd and its auxiliary packages. This is equivalent to specifying <code>True</code> to the next three flags.</dd> 
    58     <dt><code>no_pyd</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of Pyd. This is useful if you want to write a raw Python/C extension and don't want the overhead of compiling Pyd.</dd> 
    59     <dt><code>no_st</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of StackThreads. Pyd uses StackThreads for its iteration wrapping support. By specifying this, opApply wrapping, <code>wrapped_class.iter</code>, and <code>wrapped_class.alt_iter</code> will be unavailable. If <code>no_pyd</code> and this are <code>False</code>, then the <code>Pyd_with_StackThreads</code> version flag will be defined (which is used internally by Pyd). <b>Important note:</b> StackThreads does not currently work with GDC! CeleriD will always set this flag to <code>True</code> when using GDC! This means that opApply wrapping is not available on Linux at this time.</dd> 
    60     <dt><code>no_meta</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of <code>meta</code> (Pyd's metaprogramming package). Because Pyd depends on meta, an exception will be raised if this is specified and <code>no_pyd</code> is not.</dd> 
     57    <dt><code>raw_only</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of Pyd, StackThreads, and meta. This is useful if you only want to write a raw Python/C extension without the overhead of Pyd and its auxiliary packages. This is equivalent to specifying <code>False</code> to the next three flags.</dd> 
     58    <dt><code>with_pyd</code></dt> <dd>This flag defaults to <code>True</code>. When <code>False</code>, it supresses the compilation and linkage of Pyd. This is useful if you want to write a raw Python/C extension and don't want the overhead of compiling Pyd.</dd> 
     59    <dt><code>with_st</code></dt> <dd>This flag defaults to <code>True</code>. When <code>False</code>, it supresses the compilation and linkage of StackThreads. Pyd uses StackThreads for its iteration wrapping support. By setting this to <code>False</code>, opApply wrapping, <code>wrapped_class.iter</code>, and <code>wrapped_class.alt_iter</code> will be unavailable. If <code>with_pyd</code> and this are <code>True</code>, then the <code>Pyd_with_StackThreads</code> version flag will be defined (which is used internally by Pyd). <b>Important note:</b> StackThreads does not currently work with GDC! CeleriD will always set this flag to <code>False</code> when using GDC! This means that opApply wrapping is not available on Linux at this time.</dd> 
     60    <dt><code>with_meta</code></dt> <dd>This flag defaults to <code>True</code>. When <code>False</code>, it supresses the compilation and linkage of <code>meta</code> (Pyd's metaprogramming package). Because Pyd depends on meta, an exception will be raised if <code>with_pyd</code> is <code>True</code> and this is not.</dd> 
    6161    </dl> 
    6262</dd> 
  • trunk/html_doc/class_wrapping.html

    r62 r63  
    100100 
    101101<dl> 
    102 <dt><code>opApply</code></dt> <dd>Pyd wraps D's iteration protocol with the help of Mikola Lysenko's StackThreads package. This package does not work in GDC, and so opApply wrapping is not available in Linux. See also the <a href="celerid.html"><code>no_st</code></a> option offered by CeleriD.</dd> 
     102<dt><code>opApply</code></dt> <dd>Pyd wraps D's iteration protocol with the help of Mikola Lysenko's StackThreads package. This package does not work in GDC, and so opApply wrapping is not available in Linux. See also the <a href="celerid.html"><code>with_st</code></a> option offered by CeleriD.</dd> 
    103103<dt><code>opSlice, opSliceAssign</code></dt> <dd>Pyd only supports these overloads if both of their two indexes are implicitly convertable to type <code>int</code>. This is a limitation of the Python/C API. Note that this means the zero-argument form of opSlice (for allowing the "empty slice," e.g. <code>foo[]</code>) cannot be wrapped. <i>(I may work around this in the future.)</i> Because Pyd can only automatically wrap the lexically-first method in a class, it will fail to wrap opSlice and opSliceAssign if you define an empty form first.</dd> 
    104104<dt><code>opCat, opCatAssign</code></dt> <dd>Python does not have a dedicated array concatenation operator. The plus sign (<code>+</code>) is reused for this purpose. Therefore, odd behavior may result with classes that define both <code>opAdd/opAddAssign</code> and one or both of these operators. (Consider yourself warned.) However, the Python/C API considers addition and concatenation distinct operations, and so both of these sets of operator overloads are supported.</dd> 
  • trunk/raw_html/celerid.html

    r62 r63  
    4040    <dt><code>version_flags</code></dt> <dd>This should be a list of strings, which will be passed to the D compiler as version flags.</dd> 
    4141    <dt><code>debug_flags</code></dt> <dd>Similar to <code>version_flags</code>, the strings in this list will be passed to D as debug flags.</dd> 
    42     <dt><code>raw_only</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of Pyd, StackThreads, and meta. This is useful if you only want to write a raw Python/C extension without the overhead of Pyd and its auxiliary packages. This is equivalent to specifying <code>True</code> to the next three flags.</dd> 
    43     <dt><code>no_pyd</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of Pyd. This is useful if you want to write a raw Python/C extension and don't want the overhead of compiling Pyd.</dd> 
    44     <dt><code>no_st</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of StackThreads. Pyd uses StackThreads for its iteration wrapping support. By specifying this, opApply wrapping, <code>wrapped_class.iter</code>, and <code>wrapped_class.alt_iter</code> will be unavailable. If <code>no_pyd</code> and this are <code>False</code>, then the <code>Pyd_with_StackThreads</code> version flag will be defined (which is used internally by Pyd). <b>Important note:</b> StackThreads does not currently work with GDC! CeleriD will always set this flag to <code>True</code> when using GDC! This means that opApply wrapping is not available on Linux at this time.</dd> 
    45     <dt><code>no_meta</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of <code>meta</code> (Pyd's metaprogramming package). Because Pyd depends on meta, an exception will be raised if this is specified and <code>no_pyd</code> is not.</dd> 
     42    <dt><code>raw_only</code></dt> <dd>This flag defaults to <code>False</code>. When <code>True</code>, it supresses the compilation and linkage of Pyd, StackThreads, and meta. This is useful if you only want to write a raw Python/C extension without the overhead of Pyd and its auxiliary packages. This is equivalent to specifying <code>False</code> to the next three flags.</dd> 
     43    <dt><code>with_pyd</code></dt> <dd>This flag defaults to <code>True</code>. When <code>False</code>, it supresses the compilation and linkage of Pyd. This is useful if you want to write a raw Python/C extension and don't want the overhead of compiling Pyd.</dd> 
     44    <dt><code>with_st</code></dt> <dd>This flag defaults to <code>True</code>. When <code>False</code>, it supresses the compilation and linkage of StackThreads. Pyd uses StackThreads for its iteration wrapping support. By setting this to <code>False</code>, opApply wrapping, <code>wrapped_class.iter</code>, and <code>wrapped_class.alt_iter</code> will be unavailable. If <code>with_pyd</code> and this are <code>True</code>, then the <code>Pyd_with_StackThreads</code> version flag will be defined (which is used internally by Pyd). <b>Important note:</b> StackThreads does not currently work with GDC! CeleriD will always set this flag to <code>False</code> when using GDC! This means that opApply wrapping is not available on Linux at this time.</dd> 
     45    <dt><code>with_meta</code></dt> <dd>This flag defaults to <code>True</code>. When <code>False</code>, it supresses the compilation and linkage of <code>meta</code> (Pyd's metaprogramming package). Because Pyd depends on meta, an exception will be raised if <code>with_pyd</code> is <code>True</code> and this is not.</dd> 
    4646    </dl> 
    4747</dd> 
  • trunk/raw_html/class_wrapping.html

    r62 r63  
    8585 
    8686<dl> 
    87 <dt><code>opApply</code></dt> <dd>Pyd wraps D's iteration protocol with the help of Mikola Lysenko's StackThreads package. This package does not work in GDC, and so opApply wrapping is not available in Linux. See also the <a href="celerid.html"><code>no_st</code></a> option offered by CeleriD.</dd> 
     87<dt><code>opApply</code></dt> <dd>Pyd wraps D's iteration protocol with the help of Mikola Lysenko's StackThreads package. This package does not work in GDC, and so opApply wrapping is not available in Linux. See also the <a href="celerid.html"><code>with_st</code></a> option offered by CeleriD.</dd> 
    8888<dt><code>opSlice, opSliceAssign</code></dt> <dd>Pyd only supports these overloads if both of their two indexes are implicitly convertable to type <code>int</code>. This is a limitation of the Python/C API. Note that this means the zero-argument form of opSlice (for allowing the "empty slice," e.g. <code>foo[]</code>) cannot be wrapped. <i>(I may work around this in the future.)</i> Because Pyd can only automatically wrap the lexically-first method in a class, it will fail to wrap opSlice and opSliceAssign if you define an empty form first.</dd> 
    8989<dt><code>opCat, opCatAssign</code></dt> <dd>Python does not have a dedicated array concatenation operator. The plus sign (<code>+</code>) is reused for this purpose. Therefore, odd behavior may result with classes that define both <code>opAdd/opAddAssign</code> and one or both of these operators. (Consider yourself warned.) However, the Python/C API considers addition and concatenation distinct operations, and so both of these sets of operator overloads are supported.</dd> 
  • trunk/support.py

    r48 r63  
    4141        # Similarly, pass in no_pyd, &c, via define_macros. 
    4242        if 'raw_only' in kwargs: 
    43             kwargs['no_pyd'] = Tru
    44             kwargs['no_st'] = Tru
    45             kwargs['no_meta'] = Tru
     43            kwargs['with_pyd'] = Fals
     44            kwargs['with_st'] = Fals
     45            kwargs['with_meta'] = Fals
    4646            del kwargs['raw_only'] 
    47         no_pyd  = kwargs.pop('no_pyd', False) 
    48         no_st   = kwargs.pop('no_st', False) 
    49         no_meta = kwargs.pop('no_meta', False) 
    50         if not no_pyd and no_meta: 
     47        with_pyd  = kwargs.pop('with_pyd', True) 
     48        with_st   = kwargs.pop('with_st', True) 
     49        with_meta = kwargs.pop('with_meta', True) 
     50        if with_pyd and not with_meta: 
    5151            raise DistutilsOptionError( 
    52                 'Cannot specify no_meta while using Pyd. Specify' 
    53                 ' raw_only or no_pyd if you want to compile a raw Python/C' 
     52                'Cannot specify with_meta=False while using Pyd. Specify' 
     53                ' raw_only=True or with_pyd=False if you want to compile a raw Python/C' 
    5454                ' extension.' 
    5555            ) 
    56         define_macros.append(((no_pyd, no_st, no_meta), 'aux')) 
     56        define_macros.append(((with_pyd, with_st, with_meta), 'aux')) 
    5757        kwargs['define_macros'] = define_macros 
    5858