setup.py 2.6 KB
Newer Older
J
jrzaurin 已提交
1 2 3
#!/usr/bin/env python3
# flake8: noqa
import os
4

J
jrzaurin 已提交
5 6 7 8 9
import setuptools

pwd = os.path.dirname(__file__)

dev_status = {
J
jrzaurin 已提交
10 11 12 13 14 15
    "0.1": "Development Status :: 1 - Planning",  # v0.1 - skeleton
    "0.2": "Development Status :: 2 - Pre-Alpha",  # v0.2 - some basic functionality
    "0.3": "Development Status :: 3 - Alpha",  # v0.3 - most functionality
    "0.4": "Development Status :: 4 - Beta",  # v0.4 - most functionality + doc
    "1.0": "Development Status :: 5 - Production/Stable",  # v1.0 - most functionality + doc + test  # noqa
    "2.0": "Development Status :: 6 - Mature",  # v2.0 - new functionality?
J
jrzaurin 已提交
16 17 18
}


19 20 21 22 23
with open(os.path.join(pwd, "VERSION")) as f:
    version = f.read().strip()
    assert len(version.split(".")) == 3, "bad version spec"
    majorminor = version.rsplit(".", 1)[0]

24 25 26 27 28 29 30 31 32 33 34 35
extras = {}
extras["test"] = ["pytest", "pytest-cov", "codecov"]
extras["docs"] = [
    "sphinx",
    "sphinx_rtd_theme",
    "recommonmark",
    "sphinx-markdown-tables",
    "sphinx-copybutton",
    "sphinx-autodoc-typehints",
]
extras["quality"] = [
    "black",
36
    "isort",
37 38
    "flake8",
]
39
extras["all"] = extras["test"] + extras["docs"] + extras["quality"]
40

J
jrzaurin 已提交
41 42
# main setup kw args
setup_kwargs = {
J
jrzaurin 已提交
43 44
    "name": "pytorch-widedeep",
    "version": version,
J
jrzaurin 已提交
45
    "description": "Combine tabular data with text and images using Wide and Deep models in Pytorch",
J
jrzaurin 已提交
46
    "long_description": open("pypi_README.md", "r", encoding="utf-8").read(),
J
jrzaurin 已提交
47 48
    "long_description_content_type": "text/markdown",
    # "long_description": long_description,
J
jrzaurin 已提交
49 50
    "author": "Javier Rodriguez Zaurin",
    "author_email": "jrzaurin@gmail.com",
51
    "url": "https://github.com/jrzaurin/pytorch-widedeep",
J
jrzaurin 已提交
52 53
    "license": "MIT",
    "install_requires": [
J
jrzaurin 已提交
54 55 56 57 58
        "pandas",
        "numpy",
        "scipy",
        "scikit-learn",
        "gensim",
J
jrzaurin 已提交
59 60
        "spacy",
        "opencv-contrib-python",
J
jrzaurin 已提交
61
        "imutils",
J
jrzaurin 已提交
62
        "tqdm",
J
jrzaurin 已提交
63
        "torch",
J
jrzaurin 已提交
64
        "torchvision",
65
        "einops",
J
jrzaurin 已提交
66
        "wrapt",
J
jrzaurin 已提交
67
    ],
68
    "extras_require": extras,
69
    "python_requires": ">=3.6.0",
J
jrzaurin 已提交
70
    "classifiers": [
J
jrzaurin 已提交
71
        dev_status[majorminor],
J
jrzaurin 已提交
72 73 74 75 76 77 78 79
        "Environment :: Other Environment",
        "Framework :: Jupyter",
        "Intended Audience :: Science/Research",
        "License :: OSI Approved :: MIT License",
        "Natural Language :: English",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Scientific/Engineering :: Artificial Intelligence",
J
jrzaurin 已提交
80
    ],
J
jrzaurin 已提交
81 82
    "zip_safe": True,
    "packages": setuptools.find_packages(exclude=["test_*.py"]),
J
jrzaurin 已提交
83 84 85
}


J
jrzaurin 已提交
86 87
if __name__ == "__main__":
    setuptools.setup(**setup_kwargs)