[Bug 269876] misc/py-openai: Missing some dependencies

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 28 Feb 2023 14:28:11 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269876

            Bug ID: 269876
           Summary: misc/py-openai: Missing some dependencies
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: yuri@freebsd.org
          Reporter: rhurlin@FreeBSD.org
          Assignee: yuri@freebsd.org
             Flags: maintainer-feedback?(yuri@freebsd.org)

Created attachment 240481
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=240481&action=edit
Patch to add some RUN_DEPENDS

Many thanks for this new port! Very appreciated and needed for example for the
QGIS plugin QChatGPT :)

Unfortunately using py-openai is broken because of missing depencencies,
escpecially py-aiohttp:

# python3
Python 3.9.16 (main, Feb 28 2023, 07:54:21) 
[Clang 15.0.7 (https://github.com/llvm/llvm-project.git llvmorg-15.0.7-0-g8dfdc
on freebsd14
Type "help", "copyright", "credits" or "license" for more information.
>>> import openai
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/site-packages/openai/__init__.py", line 9, in
<module>
    from openai.api_resources import (
  File
"/usr/local/lib/python3.9/site-packages/openai/api_resources/__init__.py", line
1, in <module>
    from openai.api_resources.completion import Completion  # noqa: F401
  File
"/usr/local/lib/python3.9/site-packages/openai/api_resources/completion.py",
line 4, in <module>
    from openai.api_resources.abstract import DeletableAPIResource,
ListableAPIResource
  File
"/usr/local/lib/python3.9/site-packages/openai/api_resources/abstract/__init__.py",
line 3, in <module>
    from openai.api_resources.abstract.api_resource import APIResource
  File
"/usr/local/lib/python3.9/site-packages/openai/api_resources/abstract/api_resource.py",
line 4, in <module>
    from openai import api_requestor, error, util
  File "/usr/local/lib/python3.9/site-packages/openai/api_requestor.py", line
21, in <module>
    import aiohttp
ModuleNotFoundError: No module named 'aiohttp'


In misc/py-openai, setup.cfg:l.23-25 contains information about needed
dependencies. The attached patch should solve this. The file setup.cfg has some
more dependencies, which could be useful for using openai.

-- 
You are receiving this mail because:
You are the assignee for the bug.