2828from commoncode import fileutils
2929from commoncode .hash import multi_checksums
3030from commoncode .text import python_safe_name
31- from packaging import tags as packaging_tags
32- from packaging import version as packaging_version
31+ from packvers import tags as packaging_tags
32+ from packvers import version as packaging_version
3333
3434import utils_pip_compatibility_tags
3535
115115TRACE_ULTRA_DEEP = False
116116
117117# Supported environments
118- PYTHON_VERSIONS = "36" , " 37" , "38" , "39" , "310"
118+ PYTHON_VERSIONS = "37" , "38" , "39" , "310"
119119
120120PYTHON_DOT_VERSIONS_BY_VER = {
121- "36" : "3.6" ,
122121 "37" : "3.7" ,
123122 "38" : "3.8" ,
124123 "39" : "3.9" ,
@@ -134,7 +133,6 @@ def get_python_dot_version(version):
134133
135134
136135ABIS_BY_PYTHON_VERSION = {
137- "36" : ["cp36" , "cp36m" , "abi3" ],
138136 "37" : ["cp37" , "cp37m" , "abi3" ],
139137 "38" : ["cp38" , "cp38m" , "abi3" ],
140138 "39" : ["cp39" , "cp39m" , "abi3" ],
@@ -912,7 +910,7 @@ def load_pkginfo_data(self, dest_dir=THIRDPARTY_DIR):
912910 declared_license = [raw_data ["License" ]] + [
913911 c for c in classifiers if c .startswith ("License" )
914912 ]
915- license_expression = compute_normalized_license_expression (declared_license )
913+ license_expression = get_license_expression (declared_license )
916914 other_classifiers = [c for c in classifiers if not c .startswith ("License" )]
917915
918916 holder = raw_data ["Author" ]
@@ -1337,10 +1335,10 @@ def package_from_dists(cls, dists):
13371335
13381336 For example:
13391337 >>> w1 = Wheel(name='bitarray', version='0.8.1', build='',
1340- ... python_versions=['cp36 '], abis=['cp36m '],
1338+ ... python_versions=['cp38 '], abis=['cp38m '],
13411339 ... platforms=['linux_x86_64'])
13421340 >>> w2 = Wheel(name='bitarray', version='0.8.1', build='',
1343- ... python_versions=['cp36 '], abis=['cp36m '],
1341+ ... python_versions=['cp38 '], abis=['cp38m '],
13441342 ... platforms=['macosx_10_9_x86_64', 'macosx_10_10_x86_64'])
13451343 >>> sd = Sdist(name='bitarray', version='0.8.1')
13461344 >>> package = PypiPackage.package_from_dists(dists=[w1, w2, sd])
@@ -2274,16 +2272,16 @@ def find_problems(
22742272 check_about (dest_dir = dest_dir )
22752273
22762274
2277- def compute_normalized_license_expression (declared_licenses ):
2275+ def get_license_expression (declared_licenses ):
22782276 """
22792277 Return a normalized license expression or None.
22802278 """
22812279 if not declared_licenses :
22822280 return
22832281 try :
2284- from packagedcode import pypi
2282+ from packagedcode . licensing import get_only_expression_from_extracted_license
22852283
2286- return pypi . compute_normalized_license (declared_licenses )
2284+ return get_only_expression_from_extracted_license (declared_licenses )
22872285 except ImportError :
22882286 # Scancode is not installed, clean and join all the licenses
22892287 lics = [python_safe_name (l ).lower () for l in declared_licenses ]
0 commit comments