[opensuse-packaging] py2pack crashes because of code in package's setup.py
Hi! I just wanted to package the Python module azure-storage-blob and used py2pack to generate spec file when I ran into this: glaubitz@suse-laptop:~/suse/home:glaubitz:branches:devel:languages:python:azure/python-azure-storage-blob> py2pack generate azure-storage-blob -f python-azure-storage-blob.spec generating spec file for azure-storage-blob... Traceback (most recent call last): File "setup.py", line 46, in <module> ' Uninstall it with "pip uninstall azure-storage".' Exception: This package is incompatible with azure-storage==0.36.0. Uninstall it with "pip uninstall azure-storage". Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/metaextract/utils.py", line 105, in _setup_py_run_from_dir subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) File "/usr/lib64/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/usr/lib64/python3.6/subprocess.py", line 418, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '/usr/bin/python3 setup.py -q --command-packages metaextract metaextract -o /tmp/tmpmcsw3yla ' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/py2pack", line 10, in <module> sys.exit(main()) File "/usr/lib/python3.6/site-packages/py2pack/__init__.py", line 341, in main args.func(args) File "/usr/lib/python3.6/site-packages/py2pack/__init__.py", line 243, in generate _augment_data_from_tarball(args, tarball_file[0], data) File "/usr/lib/python3.6/site-packages/py2pack/__init__.py", line 148, in _augment_data_from_tarball data_archive = meta_utils.from_archive(filename) File "/usr/lib/python3.6/site-packages/metaextract/utils.py", line 134, in from_archive data = _setup_py_run_from_dir(root_dir, py_interpreter) File "/usr/lib/python3.6/site-packages/metaextract/utils.py", line 109, in _setup_py_run_from_dir subprocess.check_output(cmd, shell=True) File "/usr/lib64/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/usr/lib64/python3.6/subprocess.py", line 418, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '/usr/bin/python3 setup.py -q --command-packages metaextract metaextract -o /tmp/tmpmcsw3yla ' returned non-zero exit status 1. glaubitz@suse-laptop:~/suse/home:glaubitz:branches:devel:languages:python:azure/python-azure-storage-blob> At first glance it looks the setup.py file generates an exception because the module azure-storage is installed. And, in fact, removing "python-azure*" and "python3-azure*" from my machine fixes the problem immediately. Any suggestion what to do with this issue? I would consider that a bug in "py2pack", OTOH I'm not sure what "py2pack" can do when the setup.py of a Python module generates an exception. Adrian -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi Adrian, On 10/4/18 2:11 PM, John Paul Adrian Glaubitz wrote:
Hi!
I just wanted to package the Python module azure-storage-blob and used py2pack to generate spec file when I ran into this:
glaubitz@suse-laptop:~/suse/home:glaubitz:branches:devel:languages:python:azure/python-azure-storage-blob> py2pack generate azure-storage-blob -f python-azure-storage-blob.spec generating spec file for azure-storage-blob... Traceback (most recent call last): File "setup.py", line 46, in <module> ' Uninstall it with "pip uninstall azure-storage".' Exception: This package is incompatible with azure-storage==0.36.0. Uninstall it with "pip uninstall azure-storage". Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/metaextract/utils.py", line 105, in _setup_py_run_from_dir subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) File "/usr/lib64/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/usr/lib64/python3.6/subprocess.py", line 418, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '/usr/bin/python3 setup.py -q --command-packages metaextract metaextract -o /tmp/tmpmcsw3yla ' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/bin/py2pack", line 10, in <module> sys.exit(main()) File "/usr/lib/python3.6/site-packages/py2pack/__init__.py", line 341, in main args.func(args) File "/usr/lib/python3.6/site-packages/py2pack/__init__.py", line 243, in generate _augment_data_from_tarball(args, tarball_file[0], data) File "/usr/lib/python3.6/site-packages/py2pack/__init__.py", line 148, in _augment_data_from_tarball data_archive = meta_utils.from_archive(filename) File "/usr/lib/python3.6/site-packages/metaextract/utils.py", line 134, in from_archive data = _setup_py_run_from_dir(root_dir, py_interpreter) File "/usr/lib/python3.6/site-packages/metaextract/utils.py", line 109, in _setup_py_run_from_dir subprocess.check_output(cmd, shell=True) File "/usr/lib64/python3.6/subprocess.py", line 336, in check_output **kwargs).stdout File "/usr/lib64/python3.6/subprocess.py", line 418, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '/usr/bin/python3 setup.py -q --command-packages metaextract metaextract -o /tmp/tmpmcsw3yla ' returned non-zero exit status 1. glaubitz@suse-laptop:~/suse/home:glaubitz:branches:devel:languages:python:azure/python-azure-storage-blob>
At first glance it looks the setup.py file generates an exception because the module azure-storage is installed. And, in fact, removing "python-azure*" and "python3-azure*" from my machine fixes the problem immediately.
Any suggestion what to do with this issue? I would consider that a bug in "py2pack",
It's a problem in metaextract (the underlying module which does the metadata extraction). "python3 setup.py --command-packages=metaextract metaextract" is the reproducer when calling from the unpacked source tarball directory.
OTOH I'm not sure what "py2pack" can do when the setup.py of a Python module generates an exception.
Me neither. You could run py2pack from a virtualenv to avoid the problem. Best, Tom -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (2)
-
John Paul Adrian Glaubitz
-
Thomas Bechtold