# Path: typtop/config.py
# VERSION = "0.2.11"
# DB_NAME = "typtop"
# SEC_DB_PATH = '/etc/typtop.d'
# LOG_DIR = '/var/log/'
# BINDIR = '/usr/local/bin'  # careful pip install does not guarantee
# SYSTEM = ''
# TEST = False
#     TEST = True
# DISTRO = set_distro()
# GROUP = 'shadow' if DISTRO in ('debian') else \
#     'root' if DISTRO in ('fedora', 'arch') else \
#     'wheel' if DISTRO in ('darwin') \
#     else ''
#     SYSTEM = 'OSX'
#     SYSTEM = 'LINUX'
#     SEC_DB_PATH = '/usr/local/etc/typtop.d/' # ETC is not writable due to SIP in OSX
#     SEC_DB_PATH = '/usr/local/etc/typtop.d/'  # Changing from /etc/pam_typtop
# CACHE_SIZE = 5  # Size of the typo cache
# WAITLIST_SIZE = 10   # Size of the waitlist
# PADDED_PW_SIZE = 64  # length of the padded passwords
# EDIT_DIST_CUTOFF = 1.0/10  # fractional distance between the real
# REL_ENT_CUTOFF = 3 # Typo cannot be less than 3 bits in stregth
# LOWER_ENT_CUTOFF = 0  # No point having something like this
# NUMBER_OF_ENTRIES_TO_ALLOW_TYPO_LOGIN = 0  # Number of successful login   (# TODO: set to 30 when done testing)
# NUMBER_OF_DAYS_TO_ALLOW_TYPO_LOGIN = 15  # Number of days since installation
# UPDATE_GAPS = 6 * 60 * 60 # 6 hours, in seconds
# WARM_UP_CACHE = 1  # Should the cache be warmed up or not.
# HEADER_CTX = 'HeaderCtx'
# HMAC_SALT = 'HMACSalt'
# FREQ_COUNTS = 'FreqCounts'
# REAL_PW = 'RealPassword'
# ENC_PK = 'EncPublicKey'
# INDEX_J = 'IndexJ'
# ALLOWED_TYPO_LOGIN = 'AllowedTypoLogin'
# LOGIN_COUNT = 'LoginCount'
# INSTALLATION_ID = 'InstallationId'
# INSTALLATION_DATE = 'InstallationDate'
# ALLOWED_LOGGING = 'AllowLogging'
# ALLOWED_UPLOAD = 'AllowUpload'
# LOG_LAST_SENTTIME = 'LastLogSetntTime'
# LOG_SENT_PERIOD = 'PeriodForSendingLog' # How frequently to send the logs
# SYSTEM_STATUS = 'SystemStatus'
# SYSTEM_STATUS_PW_CHANGED = 'PasswordChanged'
# SYSTEM_STATUS_ALL_GOOD = 'StatusAllGood'
# SYSTEM_STATUS_CORRUPTED_DB = 'StatusCorruptedDB'
# SYSTEM_STATUS_NOT_INITIALIZED = 'NotInitialized'
# TYPO_CACHE = "TypoCache"  # PW Encryption of sk
# WAIT_LIST = 'WaitList'  # PK encryption of typo and timestamp
# GITHUB_URL = 'https://github.com/rchatterjee/pam-typopw'  # URL in github repo
# def set_distro():
# def warm_up_with(pw):


import sys
    import subprocess
    import subprocess
    import subprocess
from typtop.config import (
    VERSION, set_distro, first_msg, GITHUB_URL
)
from setuptools import setup
PACMAN = {
    'debian': 'apt-get install -y'.split(),
    'fedora': 'yum install -y'.split(),
    'darwin': [],
    'arch': [],
}[DISTRO]

PYTHON_DEPS = [
    'cryptography==1.8.1',
    # 'pycryptodome',
    'word2keypress>=1.0.10',
    # 'dataset',
    'zxcvbn-python==4.4.14',
    'requests==2.13', # 2.12 has issue with x509 cetificate
    'pyyaml==3.12',
    'distro==1.0.2',
]

OPTIONS = {
    'argv_emulation': True,
    # 'packages': ['requests', 'requests', 'selenium']
}


TEST_REQUIRES = ['python-pam', 'pytest']

setup(
    name='typtop',   # 'loginwitherror',
    # app=['typtop/dbaccess.py'],
    packages=['typtop'], # this must be the same as the name above

# Path: typtop/config.py
# VERSION = "0.2.11"
# DB_NAME = "typtop"
# SEC_DB_PATH = '/etc/typtop.d'
# LOG_DIR = '/var/log/'
# BINDIR = '/usr/local/bin'  # careful pip install does not guarantee
# SYSTEM = ''
# TEST = False
#     TEST = True
# DISTRO = set_distro()
# GROUP = 'shadow' if DISTRO in ('debian') else \
#     'root' if DISTRO in ('fedora', 'arch') else \
#     'wheel' if DISTRO in ('darwin') \
#     else ''
#     SYSTEM = 'OSX'
#     SYSTEM = 'LINUX'
#     SEC_DB_PATH = '/usr/local/etc/typtop.d/' # ETC is not writable due to SIP in OSX
#     SEC_DB_PATH = '/usr/local/etc/typtop.d/'  # Changing from /etc/pam_typtop
# CACHE_SIZE = 5  # Size of the typo cache
# WAITLIST_SIZE = 10   # Size of the waitlist
# PADDED_PW_SIZE = 64  # length of the padded passwords
# EDIT_DIST_CUTOFF = 1.0/10  # fractional distance between the real
# REL_ENT_CUTOFF = 3 # Typo cannot be less than 3 bits in stregth
# LOWER_ENT_CUTOFF = 0  # No point having something like this
# NUMBER_OF_ENTRIES_TO_ALLOW_TYPO_LOGIN = 0  # Number of successful login   (# TODO: set to 30 when done testing)
# NUMBER_OF_DAYS_TO_ALLOW_TYPO_LOGIN = 15  # Number of days since installation
# UPDATE_GAPS = 6 * 60 * 60 # 6 hours, in seconds
# WARM_UP_CACHE = 1  # Should the cache be warmed up or not.
# HEADER_CTX = 'HeaderCtx'
# HMAC_SALT = 'HMACSalt'
# FREQ_COUNTS = 'FreqCounts'
# REAL_PW = 'RealPassword'
# ENC_PK = 'EncPublicKey'
# INDEX_J = 'IndexJ'
# ALLOWED_TYPO_LOGIN = 'AllowedTypoLogin'
# LOGIN_COUNT = 'LoginCount'
# INSTALLATION_ID = 'InstallationId'
# INSTALLATION_DATE = 'InstallationDate'
# ALLOWED_LOGGING = 'AllowLogging'
# ALLOWED_UPLOAD = 'AllowUpload'
# LOG_LAST_SENTTIME = 'LastLogSetntTime'
# LOG_SENT_PERIOD = 'PeriodForSendingLog' # How frequently to send the logs
# SYSTEM_STATUS = 'SystemStatus'
# SYSTEM_STATUS_PW_CHANGED = 'PasswordChanged'
# SYSTEM_STATUS_ALL_GOOD = 'StatusAllGood'
# SYSTEM_STATUS_CORRUPTED_DB = 'StatusCorruptedDB'
# SYSTEM_STATUS_NOT_INITIALIZED = 'NotInitialized'
# TYPO_CACHE = "TypoCache"  # PW Encryption of sk
# WAIT_LIST = 'WaitList'  # PK encryption of typo and timestamp
# GITHUB_URL = 'https://github.com/rchatterjee/pam-typopw'  # URL in github repo
# def set_distro():
# def warm_up_with(pw):


# Path: setup.py
import sys
    import subprocess
    import subprocess
    import subprocess
from typtop.config import (
    VERSION, set_distro, first_msg, GITHUB_URL
)
from setuptools import setup

PACMAN = {
    'debian': 'apt-get install -y'.split(),
    'fedora': 'yum install -y'.split(),
    'darwin': [],
    'arch': [],
}[DISTRO]

PYTHON_DEPS = [
    'cryptography==1.8.1',
    # 'pycryptodome',
    'word2keypress>=1.0.10',
    # 'dataset',
    'zxcvbn-python==4.4.14',
    'requests==2.13', # 2.12 has issue with x509 cetificate
    'pyyaml==3.12',
    'distro==1.0.2',
]

OPTIONS = {
    'argv_emulation': True,
    # 'packages': ['requests', 'requests', 'selenium']
}


TEST_REQUIRES = ['python-pam', 'pytest']

setup(
    name='typtop',   # 'loginwitherror',
    # app=['typtop/dbaccess.py'],
    packages=['typtop'], # this must be the same as the name above

    version=VERSION,