# Path: spdx/version.py
# class Version(object):
#     """
#     Version number composed of major and minor.
#     Fields:
#     - major: Major number, int.
#     - minor: Minor number, int.
#     """
# 
#     VERS_STR_REGEX = re.compile(r"(\d+)\.(\d+)")
# 
#     def __init__(self, major, minor):
#         self.major = int(major)
#         self.minor = int(minor)
# 
#     @classmethod
#     def from_str(cls, value):
#         """Constructs a Version from a string.
#         Returns None if string not in N.N form where N represents a
#         number.
#         """
#         m = cls.VERS_STR_REGEX.match(value)
#         if m is not None:
#             return cls(int(m.group(1)), int(m.group(2)))
#         else:
#             return None
# 
#     def __repr__(self):
#         return "Version" + repr((self.major, self.minor))
# 
#     def __str__(self):
#         return "SPDX-{major}.{minor}".format(**self.__dict__)
# 
#     def __eq__(self, other):
#         return (
#             isinstance(other, self.__class__)
#             and self.major == other.major
#             and self.minor == other.minor
#         )
# 
#     def __lt__(self, other):
#         return self.major < other.major or (
#             self.major == other.major and self.minor < other.minor
#         )


import codecs
import json
import os
from spdx.version import Version
        identifier = lic[id_attribute]
        licenses_map[name] = identifier
        licenses_map[identifier] = name
    return version, licenses_map


def load_license_list(file_name):
    """
    Return the licenses list version tuple and a mapping of licenses
    name->id and id->name loaded from a JSON file
    from https://github.com/spdx/license-list-data
    """
    return _load_list(file_name, object_type="licenses", id_attribute="licenseId")


def load_exception_list(file_name):
    """
    Return the exceptions list version tuple and a mapping of exceptions
    name->id and id->name loaded from a JSON file
    from https://github.com/spdx/license-list-data
    """
    return _load_list(
        file_name, object_type="exceptions", id_attribute="licenseExceptionId"
    )


(_lmajor, _lminor), LICENSE_MAP = load_license_list(_licenses)
LICENSE_LIST_VERSION = Version(major=_lmajor, minor=_lminor)

(_emajor, _eminor), EXCEPTION_MAP = load_exception_list(_exceptions)

# Path: spdx/version.py
# class Version(object):
#     """
#     Version number composed of major and minor.
#     Fields:
#     - major: Major number, int.
#     - minor: Minor number, int.
#     """
# 
#     VERS_STR_REGEX = re.compile(r"(\d+)\.(\d+)")
# 
#     def __init__(self, major, minor):
#         self.major = int(major)
#         self.minor = int(minor)
# 
#     @classmethod
#     def from_str(cls, value):
#         """Constructs a Version from a string.
#         Returns None if string not in N.N form where N represents a
#         number.
#         """
#         m = cls.VERS_STR_REGEX.match(value)
#         if m is not None:
#             return cls(int(m.group(1)), int(m.group(2)))
#         else:
#             return None
# 
#     def __repr__(self):
#         return "Version" + repr((self.major, self.minor))
# 
#     def __str__(self):
#         return "SPDX-{major}.{minor}".format(**self.__dict__)
# 
#     def __eq__(self, other):
#         return (
#             isinstance(other, self.__class__)
#             and self.major == other.major
#             and self.minor == other.minor
#         )
# 
#     def __lt__(self, other):
#         return self.major < other.major or (
#             self.major == other.major and self.minor < other.minor
#         )


# Path: spdx/config.py
import codecs
import json
import os
from spdx.version import Version

        identifier = lic[id_attribute]
        licenses_map[name] = identifier
        licenses_map[identifier] = name
    return version, licenses_map


def load_license_list(file_name):
    """
    Return the licenses list version tuple and a mapping of licenses
    name->id and id->name loaded from a JSON file
    from https://github.com/spdx/license-list-data
    """
    return _load_list(file_name, object_type="licenses", id_attribute="licenseId")


def load_exception_list(file_name):
    """
    Return the exceptions list version tuple and a mapping of exceptions
    name->id and id->name loaded from a JSON file
    from https://github.com/spdx/license-list-data
    """
    return _load_list(
        file_name, object_type="exceptions", id_attribute="licenseExceptionId"
    )


(_lmajor, _lminor), LICENSE_MAP = load_license_list(_licenses)
LICENSE_LIST_VERSION = Version(major=_lmajor, minor=_lminor)

(_emajor, _eminor), EXCEPTION_MAP = load_exception_list(_exceptions)

EXCEPTION_LIST_VERSION = Version(major=_emajor, minor=_eminor)