import setuptools
import re

VERSION_FILE = "retro_bip_utils/_version.py"

with open("README.md", "r") as f:
    long_description = f.read()

def load_version():
    version_line = open(VERSION_FILE).read().rstrip()
    vre = re.compile(r'__version__ = "([^"]+)"')
    matches = vre.findall(version_line)

    if matches and len(matches) > 0:
        return matches[0]
    else:
        raise RuntimeError("Cannot find version string in %s" % VERSION_FILE)

version = load_version()

setuptools.setup(
    name="retro_bip_utils",
    version=version,
    author="Emanuele Bellocchia, A Byte Ahead",
    author_email="laalaguer@gmail.com",
    maintainer="Emanuele Bellocchia, A Byte Ahead",
    maintainer_email="laalaguer@gmail.com",
    description="Implementation of BIP39, BIP32, BIP44, BIP49 and BIP84 for wallet seeds, keys and addresses generation. Supported coins: Bitcoin, Litecoin, Dogecoin, Ethereum.",
    long_description=long_description,
    long_description_content_type="text/markdown",
    url="https://github.com/laalaguer/retro_bip_utils",
    download_url="https://github.com/laalaguer/retro_bip_utils/archive/v%s.tar.gz" % version,
    license="MIT",
    test_suite="tests",
    install_requires = ["ecdsa","eth-hash"],
    packages=["retro_bip_utils"],
    package_data={"retro_bip_utils": ["bip39_wordslist_en.txt"]},
    keywords="bitcoin, litecoin, dogecoin, dash, ethereum, ripple, wallet, hd-wallet, bip39, bip32, bip44, bip49, bip84, python",
    platforms = ["any"],
    classifiers=[
        "Programming Language :: Python :: 3",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Intended Audience :: Developers",
    ],
    python_requires=">=3.6",
)
