|
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) # nosec |
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 |
| - "cliff", # For CLI framework |
32 |
| - "requests>=2.20", # to get the patch for CVE-2018-18074 |
33 |
| - "tqdm", # Needed for progress bars |
34 |
| - "python-secrets", # For flexibility in accessing secrets and state apart from source code |
35 |
| - 'tiktoken', # Needed for calculating number of tokens |
36 |
| - 'typing_extensions;python_version<"3.8"', # Needed for type hints for mypy |
37 |
| - "aiohttp", # Needed for async support |
38 |
| - "Pillow", # Needed for manipulating images |
39 |
| - ], |
40 |
| - extras_require={ |
41 |
| - "dev": ["black~=21.6b0", "pytest==6.*", "pytest-asyncio", "pytest-mock"], |
42 |
| - "datalib": DATA_LIBRARIES, |
43 |
| - "wandb": [ |
44 |
| - "wandb", |
45 |
| - *DATA_LIBRARIES, |
46 |
| - ], |
47 |
| - "embeddings": [ |
48 |
| - "scikit-learn>=1.0.2", # Needed for embedding utils, versions >= 1.1 require python 3.8 |
49 |
| - "tenacity>=8.0.1", |
50 |
| - "matplotlib", |
51 |
| - "sklearn", |
52 |
| - "plotly", |
53 |
| - *DATA_LIBRARIES, |
54 |
| - ], |
55 |
| - }, |
56 |
| - python_requires=">=3.7.1", |
57 |
| - entry_points={ |
58 |
| - "console_scripts": [ |
59 |
| - "openai=openai._openai_scripts:main", |
60 |
| - "ocd=ocd.__main__:main", |
61 |
| - ], |
62 |
| - "ocd": [ |
63 |
| - "completions create=ocd.completions.create:CompletionsCreate", |
64 |
| - "edits create=ocd.edits.create:EditsCreate", |
65 |
| - "fine-tune list=ocd.fine_tune.list:FineTuneList", |
66 |
| - "images create=ocd.images.create:ImagesCreate", |
67 |
| - "models list=ocd.models.list:ModelsList", |
68 |
| - "models retrieve=ocd.models.retrieve:ModelsRetrieve", |
69 |
| - "models overview=ocd.models.overview:ModelsOverview", |
70 |
| - "text analyze=ocd.text.analyze:TextAnalyze", |
71 |
| - ] |
72 |
| - }, |
73 |
| - packages=find_packages(exclude=["tests", "tests.*"]), |
74 |
| - package_data={ |
75 |
| - "openai": [ |
76 |
| - "py.typed", |
77 |
| - ] |
78 |
| - }, |
79 |
| - author="OpenAI", |
80 |
| - author_email="support@openai.com", |
81 |
| - url="https://github.com/openai/openai-python", |
82 |
| -) |
| 3 | +setup() |
0 commit comments