fastai / nbdev

Create delightful software with Jupyter Notebooks
https://nbdev.fast.ai/
Apache License 2.0
4.8k stars 484 forks source link

[Question] How to change the licence from Apache-2.0 to GPL-3.0-only ? #1380

Open Martin15135215 opened 8 months ago

Martin15135215 commented 8 months ago

When I used the command nbdev_new it created a settings.ini with license = apache2., How can I change it to GPL-3.0-only ?

And why is the SPDX short identifier not used?

Martin15135215 commented 6 months ago

I found the possible licence in the setup.py:

https://github.com/fastai/nbdev/blob/96deb7a03bf2cf79a04e1878f67ce099e434e97f/setup.py#L19-L26

First Question:

There is a GPL-3.0-only and GPL-3.0-or-later. what is with gpl3 meant?

Second Question:

How to change a licence in an already created nbdev project?

I did:

➤ nbdev_new
# Please enter a value for repo
repo = test
# Please enter a value for branch
branch = main
# Please enter a value for user
user = test
# Please enter a value for author

And then changed in the settings.ini the licence apache2 from to gpl3, however what do i need to do, that the Licence file changes?

Possible solution: https://github.com/fastai/nbdev/pull/1391

Third Question:

How to create a nbdev project directly with GPL-3.0-only?

I did:

➤ nbdev_new --license gpl3
# Please enter a value for repo
repo = test
# Please enter a value for branch
branch = main
# Please enter a value for user
user = test
# Please enter a value for author
author = test
# Please enter a value for author_email
author_email = test@test.org
# Please enter a value for description
description = test

In the settings.ini, the value for licence was gpl3 however the licence file was still apache2?

So I did a quick check of the code for nbdev_new https://github.com/fastai/nbdev/blob/96deb7a03bf2cf79a04e1878f67ce099e434e97f/nbdev/cli.py#L80

And I think with this URL only the template is downloaded

https://github.com/fastai/nbdev/blob/96deb7a03bf2cf79a04e1878f67ce099e434e97f/nbdev/cli.py#L91

in the template is always with apach2 licence file