File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ description = "A beautiful description."
55authors = [
66 {name = " CMI DAIR" , email = " dair@childmind.org" }
77]
8- license = " LGPL-2.1"
8+ license = " LGPL-2.1-only "
99readme = " README.md"
1010requires-python = " >=3.12"
1111dependencies = []
Original file line number Diff line number Diff line change @@ -27,8 +27,15 @@ def get_license(name: str) -> dict[str, str]:
2727 if name not in LICENSES :
2828 raise ValueError (f"License { name } is not in { LICENSES } ." )
2929 with request .urlopen (f"https://api.github.com/licenses/{ name } " ) as response :
30- license_info = response .read ().decode ()
31- return json .loads (license_info )
30+ license_info_response = response .read ().decode ()
31+ license_info = json .loads (license_info_response )
32+ # The following SPDX identifiers have been deprecated which broke builds.
33+ # Remove once GitHub updates their API or we come up with better solution.
34+ license_info ["spdx_id" ] = {
35+ "LGPL-2.1" : "LGPL-2.1-only" ,
36+ "LGPL-3.0" : "LGPL-3.0-only" ,
37+ }.get (license_info ["spdx_id" ], license_info ["spdx_id" ])
38+ return license_info
3239
3340
3441def modify_license_placeholder_text (selected_license : dict [str , str ]) -> dict [str , str ]:
You can’t perform that action at this time.
0 commit comments