Bug 2230745

Summary: [abrt] python3-pip: find_package_name(): setup.py:27:find_package_name:Exception: Can not find valid pkg-config name.
Product: [Fedora] Fedora Reporter: Ahmed M. Farrag <afarrag>
Component: python-pipAssignee: Python Maintainers <python-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 37CC: ksurma, metherid, mhroncok, pviktori, python-maint, python-packagers-sig, TicoTimo, torsava
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/b5cab438b46b988025a6d58a0dcf3330961788a1
Whiteboard: abrt_hash:32dc4e649a276816080511b87dd33e2583cde5c9;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-16 12:34:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: cpuinfo
none
File: environ
none
File: mountinfo
none
File: namespaces
none
File: open_fds none

Description Ahmed M. Farrag 2023-08-10 00:08:17 UTC
Version-Release number of selected component:
python3-pip-22.2.2-3.fc37

Additional info:
reporter:       libreport-2.17.11
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-gnome-code-669742.scope
cmdline:        /usr/bin/python3 /usr/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpkkzr0gdw
crash_function: find_package_name
exception_type: Exception
executable:     /usr/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py
interpreter:    python3-3.11.4-1.fc37.x86_64
kernel:         6.4.6-100.fc37.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
setup.py:27:find_package_name:Exception: Can not find valid pkg-config name.
Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
    main()
  File "/usr/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
    return hook(config_settings)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/build_meta.py", line 177, in get_requires_for_build_wheel
    return self._get_build_requires(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/build_meta.py", line 159, in _get_build_requires
    self.run_setup()
  File "/usr/lib/python3.11/site-packages/setuptools/build_meta.py", line 174, in run_setup
    exec(compile(code, __file__, 'exec'), locals())
  File "setup.py", line 154, in <module>
    ext_options = get_config_posix(get_options())
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "setup.py", line 48, in get_config_posix
    pkg_name = find_package_name()
               ^^^^^^^^^^^^^^^^^^^
  File "setup.py", line 27, in find_package_name
    raise Exception(
Exception: Can not find valid pkg-config name.
Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually

Local variables in innermost frame:
packages: ['mysqlclient', 'mariadb']
pkg: 'mariadb'
cmd: 'pkg-config --exists mariadb'

Comment 1 Ahmed M. Farrag 2023-08-10 00:08:20 UTC
Created attachment 1982668 [details]
File: backtrace

Comment 2 Ahmed M. Farrag 2023-08-10 00:08:21 UTC
Created attachment 1982669 [details]
File: cpuinfo

Comment 3 Ahmed M. Farrag 2023-08-10 00:08:23 UTC
Created attachment 1982670 [details]
File: environ

Comment 4 Ahmed M. Farrag 2023-08-10 00:08:24 UTC
Created attachment 1982671 [details]
File: mountinfo

Comment 5 Ahmed M. Farrag 2023-08-10 00:08:25 UTC
Created attachment 1982672 [details]
File: namespaces

Comment 6 Ahmed M. Farrag 2023-08-10 00:08:27 UTC
Created attachment 1982673 [details]
File: open_fds

Comment 7 Petr Viktorin 2023-08-16 12:34:47 UTC
The project you're installing doesn't have wheels published for Python 3.12 yet, so it's being built from source. You could:
- Check its documentation for what it needs to build from source. It might be: `sudo dnf install mariadb-devel`
- Ask the PyPI maintainer to publish wheels (now is the right time -- Python 3.12.0rc1 will be ABI-compatible with the final 3.12.0 release)

I'll close the bug as it's not an issue in pip, but you can still comment if the above hints don't help. Which project are you installing?