File size: 1,615 Bytes
d643072
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import os

import setuptools


def read(rel_path):
    base_path = os.path.abspath(os.path.dirname(__file__))
    with open(os.path.join(base_path, rel_path)) as f:
        return f.read()


def get_version(rel_path):
    for line in read(rel_path).splitlines():
        if line.startswith("__version__"):
            delim = '"' if '"' in line else "'"
            return line.split(delim)[1]

    raise RuntimeError("Unable to find version string.")


if __name__ == "__main__":
    setuptools.setup(
        name="clip-score",
        version=get_version(os.path.join("src", "clip_score", "__init__.py")),
        author="Taited",
        author_email="[email protected]",
        description=("Package for calculating CLIP-Score" " using PyTorch"),
        long_description=read("README.md"),
        long_description_content_type="text/markdown",
        url="https://github.com/taited/clip-score",
        package_dir={"": "src"},
        packages=setuptools.find_packages(where="src"),
        classifiers=[
            "Programming Language :: Python :: 3",
            "License :: OSI Approved :: Apache Software License",
        ],
        python_requires=">=3.5",
        entry_points={
            "console_scripts": [
                "clip-score = clip_score.clip_score:main",
            ],
        },
        install_requires=[
            "numpy",
            "pillow",
            "torch>=1.7.1",
            "torchvision>=0.8.2",
            "ftfy",
            "regex",
            "tqdm",
        ],
        extras_require={"dev": ["flake8", "flake8-bugbear", "flake8-isort", "nox"]},
    )