openai/openai-python
Publicmirrored from https://github.com/openai/openai-pythonAvailable
setup.py
67lines · modeblame
3c6d4cd6Greg Brockman5 years ago | 1 | import os |
| 2 | | |
| 3 | from setuptools import find_packages, setup | |
| 4 | | |
| 5 | version_contents = {} | |
40c32f9fRachel Lim5 years ago | 6 | version_path = os.path.join( |
| 7 | os.path.abspath(os.path.dirname(__file__)), "openai/version.py" | |
| 8 | ) | |
| 9 | with open(version_path, "rt") as f: | |
3c6d4cd6Greg Brockman5 years ago | 10 | exec(f.read(), version_contents) |
bbea3dc0Michael Weiss3 years ago | 11 | |
| 12 | with open("README.md", "r") as fh: | |
| 13 | long_description = fh.read() | |
3c6d4cd6Greg Brockman5 years ago | 14 | |
ede08829Jakub Roztocil3 years ago | 15 | |
| 16 | DATA_LIBRARIES = [ | |
| 17 | # These libraries are optional because of their size. See `openai/datalib.py`. | |
| 18 | "numpy", | |
| 19 | "pandas>=1.2.3", # Needed for CLI fine-tuning data preparation tool | |
| 20 | "pandas-stubs>=1.1.0.11", # Needed for type hints for mypy | |
| 21 | "openpyxl>=3.0.7", # Needed for CLI fine-tuning data preparation tool xlsx format | |
| 22 | ] | |
| 23 | | |
3c6d4cd6Greg Brockman5 years ago | 24 | setup( |
| 25 | name="openai", | |
| 26 | description="Python client library for the OpenAI API", | |
bbea3dc0Michael Weiss3 years ago | 27 | long_description=long_description, |
| 28 | long_description_content_type="text/markdown", | |
3c6d4cd6Greg Brockman5 years ago | 29 | version=version_contents["VERSION"], |
| 30 | install_requires=[ | |
40c32f9fRachel Lim5 years ago | 31 | "requests>=2.20", # to get the patch for CVE-2018-18074 |
cf9c04a2Rachel Lim5 years ago | 32 | "tqdm", # Needed for progress bars |
528a5ba1Michal Vasilek3 years ago | 33 | 'typing_extensions;python_version<"3.8"', # Needed for type hints for mypy |
0abf6413Andrew Chen Wang3 years ago | 34 | "aiohttp", # Needed for async support |
3c6d4cd6Greg Brockman5 years ago | 35 | ], |
8f8f791coscar-king4 years ago | 36 | extras_require={ |
0abf6413Andrew Chen Wang3 years ago | 37 | "dev": ["black~=21.6b0", "pytest==6.*", "pytest-asyncio", "pytest-mock"], |
ede08829Jakub Roztocil3 years ago | 38 | "datalib": DATA_LIBRARIES, |
| 39 | "wandb": [ | |
| 40 | "wandb", | |
| 41 | *DATA_LIBRARIES, | |
| 42 | ], | |
8f8f791coscar-king4 years ago | 43 | "embeddings": [ |
15b6354fMichelle Pokrass3 years ago | 44 | "scikit-learn>=1.0.2", # Needed for embedding utils, versions >= 1.1 require python 3.8 |
| 45 | "tenacity>=8.0.1", | |
| 46 | "matplotlib", | |
| 47 | "sklearn", | |
| 48 | "plotly", | |
ede08829Jakub Roztocil3 years ago | 49 | *DATA_LIBRARIES, |
8f8f791coscar-king4 years ago | 50 | ], |
| 51 | }, | |
62f8d40fMadeleine Thompson4 years ago | 52 | python_requires=">=3.7.1", |
3dc4b91eBastian Zimmermann4 years ago | 53 | entry_points={ |
db4750c1Henrique Oliveira Pinto4 years ago | 54 | "console_scripts": [ |
| 55 | "openai=openai._openai_scripts:main", | |
3dc4b91eBastian Zimmermann4 years ago | 56 | ], |
| 57 | }, | |
3c6d4cd6Greg Brockman5 years ago | 58 | packages=find_packages(exclude=["tests", "tests.*"]), |
40c32f9fRachel Lim5 years ago | 59 | package_data={ |
| 60 | "openai": [ | |
| 61 | "py.typed", | |
| 62 | ] | |
| 63 | }, | |
3c6d4cd6Greg Brockman5 years ago | 64 | author="OpenAI", |
| 65 | author_email="support@openai.com", | |
| 66 | url="https://github.com/openai/openai-python", | |
| 67 | ) |