File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,9 @@ def getClassifiersLicense() -> dict[str, Any]:
136136 return tool ["poetry" ]
137137 if "flit" in tool :
138138 return tool ["flit" ]["metadata" ]
139+ if pyproject .get ("project" ) is not None :
140+ return pyproject ["project" ]
141+
139142 return {"classifiers" : [], "license" : "" }
140143
141144
@@ -150,7 +153,10 @@ def getMyPackageLicense() -> str:
150153 if licenseClassifier != UNKNOWN :
151154 return licenseClassifier
152155 if "license" in metaData :
153- return str (metaData ["license" ])
156+ if isinstance (metaData ["license" ], dict ) and metaData ["license" ].get ("text" ) is not None :
157+ return str (metaData ["license" ].get ("text" ))
158+ else :
159+ return str (metaData ["license" ])
154160 return input ("Enter the project license" )
155161
156162
You can’t perform that action at this time.
0 commit comments