Ticket #1934: python.copyright.diff

File python.copyright.diff, 5.3 KB (added by jkeenan, 11 years ago)

Have Parrot::Distribution report Python files; insert copyright notice into all .py files

  • examples/benchmarks/fib.py

    diff --git a/examples/benchmarks/fib.py b/examples/benchmarks/fib.py
    index 75d59a7..d950d93 100644
    a b  
    11#! python 
     2# Copyright (C) 2004-2011, Parrot Foundation. 
    23 
    34import sys 
    45 
  • examples/benchmarks/oo1.py

    diff --git a/examples/benchmarks/oo1.py b/examples/benchmarks/oo1.py
    index 6b34140..0087843 100644
    a b  
     1# Copyright (C) 2004-2011, Parrot Foundation. 
    12class Foo: 
    23    def __init__(self): 
    34        self.i = 10 
  • examples/benchmarks/oo2.py

    diff --git a/examples/benchmarks/oo2.py b/examples/benchmarks/oo2.py
    index d5fb174..bb1fc5a 100644
    a b  
     1# Copyright (C) 2004-2011, Parrot Foundation. 
    12class Foo: 
    23    def __init__(self): 
    34        self.i = 10 
  • examples/benchmarks/oo3.py

    diff --git a/examples/benchmarks/oo3.py b/examples/benchmarks/oo3.py
    index e95ce7b..a5529b2 100644
    a b  
     1# Copyright (C) 2004-2011, Parrot Foundation. 
    12class Foo: 
    23    def __init__(self): 
    34        self.i = 10 
  • examples/benchmarks/oo4.py

    diff --git a/examples/benchmarks/oo4.py b/examples/benchmarks/oo4.py
    index 0fc95a6..263c146 100644
    a b  
     1# Copyright (C) 2004-2011, Parrot Foundation. 
    12class Foo: 
    23    def __init__(self): 
    34        self.i = 10 
  • examples/benchmarks/oo5.py

    diff --git a/examples/benchmarks/oo5.py b/examples/benchmarks/oo5.py
    index 800631a..76f95b1 100644
    a b  
     1# Copyright (C) 2004-2011, Parrot Foundation. 
    12class Foo: 
    23    def __init__(self): 
    34        self.i = 10 
  • examples/benchmarks/oo6.py

    diff --git a/examples/benchmarks/oo6.py b/examples/benchmarks/oo6.py
    index f3e42a9..82ba7ef 100644
    a b  
     1# Copyright (C) 2004-2011, Parrot Foundation. 
    12class Foo: 
    23    def __init__(self): 
    34        self.i = 10 
  • examples/benchmarks/oofib.py

    diff --git a/examples/benchmarks/oofib.py b/examples/benchmarks/oofib.py
    index 9beed45..3c55999 100644
    a b  
    11#! python 
     2# Copyright (C) 2004-2011, Parrot Foundation. 
    23 
    34import sys 
    45 
  • examples/benchmarks/vpm.py

    diff --git a/examples/benchmarks/vpm.py b/examples/benchmarks/vpm.py
    index 9c43bb7..10c2531 100644
    a b  
    11#! python 
     2# Copyright (C) 2004-2011, Parrot Foundation. 
    23 
    34import string 
    45 
  • lib/Parrot/Distribution.pm

    diff --git a/lib/Parrot/Distribution.pm b/lib/Parrot/Distribution.pm
    index bbba5fe..0c9fed0 100644
    a b  
    153153 
    154154=item C<pmc_source_file_directories()> 
    155155 
     156=item C<python_source_file_directories()> 
     157 
    156158=item C<yacc_source_file_directories()> 
    157159 
    158160Returns the directories which contain source files of the appropriate filetype. 
     
    171173 
    172174=item C<pmc_source_file_with_name()> 
    173175 
     176=item C<python_source_file_with_name()> 
     177 
    174178=item C<yacc_source_file_with_name()> 
    175179 
    176180Returns the source file with the specified name and of the appropriate filetype. 
     
    189193 
    190194=item C<pmc_source_files()> 
    191195 
     196=item C<python_source_files()> 
     197 
    192198=item C<yacc_source_files()> 
    193199 
    194200Returns a sorted list of the source files listed within the MANIFEST of 
     
    213219                shebang     => qr/^#!\s*perl/, 
    214220                shebang_ext => qr/.t$/, 
    215221            }, 
     222            python => { file_exts => ['py'] }, 
    216223        }, 
    217224        header => { c => { file_exts => ['h'] }, }, 
    218225    ); 
     
    721728    return; 
    722729} 
    723730 
     731=item C<get_python_language_files()> 
     732 
     733Returns the Python language source files within Parrot. 
     734 
     735At the current time, these files are limited to examples and tools that are 
     736useful to Parrot developers. 
     737 
     738Returns a list of Parrot::Docs::File objects. 
     739 
     740=cut 
     741 
     742sub get_python_language_files { 
     743    my $self = shift; 
     744 
     745    my @files = ( $self->python_source_files,); 
     746 
     747    my @python_language_files = (); 
     748    foreach my $file (@files) { 
     749        next if $self->is_python_exemption($file); 
     750        push @python_language_files, $file; 
     751    } 
     752 
     753    return @python_language_files; 
     754} 
     755 
     756sub is_python_exemption { 
     757    my ($self, $file) = @_; 
     758    return; 
     759} 
     760 
    724761=item C<docs_directory()> 
    725762 
    726763Returns the documentation directory. 
  • t/codingstd/copyright.t

    diff --git a/t/codingstd/copyright.t b/t/codingstd/copyright.t
    index 36a4ad4..d0216b8 100644
    a b  
    4141    $DIST->get_perl_language_files(), 
    4242    $DIST->get_make_language_files(), 
    4343    $DIST->get_pir_language_files(), 
     44    $DIST->get_python_language_files(), 
    4445); 
    4546my ( 
    4647    @no_copyright_files, 
  • tools/dev/gdb-pp-load.py

    diff --git a/tools/dev/gdb-pp-load.py b/tools/dev/gdb-pp-load.py
    index a70805e..d7dd6d3 100644
    a b  
     1# Copyright (C) 2011, Parrot Foundation. 
    12import gdb.printing 
    23import sys 
    34 
  • tools/dev/gdb-pp.py

    diff --git a/tools/dev/gdb-pp.py b/tools/dev/gdb-pp.py
    index fcc4b1b..ae8df4c 100644
    a b  
     1# Copyright (C) 2011, Parrot Foundation. 
    12from gdb.printing import PrettyPrinter, SubPrettyPrinter 
    23import gdb.types 
    34import gdb