<commit_before>"""
Download and extract MongoDB components.

Use '--help' for more information.
"""
import argparse
import enum
import hashlib
import json
import os
import platform
import re
import shutil
import sqlite3
import sys
import tarfile
import tempfile
import textwrap
import urllib.error
import urllib.request
import zipfile
from collections import namedtuple
from contextlib import contextmanager
from fnmatch import fnmatch
from pathlib import Path, PurePath, PurePosixPath

DISTRO_ID_MAP = {
    'elementary': 'ubuntu',
    'fedora': 'rhel',
    'centos': 'rhel',
    'mint': 'ubuntu',
    'opensuse-leap': 'sles',
    'opensuse': 'sles',
    'redhat': 'rhel',
    'rocky': 'rhel',
}

DISTRO_VERSION_MAP = {
    'elementary': {
        '6': '20.04'
    },
    'fedora': {
        '32': '8',
        '33': '8',
        '34': '8',
        '35': '8',
        '36': '8'
    },
}

DISTRO_ID_TO_TARGET = {
    'ubuntu': {
        '22.*': 'ubuntu2204',
        '20.*': 'ubuntu2004',
        '18.*': 'ubuntu1804',
        '16.*': 'ubuntu1604',
        '14.*': 'ubuntu1404',
    },
    'debian': {
        '9': 'debian92',
        '10': 'debian10',
        '11': 'debian11',
    },
    'rhel': {
        '6': 'rhel60',
        '6.*': 'rhel60',
        '7': 'rhel70',
        '7.*': 'rhel70',
        '8': 'rhel80',
        '8.*': 'rhel80',
    },
    'sles': {
        '10.*': 'suse10',
        '11.*': 'suse11',
        '12.*': 'suse12',
        '13.*': 'suse13',
        '15.*': 'suse15',
    },<commit_msg>build/mongodl.py: Port the build system to Mint (#1115)<commit_after>"""
Download and extract MongoDB components.

Use '--help' for more information.
"""
import argparse
import enum
import hashlib
import json
import os
import platform
import re
import shutil
import sqlite3
import sys
import tarfile
import tempfile
import textwrap
import urllib.error
import urllib.request
import zipfile
from collections import namedtuple
from contextlib import contextmanager
from fnmatch import fnmatch
from pathlib import Path, PurePath, PurePosixPath

DISTRO_ID_MAP = {
    'elementary': 'ubuntu',
    'fedora': 'rhel',
    'centos': 'rhel',
    'mint': 'ubuntu',
    'linuxmint': 'ubuntu',
    'opensuse-leap': 'sles',
    'opensuse': 'sles',
    'redhat': 'rhel',
    'rocky': 'rhel',
}

DISTRO_VERSION_MAP = {
    'elementary': {
        '6': '20.04'
    },
    'fedora': {
        '32': '8',
        '33': '8',
        '34': '8',
        '35': '8',
        '36': '8'
    },
    'linuxmint': {
        '19': '18.04',
        '19.1': '18.04',
        '19.2': '18.04',
        '19.3': '18.04',
        '20': '20.04',
        '20.1': '20.04',
        '20.2': '20.04',
        '20.3': '20.04',
        '21': '22.04'
    },
}

DISTRO_ID_TO_TARGET = {
    'ubuntu': {
        '22.*': 'ubuntu2204',
        '20.*': 'ubuntu2004',
        '18.*': 'ubuntu1804',
        '16.*': 'ubuntu1604',
        '14.*': 'ubuntu1404',
    },
    'debian': {
        '9': 'debian92',
        '10': 'debian10',
        '11': 'debian11',
    },
    'rhel': {
        '6': 'rhel60',
        '6.*': 'rhel60',
        '7': 'rhel70',
        '7.*': 'rhel70',
        '8': 'rhel80',
        '8.*': 'rhel80',
    },
    'sles': {
        '10.*': 'suse10',
        '11.*': 'suse11',
        '12.*': 'suse12',
        '13.*': 'suse13',
        '15.*': 'suse15',
    },
{'fraction_non_alphanumeric': 0.1976639712488769, 'fraction_numerical': 0.07906558849955077, 'mean_word_length': 2.1688804554079697, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '571444', 'n_tokens_mistral': 1420, 'n_tokens_neox': 1241, 'n_words': 300}