You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Chamila De Alwis <ch...@wso2.com> on 2014/11/07 04:47:07 UTC

Pure Python library for Git

Hi Imesh,

>From a brief research I did, I could find only few libraries for Python
which doesn't make use of the Git binary file. The more mature one is
called Dulwich[1]. There is also another library called pygit2[2] which is
a C Bindings module for libgit2[3].

Unfortunately we can't use Dulwich in our code since it is licensed GPLv2,
which is incompatible with Apache[4].

However pygit2 is licensed GPLv2 with "linking exception", which allows the
use of the compiled file without any restrictions of the GPL.

Therefore, as of now, there is the serious issue of not having any pure
Python implementation of Git under Apache license to be used in the Python
cartridge agent. There is also the option of writing a similar library
anew, which would be time consuming.


[1] - https://www.samba.org/~jelmer/dulwich/
[2] - http://www.pygit2.org/index.html
[3] - https://libgit2.github.com/
[4] - http://www.apache.org/legal/resolved.html#category-x


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com

Re: Pure Python library for Git

Posted by Chamila De Alwis <ch...@wso2.com>.
Hi Dinesh,

I tried to use Gittle earlier, but it has several issues, the main being
it's ambiguous license nature. It is said to be "dual licensed" with GPLv2
and Apache. It was later decided to drop its usage because of this.
Additionally it also doesn't properly support authentication.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Fri, Nov 7, 2014 at 11:50 AM, Dinesh Bandara <di...@wso2.com> wrote:

> Hi Chamila,
>
> I found [1] which is built upon Dulwich
>
> [1] https://github.com/FriendCode/gittle
>
> On Fri, Nov 7, 2014 at 11:06 AM, Chamila De Alwis <ch...@wso2.com>
> wrote:
>
>> Hi Lahiru,
>>
>> GitPython requires the Git binary to work for most commands. Plus it
>> doesn't support authentication of any kind as of now. The requirement is
>> that the library should not depend on the git binary to interact with the
>> git index.
>>
>>
>> Regards,
>> Chamila de Alwis
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>> On Fri, Nov 7, 2014 at 9:25 AM, Lahiru Sandaruwan <la...@wso2.com>
>> wrote:
>>
>>> Did you see https://github.com/gitpython-developers/GitPython
>>>
>>> It is new BSD.
>>>
>>> On Fri, Nov 7, 2014 at 9:17 AM, Chamila De Alwis <ch...@wso2.com>
>>> wrote:
>>>
>>>> Hi Imesh,
>>>>
>>>> From a brief research I did, I could find only few libraries for Python
>>>> which doesn't make use of the Git binary file. The more mature one is
>>>> called Dulwich[1]. There is also another library called pygit2[2] which is
>>>> a C Bindings module for libgit2[3].
>>>>
>>>> Unfortunately we can't use Dulwich in our code since it is licensed
>>>> GPLv2, which is incompatible with Apache[4].
>>>>
>>>> However pygit2 is licensed GPLv2 with "linking exception", which allows
>>>> the use of the compiled file without any restrictions of the GPL.
>>>>
>>>> Therefore, as of now, there is the serious issue of not having any pure
>>>> Python implementation of Git under Apache license to be used in the Python
>>>> cartridge agent. There is also the option of writing a similar library
>>>> anew, which would be time consuming.
>>>>
>>>>
>>>> [1] - https://www.samba.org/~jelmer/dulwich/
>>>> [2] - http://www.pygit2.org/index.html
>>>> [3] - https://libgit2.github.com/
>>>> [4] - http://www.apache.org/legal/resolved.html#category-x
>>>>
>>>>
>>>> Regards,
>>>> Chamila de Alwis
>>>> Software Engineer | WSO2 | +94772207163
>>>> Blog: code.chamiladealwis.com
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> --
>>> Lahiru Sandaruwan
>>> Committer and PMC member, Apache Stratos,
>>> Senior Software Engineer,
>>> WSO2 Inc., http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>>
>>>
>>
>
>
> --
> *Dinesh Bandara*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
>

Re: Pure Python library for Git

Posted by Dinesh Bandara <di...@wso2.com>.
Hi Chamila,

I found [1] which is built upon Dulwich

[1] https://github.com/FriendCode/gittle

On Fri, Nov 7, 2014 at 11:06 AM, Chamila De Alwis <ch...@wso2.com> wrote:

> Hi Lahiru,
>
> GitPython requires the Git binary to work for most commands. Plus it
> doesn't support authentication of any kind as of now. The requirement is
> that the library should not depend on the git binary to interact with the
> git index.
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> On Fri, Nov 7, 2014 at 9:25 AM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>> Did you see https://github.com/gitpython-developers/GitPython
>>
>> It is new BSD.
>>
>> On Fri, Nov 7, 2014 at 9:17 AM, Chamila De Alwis <ch...@wso2.com>
>> wrote:
>>
>>> Hi Imesh,
>>>
>>> From a brief research I did, I could find only few libraries for Python
>>> which doesn't make use of the Git binary file. The more mature one is
>>> called Dulwich[1]. There is also another library called pygit2[2] which is
>>> a C Bindings module for libgit2[3].
>>>
>>> Unfortunately we can't use Dulwich in our code since it is licensed
>>> GPLv2, which is incompatible with Apache[4].
>>>
>>> However pygit2 is licensed GPLv2 with "linking exception", which allows
>>> the use of the compiled file without any restrictions of the GPL.
>>>
>>> Therefore, as of now, there is the serious issue of not having any pure
>>> Python implementation of Git under Apache license to be used in the Python
>>> cartridge agent. There is also the option of writing a similar library
>>> anew, which would be time consuming.
>>>
>>>
>>> [1] - https://www.samba.org/~jelmer/dulwich/
>>> [2] - http://www.pygit2.org/index.html
>>> [3] - https://libgit2.github.com/
>>> [4] - http://www.apache.org/legal/resolved.html#category-x
>>>
>>>
>>> Regards,
>>> Chamila de Alwis
>>> Software Engineer | WSO2 | +94772207163
>>> Blog: code.chamiladealwis.com
>>>
>>>
>>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>


-- 
*Dinesh Bandara*
Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

Re: Pure Python library for Git

Posted by Chamila De Alwis <ch...@wso2.com>.
On Fri, Nov 7, 2014 at 11:15 PM, Imesh Gunaratne <im...@apache.org> wrote:

> AFAIK it would not be a problem if we do not package the dependent library
> with our source or binary distribution.
>

Then we'll use Dulwich. It is said to be a primitive interface, but I think
it can be built upon.



Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com

Re: Pure Python library for Git

Posted by Imesh Gunaratne <im...@apache.org>.
On Fri, Nov 7, 2014 at 12:35 PM, Chamila De Alwis <ch...@wso2.com> wrote:

> Wouldn't the license involve usage even if we are not packing it along
> with the source?
>
> AFAIK it would not be a problem if we do not package the dependent library
with our source or binary distribution.


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: Pure Python library for Git

Posted by Chamila De Alwis <ch...@wso2.com>.
Hi Imesh,


On Fri, Nov 7, 2014 at 12:06 PM, Imesh Gunaratne <im...@apache.org> wrote:

> If we find Dulwich as the best option we can resolve the licensing issue
> by not packaging it with python agent.


Wouldn't the license involve usage even if we are not packing it along with
the source?


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com

Re: Pure Python library for Git

Posted by Imesh Gunaratne <im...@apache.org>.
Hi Chamila,

Dulwich seems to be a good option, will also review what Dinesh has
suggested.

If we find Dulwich as the best option we can resolve the licensing issue by
not packaging it with python agent. Stratos installation instructions can
be updated to download and install it at the installation time. WDYT?

Thanks

On Fri, Nov 7, 2014 at 11:06 AM, Chamila De Alwis <ch...@wso2.com> wrote:

> Hi Lahiru,
>
> GitPython requires the Git binary to work for most commands. Plus it
> doesn't support authentication of any kind as of now. The requirement is
> that the library should not depend on the git binary to interact with the
> git index.
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> On Fri, Nov 7, 2014 at 9:25 AM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>> Did you see https://github.com/gitpython-developers/GitPython
>>
>> It is new BSD.
>>
>> On Fri, Nov 7, 2014 at 9:17 AM, Chamila De Alwis <ch...@wso2.com>
>> wrote:
>>
>>> Hi Imesh,
>>>
>>> From a brief research I did, I could find only few libraries for Python
>>> which doesn't make use of the Git binary file. The more mature one is
>>> called Dulwich[1]. There is also another library called pygit2[2] which is
>>> a C Bindings module for libgit2[3].
>>>
>>> Unfortunately we can't use Dulwich in our code since it is licensed
>>> GPLv2, which is incompatible with Apache[4].
>>>
>>> However pygit2 is licensed GPLv2 with "linking exception", which allows
>>> the use of the compiled file without any restrictions of the GPL.
>>>
>>> Therefore, as of now, there is the serious issue of not having any pure
>>> Python implementation of Git under Apache license to be used in the Python
>>> cartridge agent. There is also the option of writing a similar library
>>> anew, which would be time consuming.
>>>
>>>
>>> [1] - https://www.samba.org/~jelmer/dulwich/
>>> [2] - http://www.pygit2.org/index.html
>>> [3] - https://libgit2.github.com/
>>> [4] - http://www.apache.org/legal/resolved.html#category-x
>>>
>>>
>>> Regards,
>>> Chamila de Alwis
>>> Software Engineer | WSO2 | +94772207163
>>> Blog: code.chamiladealwis.com
>>>
>>>
>>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: Pure Python library for Git

Posted by Chamila De Alwis <ch...@wso2.com>.
Hi Lahiru,

GitPython requires the Git binary to work for most commands. Plus it
doesn't support authentication of any kind as of now. The requirement is
that the library should not depend on the git binary to interact with the
git index.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Fri, Nov 7, 2014 at 9:25 AM, Lahiru Sandaruwan <la...@wso2.com> wrote:

> Did you see https://github.com/gitpython-developers/GitPython
>
> It is new BSD.
>
> On Fri, Nov 7, 2014 at 9:17 AM, Chamila De Alwis <ch...@wso2.com>
> wrote:
>
>> Hi Imesh,
>>
>> From a brief research I did, I could find only few libraries for Python
>> which doesn't make use of the Git binary file. The more mature one is
>> called Dulwich[1]. There is also another library called pygit2[2] which is
>> a C Bindings module for libgit2[3].
>>
>> Unfortunately we can't use Dulwich in our code since it is licensed
>> GPLv2, which is incompatible with Apache[4].
>>
>> However pygit2 is licensed GPLv2 with "linking exception", which allows
>> the use of the compiled file without any restrictions of the GPL.
>>
>> Therefore, as of now, there is the serious issue of not having any pure
>> Python implementation of Git under Apache license to be used in the Python
>> cartridge agent. There is also the option of writing a similar library
>> anew, which would be time consuming.
>>
>>
>> [1] - https://www.samba.org/~jelmer/dulwich/
>> [2] - http://www.pygit2.org/index.html
>> [3] - https://libgit2.github.com/
>> [4] - http://www.apache.org/legal/resolved.html#category-x
>>
>>
>> Regards,
>> Chamila de Alwis
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>

Re: Pure Python library for Git

Posted by Lahiru Sandaruwan <la...@wso2.com>.
Did you see https://github.com/gitpython-developers/GitPython

It is new BSD.

On Fri, Nov 7, 2014 at 9:17 AM, Chamila De Alwis <ch...@wso2.com> wrote:

> Hi Imesh,
>
> From a brief research I did, I could find only few libraries for Python
> which doesn't make use of the Git binary file. The more mature one is
> called Dulwich[1]. There is also another library called pygit2[2] which is
> a C Bindings module for libgit2[3].
>
> Unfortunately we can't use Dulwich in our code since it is licensed GPLv2,
> which is incompatible with Apache[4].
>
> However pygit2 is licensed GPLv2 with "linking exception", which allows
> the use of the compiled file without any restrictions of the GPL.
>
> Therefore, as of now, there is the serious issue of not having any pure
> Python implementation of Git under Apache license to be used in the Python
> cartridge agent. There is also the option of writing a similar library
> anew, which would be time consuming.
>
>
> [1] - https://www.samba.org/~jelmer/dulwich/
> [2] - http://www.pygit2.org/index.html
> [3] - https://libgit2.github.com/
> [4] - http://www.apache.org/legal/resolved.html#category-x
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>


-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146