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 @@ -143,6 +143,9 @@ def getClassifiersLicense() -> dict[str, Any]:
143143 return tool ["poetry" ]
144144 if "flit" in tool :
145145 return tool ["flit" ]["metadata" ]
146+ if pyproject .get ("project" ) is not None :
147+ return pyproject ["project" ]
148+
146149 return {"classifiers" : [], "license" : "" }
147150
148151
@@ -158,7 +161,10 @@ def getMyPackageLicense() -> str:
158161 if licenseClassifier != UNKNOWN :
159162 return licenseClassifier
160163 if "license" in metaData :
161- return str (metaData ["license" ])
164+ if isinstance (metaData ["license" ], dict ) and metaData ["license" ].get ("text" ) is not None :
165+ return str (metaData ["license" ].get ("text" ))
166+ else :
167+ return str (metaData ["license" ])
162168 return input ("Enter the project license" )
163169
164170
You can’t perform that action at this time.
0 commit comments