You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some cases, I have to build Conan package in specific build folder. So, I'm using corresponding --output-folder with this approach.
But there's a problem with python-require package. Running conan export-pkg command on python-require package results an error - A python-require cannot be export-pkg
Interesting note: Despite an error, looks like the package is actually exports to cache and an assertion fails later (conan list command show newly created package in cache).
Logs
conan_utils/2.0.2: Exported: conan_utils/2.0.2#d52343939be22b0ecd71de27769573ac (2023-09-25 15:07:33 UTC)
ERROR: Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/conan/cli/cli.py", line 272, in main
cli.run(args)
File "/opt/homebrew/lib/python3.11/site-packages/conan/cli/cli.py", line 172, in run
command.run(self._conan_api, args[0][1:])
File "/opt/homebrew/lib/python3.11/site-packages/conan/cli/command.py", line 125, in run
info = self._method(conan_api, parser, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/conan/cli/commands/export_pkg.py", line 52, in export_pkg
assert conanfile.package_type != "python-require", "A python-require cannot be export-pkg"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: A python-require cannot be export-pkg
ERROR: A python-require cannot be export-pkg
The text was updated successfully, but these errors were encountered:
Indeed every stacktrace should be considered as a bug and fixed.
In this case it seems the fix would be a better error message, but the protection would still be there. A python_require is only a conanfile.py recipe, but it does not contain binaries, so it cannot be export-pkg. It can be conan export or even conan create (which is an alias to conan export for python_requires). But the conan export-pkg command is a very specific command to package pre-compiled binaries from user space, which doesn't make sense for python_requires packages.
We will check the behavior and messages, it probably should avoid the initial export completely, and fail earlier, but lets have a look.
I am proposing #14819 for a better error message and avoiding the export.
The issue is that conan create and also export-pkg have associated other mechanisms like the export of binaries, running the test_package test, or storing the information in lockfiles or the --format=json. Trying to do the equivalent of a conan create for a python-require inside export-pkg will be quite dirty.
Environment details
Steps to reproduce
For some cases, I have to build Conan package in specific build folder. So, I'm using corresponding
--output-folder
with this approach.But there's a problem with
python-require
package. Runningconan export-pkg
command on python-require package results an error -A python-require cannot be export-pkg
Interesting note: Despite an error, looks like the package is actually exports to cache and an assertion fails later (
conan list
command show newly created package in cache).Logs
The text was updated successfully, but these errors were encountered: