PyO3 / maturin

Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages
https://maturin.rs
Apache License 2.0
3.93k stars 273 forks source link

cmd_obj = self.command_obj[command] = klass(self) TypeError: 'NoneType' object is not callable #1028

Closed jameshilliard closed 2 years ago

jameshilliard commented 2 years ago

Bug Description

I'm seeing this build error when trying to compile maturin 0.13.1 the error appears to have been triggered by this commit.

(cd /home/buildroot/buildroot/output/build/host-python-maturin-0.13.1//; PATH="/home/buildroot/buildroot/output/per-package/host-python-maturin/host/bin:/home/buildroot/buildroot/output/per-package/host-python-maturin/host/sbin:/home/buildroot/bin:/home/buildroot/.local/bin:/home/buildroot/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" PYTHONNOUSERSITE=1 PATH="/home/buildroot/buildroot/output/per-package/host-python-maturin/host/bin:/home/buildroot/buildroot/output/per-package/host-python-maturin/host/sbin:/home/buildroot/bin:/home/buildroot/.local/bin:/home/buildroot/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" PKG_CONFIG="/home/buildroot/buildroot/output/per-package/host-python-maturin/host/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR="/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/pkgconfig:/home/buildroot/buildroot/output/per-package/host-python-maturin/host/share/pkgconfig" AR="/usr/bin/ar" AS="/usr/bin/as" LD="/usr/bin/ld" NM="/usr/bin/nm" CC="/usr/bin/gcc" GCC="/usr/bin/gcc" CXX="/usr/bin/g++" CPP="/usr/bin/cpp" OBJCOPY="/usr/bin/objcopy" RANLIB="/usr/bin/ranlib" CPPFLAGS="-I/home/buildroot/buildroot/output/per-package/host-python-maturin/host/include" CFLAGS="-O2 -I/home/buildroot/buildroot/output/per-package/host-python-maturin/host/include" CXXFLAGS="-O2 -I/home/buildroot/buildroot/output/per-package/host-python-maturin/host/include" LDFLAGS="-L/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib -Wl,-rpath,/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib" INTLTOOL_PERL=/usr/bin/perl SETUPTOOLS_USE_DISTUTILS=stdlib CARGO_HOME=/home/buildroot/buildroot/output/per-package/host-python-maturin/host/share/cargo PYO3_CROSS_LIB_DIR="/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/python3.10" /home/buildroot/buildroot/output/per-package/host-python-maturin/host/bin/python setup.py build  )
running build
running build_py
creating build
creating build/lib
creating build/lib/maturin
copying maturin/__main__.py -> build/lib/maturin
copying maturin/import_hook.py -> build/lib/maturin
copying maturin/__init__.py -> build/lib/maturin
running egg_info
creating maturin.egg-info
writing maturin.egg-info/PKG-INFO
writing dependency_links to maturin.egg-info/dependency_links.txt
writing requirements to maturin.egg-info/requires.txt
writing top-level names to maturin.egg-info/top_level.txt
writing manifest file 'maturin.egg-info/SOURCES.txt'
reading manifest file 'maturin.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'maturin.egg-info/SOURCES.txt'
running build_ext
running build_rust
cargo build --manifest-path Cargo.toml --release -v
**trimmed**
   Compiling maturin v0.13.1 (/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1)
     Running `rustc --crate-name maturin --edition=2018 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="configparser"' --cfg 'feature="default"' --cfg 'feature="human-panic"' --cfg 'feature="log"' --cfg 'feature="multipart"' --cfg 'feature="pretty_env_logger"' --cfg 'feature="rpassword"' --cfg 'feature="rustls"' --cfg 'feature="upload"' --cfg 'feature="ureq"' -C metadata=ee22660e17f64e66 -C extra-filename=-ee22660e17f64e66 --out-dir /home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps -L dependency=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps --extern anyhow=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libanyhow-4a2af6bbff1dbb5b.rmeta --extern base64=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libbase64-fcaf4d86daae2873.rmeta --extern bytesize=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libbytesize-4c9d345d391ddbaf.rmeta --extern cargo_options=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libcargo_options-dd32badc69b3cb13.rmeta --extern cargo_xwin=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libcargo_xwin-8e09c543d8227c88.rmeta --extern cargo_zigbuild=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libcargo_zigbuild-09c4ce481a41a118.rmeta --extern cargo_metadata=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libcargo_metadata-0988060a4214ac56.rmeta --extern cbindgen=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libcbindgen-21b1a3bfdcf15fd9.rmeta --extern cc=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libcc-595c7b5e55883cca.rmeta --extern clap=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libclap-b3742147ef21f71f.rmeta --extern clap_complete=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libclap_complete-d9e33b2022b585bb.rmeta --extern clap_complete_fig=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libclap_complete_fig-f665c31b18628dd5.rmeta --extern configparser=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libconfigparser-8fe69a399597dadc.rmeta --extern console=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libconsole-00eed5d199eea2b1.rmeta --extern dialoguer=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libdialoguer-0263b6bf5b44c56c.rmeta --extern dirs=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libdirs-6b3b86b9f1e0a9ea.rmeta --extern dunce=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libdunce-84459e250488e533.rmeta --extern fat_macho=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libfat_macho-0a853c8bb6af4b48.rmeta --extern flate2=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libflate2-0b1c429524f43029.rmeta --extern fs_err=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libfs_err-93309a530a7ed3ad.rmeta --extern glob=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libglob-2abcee27b4f663ff.rmeta --extern goblin=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libgoblin-9d379c83d9d043b5.rmeta --extern human_panic=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libhuman_panic-84b4ddc368871f7b.rmeta --extern ignore=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libignore-1b6d14c5757606e8.rmeta --extern lddtree=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/liblddtree-2cebcb48536f9af5.rmeta --extern minijinja=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libminijinja-3c7b491e0fbf512e.rmeta --extern multipart=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libmultipart-cbb94c375d7d06dc.rmeta --extern once_cell=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libonce_cell-e364ecd8df5f34a3.rmeta --extern platform_info=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libplatform_info-4e253ab4b5459757.rmeta --extern pretty_env_logger=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libpretty_env_logger-49a614ae46a01e12.rmeta --extern pyproject_toml=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libpyproject_toml-876657cab58e34ee.rmeta --extern python_pkginfo=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libpython_pkginfo-fed3d85d51814a38.rmeta --extern regex=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libregex-54e0db79203ce9de.rmeta --extern rpassword=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/librpassword-307b3e65e2ea30de.rmeta --extern rustc_version=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/librustc_version-92b702072c76dd17.rmeta --extern serde=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libserde-bb9aa4a299edad6d.rmeta --extern serde_json=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libserde_json-f7822d864164be9d.rmeta --extern sha2=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libsha2-98948c2fa30503bd.rmeta --extern shlex=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libshlex-3e98197e3454eaa6.rmeta --extern tar=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libtar-6836e22ceb944979.rmeta --extern target_lexicon=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libtarget_lexicon-ac879fe8d2813e79.rmeta --extern tempfile=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libtempfile-ccf72072673aacd5.rmeta --extern textwrap=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libtextwrap-c9be916b644b6db4.rmeta --extern thiserror=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libthiserror-8432b48129c33727.rmeta --extern toml_edit=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libtoml_edit-280599584c5c5d57.rmeta --extern tracing=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libtracing-05e87067dccc9ce2.rmeta --extern ureq=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libureq-3bdc61c13d648e47.rmeta --extern zip=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libzip-390e285e92c66f5a.rmeta -L native=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/build/ring-5ee8c2386e52bcd3/out -L native=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/build/bzip2-sys-fa3b18c078e5b10b/out/lib`
     Running `rustc --crate-name maturin --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="configparser"' --cfg 'feature="default"' --cfg 'feature="human-panic"' --cfg 'feature="log"' --cfg 'feature="multipart"' --cfg 'feature="pretty_env_logger"' --cfg 'feature="rpassword"' --cfg 'feature="rustls"' --cfg 'feature="upload"' --cfg 'feature="ureq"' -C metadata=33c5ea6e7497b68b -C extra-filename=-33c5ea6e7497b68b --out-dir /home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps -L dependency=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps --extern anyhow=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libanyhow-4a2af6bbff1dbb5b.rlib --extern base64=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libbase64-fcaf4d86daae2873.rlib --extern bytesize=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libbytesize-4c9d345d391ddbaf.rlib --extern cargo_options=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libcargo_options-dd32badc69b3cb13.rlib --extern cargo_xwin=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libcargo_xwin-8e09c543d8227c88.rlib --extern cargo_zigbuild=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libcargo_zigbuild-09c4ce481a41a118.rlib --extern cargo_metadata=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libcargo_metadata-0988060a4214ac56.rlib --extern cbindgen=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libcbindgen-21b1a3bfdcf15fd9.rlib --extern cc=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libcc-595c7b5e55883cca.rlib --extern clap=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libclap-b3742147ef21f71f.rlib --extern clap_complete=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libclap_complete-d9e33b2022b585bb.rlib --extern clap_complete_fig=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libclap_complete_fig-f665c31b18628dd5.rlib --extern configparser=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libconfigparser-8fe69a399597dadc.rlib --extern console=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libconsole-00eed5d199eea2b1.rlib --extern dialoguer=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libdialoguer-0263b6bf5b44c56c.rlib --extern dirs=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libdirs-6b3b86b9f1e0a9ea.rlib --extern dunce=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libdunce-84459e250488e533.rlib --extern fat_macho=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libfat_macho-0a853c8bb6af4b48.rlib --extern flate2=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libflate2-0b1c429524f43029.rlib --extern fs_err=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libfs_err-93309a530a7ed3ad.rlib --extern glob=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libglob-2abcee27b4f663ff.rlib --extern goblin=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libgoblin-9d379c83d9d043b5.rlib --extern human_panic=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libhuman_panic-84b4ddc368871f7b.rlib --extern ignore=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libignore-1b6d14c5757606e8.rlib --extern lddtree=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/liblddtree-2cebcb48536f9af5.rlib --extern maturin=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libmaturin-ee22660e17f64e66.rlib --extern minijinja=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libminijinja-3c7b491e0fbf512e.rlib --extern multipart=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libmultipart-cbb94c375d7d06dc.rlib --extern once_cell=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libonce_cell-e364ecd8df5f34a3.rlib --extern platform_info=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libplatform_info-4e253ab4b5459757.rlib --extern pretty_env_logger=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libpretty_env_logger-49a614ae46a01e12.rlib --extern pyproject_toml=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libpyproject_toml-876657cab58e34ee.rlib --extern python_pkginfo=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libpython_pkginfo-fed3d85d51814a38.rlib --extern regex=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libregex-54e0db79203ce9de.rlib --extern rpassword=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/librpassword-307b3e65e2ea30de.rlib --extern rustc_version=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/librustc_version-92b702072c76dd17.rlib --extern serde=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libserde-bb9aa4a299edad6d.rlib --extern serde_json=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libserde_json-f7822d864164be9d.rlib --extern sha2=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libsha2-98948c2fa30503bd.rlib --extern shlex=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libshlex-3e98197e3454eaa6.rlib --extern tar=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libtar-6836e22ceb944979.rlib --extern target_lexicon=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libtarget_lexicon-ac879fe8d2813e79.rlib --extern tempfile=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libtempfile-ccf72072673aacd5.rlib --extern textwrap=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libtextwrap-c9be916b644b6db4.rlib --extern thiserror=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libthiserror-8432b48129c33727.rlib --extern toml_edit=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libtoml_edit-280599584c5c5d57.rlib --extern tracing=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libtracing-05e87067dccc9ce2.rlib --extern ureq=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libureq-3bdc61c13d648e47.rlib --extern zip=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/deps/libzip-390e285e92c66f5a.rlib -L native=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/build/ring-5ee8c2386e52bcd3/out -L native=/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/target/release/build/bzip2-sys-fa3b18c078e5b10b/out/lib`
    Finished release [optimized] target(s) in 59.71s
Traceback (most recent call last):
  File "/home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/setup.py", line 57, in <module>
    setup(
  File "/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/python3.10/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/python3.10/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
    super().run_command(command)
  File "/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/python3.10/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/python3.10/site-packages/setuptools/command/build.py", line 24, in run
    super().run()
  File "/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/python3.10/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/python3.10/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
    super().run_command(command)
  File "/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/python3.10/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/python3.10/site-packages/setuptools_rust/setuptools_ext.py", line 134, in run
    build_rust.run()
  File "/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/python3.10/site-packages/setuptools_rust/command.py", line 101, in run
    self.run_for_extension(ext)
  File "/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/python3.10/site-packages/setuptools_rust/build.py", line 110, in run_for_extension
    self.install_extension(ext, dylib_paths)
  File "/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/python3.10/site-packages/setuptools_rust/build.py", line 318, in install_extension
    wheel = self.get_finalized_command("bdist_wheel")
  File "/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/python3.10/distutils/cmd.py", line 298, in get_finalized_command
    cmd_obj = self.distribution.get_command_obj(command, create)
  File "/home/buildroot/buildroot/output/per-package/host-python-maturin/host/lib/python3.10/distutils/dist.py", line 858, in get_command_obj
    cmd_obj = self.command_obj[command] = klass(self)
TypeError: 'NoneType' object is not callable
make[1]: *** [package/pkg-generic.mk:293: /home/buildroot/buildroot/output/build/host-python-maturin-0.13.1/.stamp_built] Error 1
make: *** [Makefile:84: _all] Error 2

Your Python version (python -V)

3.10.5

Your pip version (pip -V)

N/A

What bindings you're using

N/A

Steps to Reproduce

  1. Update buildroot's maturin package to 0.13.1:
    
    diff --git a/package/python-maturin/python-maturin.hash b/package/python-maturin/python-maturin.hash
    index 383dbf8737..2604dd40c4 100644
    --- a/package/python-maturin/python-maturin.hash
    +++ b/package/python-maturin/python-maturin.hash
    @@ -1,5 +1,5 @@
    # Locally calculated after vendoring
    -sha256  4ea4f6b02cabffc8b56c488956ad572abfabdce935128007dff48a6e95b553d2  maturin-0.12.20.tar.gz
    +sha256  1c385169ef87ecc076c1471ccd9efdd60d151d1f5d566f1117ca73ea926f7698  maturin-0.13.1.tar.gz
    # Locally computed sha256 checksums
    sha256  a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2  license-apache
    sha256  ea7882c559733766ad08343bde1d1ec80a4967c03a738fb8e0058ef6289f7b7c  license-mit
    diff --git a/package/python-maturin/python-maturin.mk b/package/python-maturin/python-maturin.mk
    index 9ac11f264b..b92738822e 100644
    --- a/package/python-maturin/python-maturin.mk
    +++ b/package/python-maturin/python-maturin.mk
    @@ -4,9 +4,9 @@
    #
    ################################################################################

-PYTHON_MATURIN_VERSION = 0.12.20 +PYTHON_MATURIN_VERSION = 0.13.1 PYTHON_MATURIN_SOURCE = maturin-$(PYTHON_MATURIN_VERSION).tar.gz -PYTHON_MATURIN_SITE = https://files.pythonhosted.org/packages/39/ba/fec598956393230341def42367c6ad0efbee6ddc899f8858e5b25a7f37a5 +PYTHON_MATURIN_SITE = https://files.pythonhosted.org/packages/9b/a2/9b8377c61a0ded0b9c832343ca4bc1069e07bbcf8f844be6faf4858c7a48 PYTHON_MATURIN_SETUP_TYPE = setuptools PYTHON_MATURIN_LICENSE = Apache-2.0 or MIT PYTHON_MATURIN_LICENSE_FILES = license-apache license-mit


2. Select package `python-orjson` which depends on `host-python-maturin`
3. Try to build `host-python-maturin` with `make host-python-maturin`
messense commented 2 years ago

I think it misses the wheel package dependency?

https://github.com/PyO3/maturin/blob/66ee51f635b9ce03defdad4ae123e2c8a7603e65/pyproject.toml#L3

jameshilliard commented 2 years ago

I think it misses the wheel package dependency?

We don't support pep517 builds with setuptools at the moment as setuptools doesn't have a fully pep517 compliant dependency tree, AFAIU regular setuptools setup.py builds don't need wheel unless actually building a wheel file, only pep517 setuptools builds need wheel.

messense commented 2 years ago

Unfortunately RustBin requires wheel to query script directory path, the previous Exec binding of setuptools-rust breaks Windows build on conda-forge.

jameshilliard commented 2 years ago

Unfortunately RustBin requires wheel to query script directory path,

Don't you just need to append ".data" to the package name for that?

messense commented 2 years ago

name and version actually. https://peps.python.org/pep-0491/#the-data-directory since it's a wheel specific thing, I'm not sure if manually implement that will solve your issue. I'm happy to accept a patch if it works for you.

jameshilliard commented 2 years ago

https://peps.python.org/pep-0491/#the-data-directory since it's a wheel specific thing, I'm not sure if manually implement that will solve your issue. I'm happy to accept a patch if it works for you.

Seems to work fine without wheel like this for me.

messense commented 2 years ago

setuptools-rust 1.5.0 is out with your fixes.

jameshilliard commented 2 years ago

setuptools-rust 1.5.0 is out with your fixes.

Commits updating setuptools-rust and maturin in buildroot merged.