Open me21 opened 12 months ago
The thing is a zip file is downloaded while the code expected .tar.gz.
After applying a fix in python.rb
similar to https://github.com/bugfood/fpm/commit/839d5424f62dd4d5dbf106461080ef9490dd3633, the archive extracts and fpm fails further:
fetching package metadata {:setup_cmd=>"env PYTHONPATH=/var/lib/gems/2.5.0/gems/fpm-1.15.1/lib/fpm/package:$PYTHONPATH python3 setup.py --command-packages=pyfpm get_metadata --output=/tmp/package-python-build-3ed2fb11ec8950b8ffe2244d76bc3ba2328fa1b6f9d5e68c4c73c2257c06/metadata.json", :level=>:info}
Running from numpy source directory. {:level=>:info}
Traceback (most recent call last): {:level=>:info}
File "setup.py", line 448, in <module> {:level=>:info}
setup_package() {:level=>:info}
File "setup.py", line 421, in setup_package {:level=>:info}
run_build = parse_setuppy_commands() {:level=>:info}
File "setup.py", line 357, in parse_setuppy_commands {:level=>:info}
raise RuntimeError("Unrecognized setuptools command: {}".format(args)) {:level=>:info}
RuntimeError: Unrecognized setuptools command: ['--command-packages=pyfpm', 'get_metadata', '--output=/tmp/package-python-build-3ed2fb11ec8950b8ffe2244d76bc3ba2328fa1b6f9d5e68c4c73c2257c06/metadata.json'] {:level=>:info}
Process failed: /bin/bash failed (exit code 1). Full command was:["/bin/bash", "-c", "env PYTHONPATH=/var/lib/gems/2.5.0/gems/fpm-1.15.1/lib/fpm/package:$PYTHONPATH python3 setup.py --command-packages=pyfpm get_metadata --output=/tmp/package-python-build-3ed2fb11ec8950b8ffe2244d76bc3ba2328fa1b6f9d5e68c4c73c2257c06/metadata.json"] {:level=>:error}
Okay, this is because numpy's setup.py checks for the commands passed to it and doesn't recognize get_metadata and fails. This could be overridden by adding --force argument to that call (https://github.com/jordansissel/fpm/blob/b085edc49c8dd027db6ef3e32d8de531894a26ea/lib/fpm/package/python.rb#L234), but I don't know if it's going to influence other packages conversion. It has a side effect of setting run_build variable in numpy's setup.py to True.
Probably another command line argument can be created like --python-get-metadata-extra-params
Nevertheless, the build fails later again, but this is an issue with numpy: https://github.com/numpy/numpy/issues/21038
during RTL pass: expand {:level=>:info}
numpy/core/src/umath/loops_trigonometric.dispatch.c.src: In function ‘FLOAT_sin_NEON_VFPV4’: {:level=>:info}
numpy/core/src/umath/loops_trigonometric.dispatch.c.src:202:20: internal compiler error: in convert_move, at expr.c:218 {:level=>:info}
NPY_NO_EXPORT void NPY_CPU_DISPATCH_CURFX(FLOAT_@func@) {:level=>:info}
{:level=>:info}
^ {:level=>:info}
########### EXT COMPILER OPTIMIZATION ########### {:level=>:info}
Please submit a full bug report, {:level=>:info}
I don't know how to use the workaround they suggest in fpm.
Why does it build numpy==1.21.4 in the first place when .whl is available for that version?..
I tried to convert Python package to deb but the process crashed. Here's the output:
Here's my .fpm file:
Also, the mentioned directory inside /tmp doesn't exist after the program is terminated.