|
1 | | -import os |
| 1 | +from setuptools import setup |
2 | 2 |
|
3 | | -from setuptools import find_packages, setup |
4 | | - |
5 | | -version_contents = {} |
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: |
10 | | - exec(f.read(), version_contents) |
11 | | - |
12 | | -with open("README.md", "r") as fh: |
13 | | - long_description = fh.read() |
14 | | - |
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 | | - |
24 | | -setup( |
25 | | - name="openai", |
26 | | - description="Python client library for the OpenAI API", |
27 | | - long_description=long_description, |
28 | | - long_description_content_type="text/markdown", |
29 | | - version=version_contents["VERSION"], |
30 | | - install_requires=[ |
31 | | - "requests>=2.20", # to get the patch for CVE-2018-18074 |
32 | | - "tqdm", # Needed for progress bars |
33 | | - 'typing_extensions;python_version<"3.8"', # Needed for type hints for mypy |
34 | | - "aiohttp", # Needed for async support |
35 | | - ], |
36 | | - extras_require={ |
37 | | - "dev": ["black~=21.6b0", "pytest==6.*", "pytest-asyncio", "pytest-mock"], |
38 | | - "datalib": DATA_LIBRARIES, |
39 | | - "wandb": [ |
40 | | - "wandb", |
41 | | - *DATA_LIBRARIES, |
42 | | - ], |
43 | | - "embeddings": [ |
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", |
49 | | - *DATA_LIBRARIES, |
50 | | - ], |
51 | | - }, |
52 | | - python_requires=">=3.7.1", |
53 | | - entry_points={ |
54 | | - "console_scripts": [ |
55 | | - "openai=openai._openai_scripts:main", |
56 | | - ], |
57 | | - }, |
58 | | - packages=find_packages(exclude=["tests", "tests.*"]), |
59 | | - package_data={ |
60 | | - "openai": [ |
61 | | - "py.typed", |
62 | | - ] |
63 | | - }, |
64 | | - author="OpenAI", |
65 | | - author_email="support@openai.com", |
66 | | - url="https://github.com/openai/openai-python", |
67 | | -) |
| 3 | +setup() |
0 commit comments