GPL and Python modules.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Grant Edwards

    GPL and Python modules.

    Let's say I use a GPL'd python module (e.g. something installed
    in site-packages) in an application.

    Let's also say I use py2exe to package and distribute said
    application.

    Is what I'm distributing a "derived work" of the GPL'd python?
    Or is py2exe's packaging of the module's .pyc file and my
    application code's .pyc files a "mere aggregation" so that I
    only have to provide source code for the GPL'ed module and not
    for my application code?

    IOW, do I have to GPL my application code and distribute source
    code for it?

    --
    Grant Edwards grante Yow! SHHHH!! I hear SIX
    at TATTOOED TRUCK-DRIVERS
    visi.com tossing ENGINE BLOCKS into
    empty OIL DRUMS...
  • Peter Otten

    #2
    Re: GPL and Python modules.

    Grant Edwards wrote:
    [color=blue]
    > Let's say I use a GPL'd python module (e.g. something installed
    > in site-packages) in an application.[/color]

    I'd say everything that uses a GPL'd module is derived work and must also be
    GPL'd. It doesn't matter how you distribute it. If the module is under the
    LGPL you could use it in a closed source app but must make available any
    changes to the original module.

    Peter

    Comment

    • Phil Thompson

      #3
      Re: GPL and Python modules.

      > Let's say I use a GPL'd python module (e.g. something installed[color=blue]
      > in site-packages) in an application.
      >
      > Let's also say I use py2exe to package and distribute said
      > application.
      >
      > Is what I'm distributing a "derived work" of the GPL'd python?
      > Or is py2exe's packaging of the module's .pyc file and my
      > application code's .pyc files a "mere aggregation" so that I
      > only have to provide source code for the GPL'ed module and not
      > for my application code?
      >
      > IOW, do I have to GPL my application code and distribute source
      > code for it?[/color]

      I hate trying to answer questions like this (IANAL etc), but here goes...

      If your code imports a GPL module then it is a derived work in the same
      way that C code linked against a GPL library is a derived work. If you
      want to distribute your code then you must use a GPL compatible license.
      py2exe doesn't make any difference to what you can and cannot do.

      Phil

      Comment

      • Grant Edwards

        #4
        Re: GPL and Python modules.

        On 2004-10-25, Peter Otten <__peter__@web. de> wrote:[color=blue]
        > Grant Edwards wrote:
        >[color=green]
        >> Let's say I use a GPL'd python module (e.g. something installed
        >> in site-packages) in an application.[/color]
        >
        > I'd say everything that uses a GPL'd module is derived work
        > and must also be GPL'd. It doesn't matter how you distribute
        > it.[/color]

        So my application code must be GPL'd even if I never distribute
        the module? The mere act of inserting the line

        "import someGPLdmodule"

        Makes my _source_code_ a derived work, and therefore must be
        GPL'd? That just doesn't sound right.
        [color=blue]
        > If the module is under the LGPL you could use it in a closed
        > source app but must make available any changes to the original
        > module.[/color]

        --
        Grant Edwards grante Yow! TAILFINS!!...cl ick...
        at
        visi.com

        Comment

        • Gerhard Haering

          #5
          Re: GPL and Python modules.

          On Mon, Oct 25, 2004 at 03:46:31PM +0000, Grant Edwards wrote:[color=blue]
          > On 2004-10-25, Peter Otten <__peter__@web. de> wrote:[color=green]
          > > Grant Edwards wrote:
          > >[color=darkred]
          > >> Let's say I use a GPL'd python module (e.g. something installed
          > >> in site-packages) in an application.[/color]
          > >
          > > I'd say everything that uses a GPL'd module is derived work
          > > and must also be GPL'd. It doesn't matter how you distribute
          > > it.[/color]
          >
          > So my application code must be GPL'd even if I never distribute
          > the module? The mere act of inserting the line
          >
          > "import someGPLdmodule"
          >
          > Makes my _source_code_ a derived work, and therefore must be
          > GPL'd? That just doesn't sound right.[/color]

          The GPL only applies if you distribute your work (outside your
          organization).

          It would probably be a smart move to just *ask* the author of the
          module if it's ok with him what you're planning to do. Only if the two
          of you disagree, then you need to worry about the legal cra^w
          questions.

          Gerhard
          --
          A: Because it messes up the order in which people normally read text.
          Q: Why is top-posting such a bad thing?
          A: Top-posting.
          Q: What is the most annoying thing on usenet and in e-mail?

          -----BEGIN PGP SIGNATURE-----
          Version: GnuPG v1.2.4 (GNU/Linux)

          iD8DBQFBfSI7dIO 4ozGCH14RAlirAJ 0VV6Cuzkphek7NX aLjcpYoBqx5ywCg haRI
          10S1Sje3Zq6JCvS zZDRa2MY=
          =dMQ9
          -----END PGP SIGNATURE-----

          Comment

          • Grant Edwards

            #6
            Re: GPL and Python modules.

            On 2004-10-25, Gerhard Haering <gh@ghaering.de > wrote:
            [color=blue][color=green][color=darkred]
            >> >> Let's say I use a GPL'd python module (e.g. something installed
            >> >> in site-packages) in an application.
            >> >
            >> > I'd say everything that uses a GPL'd module is derived work
            >> > and must also be GPL'd. It doesn't matter how you distribute
            >> > it.[/color]
            >>
            >> So my application code must be GPL'd even if I never distribute
            >> the module? The mere act of inserting the line=20
            >>
            >> "import someGPLdmodule"
            >>
            >> Makes my _source_code_ a derived work, and therefore must be
            >> GPL'd? That just doesn't sound right.[/color]
            >
            > The GPL only applies if you distribute your work (outside your
            > organization).[/color]

            Yes, I realize that, and it has nothing to do with my question.
            [color=blue]
            > It would probably be a smart move to just *ask* the author of
            > the module if it's ok with him what you're planning to do.
            > Only if the two of you disagree, then you need to worry about
            > the legal questions.[/color]

            I don't really want to have to come to individual agreements
            with 5-10 different module authors. That's why "standard"
            licenses were invented.

            --
            Grant Edwards grante Yow! Didn't I buy a 1951
            at Packard from you last March
            visi.com in Cairo?

            Comment

            • Peter Otten

              #7
              Re: GPL and Python modules.

              Grant Edwards wrote:
              [color=blue]
              > I don't really want to have to come to individual agreements
              > with 5-10 different module authors.  That's why "standard"
              > licenses were invented.[/color]

              Yes, and for an author to GPL a module is the standard way of saying use it
              as you like in your program, but distribute your part of the work under the
              same terms. Basically an embrace-and-extend antidote for code.

              I think talking to an author and maybe offering a moderate fee if you want
              terms more favourable to your purpose shouldn't be too much.

              Otherwise you have to stick to modules with BSD/MIT/Python Licenses - not
              that rare in Python land.

              Peter




              Comment

              • Istvan Albert

                #8
                Re: GPL and Python modules.

                Grant Edwards wrote:

                [color=blue]
                > Makes my _source_code_ a derived work, and therefore must be
                > GPL'd? That just doesn't sound right.[/color]

                Well doesn't your work derive some functionality
                from the imported code? Does your code work without
                the import?

                People need to understand once and for all that
                GPL is about "forcing" you to make your program
                open source. Whether that sounds right
                or wrong to you, whether you like it or hate it
                is irrelevant.

                Obviously no one like suddenly realize that they are
                bound by GPL but everyone must keep this in mind
                *before* choosing that path.

                Istvan.

                Comment

                • Ville Vainio

                  #9
                  Re: GPL and Python modules.

                  >>>>> "Grant" == Grant Edwards <grante@visi.co m> writes:

                  Grant> That just doesn't sound right.

                  That sentence pretty much summarizes the issue of GPL'd libraries. The
                  most practical approach is to rather post a question about "is there a
                  non-GPL'd version of <foo> around?"

                  --
                  Ville Vainio http://tinyurl.com/2prnb

                  Comment

                  • marcus@deepfort.com

                    #10
                    Re: GPL and Python modules.

                    Grant Edwards wrote:
                    [color=blue]
                    >Let's say I use a GPL'd python module (e.g. something installed
                    >in site-packages) in an application.
                    >
                    >Let's also say I use py2exe to package and distribute said
                    >application.
                    >
                    >Is what I'm distributing a "derived work" of the GPL'd python?
                    >Or is py2exe's packaging of the module's .pyc file and my
                    >application code's .pyc files a "mere aggregation" so that I
                    >only have to provide source code for the GPL'ed module and not
                    >for my application code?
                    >
                    >IOW, do I have to GPL my application code and distribute source
                    >code for it?
                    >
                    >[/color]
                    Just a thought..

                    Why don't you just GPL the whole lot? Headache over, and a warm fuzzy
                    feeling in its place.

                    If your work could be used to extend or wrap the module, it's possible
                    someone else may find it useful...

                    Notwithstanding , obviously, any considerations you might have that would
                    stop you, that's what I'd do - besides which, if you're benefiting from
                    GPL stuff, give something back.. go on, you know you want to.. :-)

                    Like I said, just a thought.

                    Comment

                    • Grant Edwards

                      #11
                      Re: GPL and Python modules.

                      On 2004-10-25, Peter Otten <__peter__@web. de> wrote:
                      [color=blue]
                      > I think talking to an author and maybe offering a moderate fee if you want
                      > terms more favourable to your purpose shouldn't be too much.
                      >
                      > Otherwise you have to stick to modules with BSD/MIT/Python Licenses[/color]

                      Or LGPL, which was intended for this specific situation.
                      [color=blue]
                      > - not that rare in Python land.[/color]

                      --
                      Grant Edwards grante Yow! I am having FUN... I
                      at wonder if it's NET FUN or
                      visi.com GROSS FUN?

                      Comment

                      • Grant Edwards

                        #12
                        Re: GPL and Python modules.

                        On 2004-10-25, Istvan Albert <ialbert@mailbl ocks.com> wrote:
                        [color=blue][color=green]
                        >> Makes my _source_code_ a derived work, and therefore must be
                        >> GPL'd? That just doesn't sound right.[/color]
                        >
                        > Well doesn't your work derive some functionality
                        > from the imported code?[/color]

                        Not until it's actually been imported. That doesn't happen
                        until runtime.
                        [color=blue]
                        > Does your code work without the import?[/color]

                        That depend's on your definition of "work".

                        --
                        Grant Edwards grante Yow! If I had a Q-TIP, I
                        at could prevent th' collapse
                        visi.com of NEGOTIATIONS!!

                        Comment

                        • Grant Edwards

                          #13
                          Re: GPL and Python modules.

                          On 2004-10-25, marcus@deepfort .com <marcus@deepfor t.com> wrote:
                          [color=blue][color=green]
                          >>Let's say I use a GPL'd python module (e.g. something installed
                          >>in site-packages) in an application.
                          >>
                          >>Let's also say I use py2exe to package and distribute said
                          >>application .
                          >>
                          >>Is what I'm distributing a "derived work" of the GPL'd python?
                          >>Or is py2exe's packaging of the module's .pyc file and my
                          >>application code's .pyc files a "mere aggregation" so that I
                          >>only have to provide source code for the GPL'ed module and not
                          >>for my application code?
                          >>
                          >>IOW, do I have to GPL my application code and distribute source
                          >>code for it?[/color][/color]
                          [color=blue]
                          > Why don't you just GPL the whole lot? Headache over, and a
                          > warm fuzzy feeling in its place.[/color]

                          I haven't said I won't. :) That said, providing a mechanism for
                          people to get the source does impose some overhead and cost.
                          And then there's the time/cost associated with supporting the
                          GPL'd source code _after_ you've provided somebody with it.
                          [color=blue]
                          > If your work could be used to extend or wrap the module,[/color]

                          It doesn't.
                          [color=blue]
                          > it's possible someone else may find it useful...[/color]

                          I doubt it, but you never know.
                          [color=blue]
                          > Notwithstanding , obviously, any considerations you might have
                          > that would stop you, that's what I'd do - besides which, if
                          > you're benefiting from GPL stuff, give something back..[/color]

                          I do try, though it isn't always accepted. The last set of
                          patches I submitted to gcc were declined. :(

                          You will find code by me in the socket and pyserial modules, in
                          gcc, binutils, gdb, fetchmail, rcs, mutt, and probably others
                          which I have forgotten.
                          [color=blue]
                          > go on, you know you want to.. :-)[/color]

                          I also wrote a ladder diagram editor and a compiler
                          code-generator which are GPL'd.

                          --
                          Grant Edwards grante Yow! I always liked FLAG
                          at DAY!!
                          visi.com

                          Comment

                          • Ian Bicking

                            #14
                            Re: GPL and Python modules.

                            Grant Edwards wrote:[color=blue][color=green]
                            >>Why don't you just GPL the whole lot? Headache over, and a
                            >>warm fuzzy feeling in its place.[/color]
                            >
                            >
                            > I haven't said I won't. :) That said, providing a mechanism for
                            > people to get the source does impose some overhead and cost.
                            > And then there's the time/cost associated with supporting the
                            > GPL'd source code _after_ you've provided somebody with it.[/color]

                            You don't have to provide any mechanism, nor provide any support. If
                            you are giving them .pyc files, just include the .py files as well. You
                            don't even have to GPL your code, you just have to abide by the GPL
                            (i.e., provide source); you could distribute your code under any
                            GPL-compatible license, such as a BSD-style license.

                            All the GPL asks is that you distribute the source with the program, and
                            allow that source to be modified and redistributed. Anything less is
                            against the spirit of the GPL, and as such against the spirit that the
                            original author had in mind when releasing that GPL code; you can try to
                            get around it, but even if it's legal it's not right. And it's probably
                            not legal, since intent *does* matter. If you don't think the GPL is
                            really the intent of the original author, then contact them; they may
                            very well be willing to relicense the code.

                            But as long as you don't mind people seeing, redistributing, and
                            modifying your source, then the GPL is not a problem, just a few extra
                            kilobytes in your distribution. Well, you are also supposed to note
                            somewhere that the source is available under the GPL -- so an extra line
                            in Help>About (or something like that) should be included.

                            --
                            Ian Bicking / ianb@colorstudy .com / http://blog.ianbicking.org

                            Comment

                            • Istvan Albert

                              #15
                              Re: GPL and Python modules.

                              Grant Edwards wrote:
                              [color=blue]
                              > That depend's on your definition of "work".[/color]

                              Executes the tasks it is designed to do.

                              Istvan.

                              Comment

                              Working...