Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-maturin for openSUSE:Factory checked in at 2023-05-21 19:09:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-maturin (Old) and /work/SRC/openSUSE:Factory/.python-maturin.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-maturin" Sun May 21 19:09:06 2023 rev:30 rq:1088131 version:0.15.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-maturin/python-maturin.changes 2023-05-08 17:24:47.636876130 +0200 +++ /work/SRC/openSUSE:Factory/.python-maturin.new.1533/python-maturin.changes 2023-05-21 19:09:50.946825841 +0200 @@ -1,0 +2,27 @@ +Sun May 21 12:56:57 UTC 2023 - Mia Herkt <m...@0x0.st> + +- Update to v0.15.3: + * Fix cross-compile to Apple universal2 in the other platform + gh#PyO3/maturin#1613 + * Remove serde(flatten) to improve error messages + gh#PyO3/maturin#1616 + * Allow syn 2.0 + gh#PyO3/maturin#1617 + * describe the need for module-name + gh#PyO3/maturin#1604 + * Add PEP 517 config_settings support + gh#PyO3/maturin#1619 + * Keep file mode on Unix + gh#PyO3/maturin#1622 +- Changes in v0.15.2: + * Remove bors + gh#PyO3/maturin#1602 + * When determining the python module name, use pyproject.toml + project.name over Cargo.toml package.name. + gh#PyO3/maturin#1608 + * Warn on missing python-source contents + gh#PyO3/maturin#1607 + * Fix rewriting dev-dependencies in sdist + gh#PyO3/maturin#1610 + +------------------------------------------------------------------- Old: ---- maturin-0.15.1.tar.gz New: ---- maturin-0.15.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-maturin.spec ++++++ --- /var/tmp/diff_new_pack.QTkq7M/_old 2023-05-21 19:09:51.878831162 +0200 +++ /var/tmp/diff_new_pack.QTkq7M/_new 2023-05-21 19:09:51.882831185 +0200 @@ -17,7 +17,7 @@ Name: python-maturin -Version: 0.15.1 +Version: 0.15.3 Release: 0 Summary: Rust/Python Interoperability License: Apache-2.0 OR MIT ++++++ maturin-0.15.1.tar.gz -> maturin-0.15.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/.cirrus.yml new/maturin-0.15.3/.cirrus.yml --- old/maturin-0.15.1/.cirrus.yml 2023-05-07 12:48:56.000000000 +0200 +++ new/maturin-0.15.3/.cirrus.yml 2023-05-20 17:12:23.000000000 +0200 @@ -5,8 +5,8 @@ CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse build_and_test: &BUILD_AND_TEST - # only run tasks on pull request or bors related branches - only_if: $CIRRUS_BRANCH == 'staging' || $CIRRUS_BRANCH == 'trying' || $CIRRUS_PR != "" + # only run tasks on pull request or github merge queue branches + only_if: $CIRRUS_BRANCH =~ 'gh-readonly-queue/.*' || $CIRRUS_PR != "" setup_script: - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable - rustup target add wasm32-wasi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/.devcontainer/devcontainer.json new/maturin-0.15.3/.devcontainer/devcontainer.json --- old/maturin-0.15.1/.devcontainer/devcontainer.json 1970-01-01 01:00:00.000000000 +0100 +++ new/maturin-0.15.3/.devcontainer/devcontainer.json 2023-05-20 17:12:23.000000000 +0200 @@ -0,0 +1,22 @@ +{ + "name": "maturin", + "image": "mcr.microsoft.com/devcontainers/rust:bullseye", + "postCreateCommand": "bash .devcontainer/post_create.sh", + "customizations": { + "vscode": { + "extensions": [ + "ms-python.black-formatter", + "rust-lang.rust-analyzer", + "charliermarsh.ruff" + ], + "settings": { + "editor.formatOnSave": true + } + } + }, + "features": { + "ghcr.io/devcontainers/features/sshd:1": { + "version": "latest" + } + } +} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/.devcontainer/post_create.sh new/maturin-0.15.3/.devcontainer/post_create.sh --- old/maturin-0.15.1/.devcontainer/post_create.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/maturin-0.15.3/.devcontainer/post_create.sh 2023-05-20 17:12:23.000000000 +0200 @@ -0,0 +1,12 @@ +set -euxo pipefail + +sudo apt-get update +sudo apt-get install -y python3-dev python3-pip python3-venv libclang-dev +sudo python3 -m pip install cffi virtualenv pipx + +pipx ensurepath +pipx install uniffi-bindgen +pipx install cargo-deny + +rustup target add wasm32-wasi +curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/Cargo.lock new/maturin-0.15.3/Cargo.lock --- old/maturin-0.15.1/Cargo.lock 2023-05-07 12:48:56.000000000 +0200 +++ new/maturin-0.15.3/Cargo.lock 2023-05-20 17:12:23.000000000 +0200 @@ -79,9 +79,9 @@ [[package]] name = "bumpalo" -version = "3.12.1" +version = "3.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8" +checksum = "3c6ed94e98ecff0c12dd1b04c15ec0d7d9458ca8fe806cea6f12954efe74c63b" [[package]] name = "byteorder" @@ -195,9 +195,9 @@ [[package]] name = "cargo-zigbuild" -version = "0.16.7" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00ff7c023d9f668281696d679e2ebc0095275501afb17df6331258c54a9aefda" +checksum = "65617804db553070b1c7f1c6a2b133d8311c61c12eccbad28820a741de6c5662" dependencies = [ "anyhow", "cargo-options", @@ -241,7 +241,7 @@ "quote", "serde", "serde_json", - "syn", + "syn 1.0.109", "tempfile", "toml 0.5.11", ] @@ -300,15 +300,24 @@ [[package]] name = "clap" -version = "4.1.10" +version = "4.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce38afc168d8665cfc75c7b1dd9672e50716a137f433f070991619744a67342a" +checksum = "906f7fe1da4185b7a282b2bc90172a496f9def1aca4545fe7526810741591e14" dependencies = [ - "bitflags", + "clap_builder", "clap_derive", + "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "351f9ad9688141ed83dfd8f5fb998a06225ef444b48ff4dc43de6d409b7fd10b" +dependencies = [ + "bitflags", "clap_lex", "is-terminal", - "once_cell", "strsim", "termcolor", "terminal_size", @@ -316,9 +325,9 @@ [[package]] name = "clap_complete" -version = "4.1.6" +version = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40d3120a421cd111c43f1a6c7d0dd83bb6aaa0659c164468a1654014632a5ec6" +checksum = "1594fe2312ec4abf402076e407628f5c313e54c32ade058521df4ee34ecac8a8" dependencies = [ "clap", ] @@ -337,9 +346,9 @@ [[package]] name = "clap_complete_fig" -version = "4.1.2" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2171bc6242ad7a1801422bff039574449b5bd832b715222e500714ce10f91a54" +checksum = "f3af28956330989baa428ed4d3471b853715d445c62de21b67292e22cf8a41fa" dependencies = [ "clap", "clap_complete", @@ -357,25 +366,21 @@ [[package]] name = "clap_derive" -version = "4.1.9" +version = "4.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fddf67631444a3a3e3e5ac51c36a5e01335302de677bd78759eaa90ab1f46644" +checksum = "81d7dc0031c3a59a04fc2ba395c8e2dd463cba1859275f065d225f6122221b45" dependencies = [ "heck", - "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 2.0.16", ] [[package]] name = "clap_lex" -version = "0.3.3" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "033f6b7a4acb1f358c742aaca805c939ee73b4c6209ae4318ec7aca81c42e646" -dependencies = [ - "os_str_bytes", -] +checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" [[package]] name = "cli-table" @@ -450,9 +455,9 @@ [[package]] name = "cpufeatures" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" +checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" dependencies = [ "libc", ] @@ -526,7 +531,7 @@ checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" dependencies = [ "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -910,9 +915,9 @@ [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" dependencies = [ "wasm-bindgen", ] @@ -949,9 +954,9 @@ [[package]] name = "libc" -version = "0.2.142" +version = "0.2.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317" +checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" [[package]] name = "linux-keyutils" @@ -1016,7 +1021,7 @@ [[package]] name = "maturin" -version = "0.15.1" +version = "0.15.3" dependencies = [ "anyhow", "base64 0.13.1", @@ -1118,9 +1123,9 @@ [[package]] name = "minijinja" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b1dbc390e4447b2500c4071d7bc2a808cf07e925bae6b92db8a3c3eae773c58" +checksum = "e813a9b613280e7d9e5be27ab556530d7c5562d26e5e6ef586e2c4512d34550d" dependencies = [ "serde", ] @@ -1242,9 +1247,9 @@ [[package]] name = "openssl" -version = "0.10.50" +version = "0.10.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e30d8bc91859781f0a943411186324d580f2bbeb71b452fe91ae344806af3f1" +checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" dependencies = [ "bitflags", "cfg-if", @@ -1257,13 +1262,13 @@ [[package]] name = "openssl-macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.16", ] [[package]] @@ -1283,9 +1288,9 @@ [[package]] name = "openssl-sys" -version = "0.9.85" +version = "0.9.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d3d193fb1488ad46ffe3aaabc912cc931d02ee8518fe2959aea8ef52718b0c0" +checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" dependencies = [ "cc", "libc", @@ -1305,12 +1310,6 @@ ] [[package]] -name = "os_str_bytes" -version = "6.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" - -[[package]] name = "output_vt100" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1397,9 +1396,9 @@ [[package]] name = "pkg-config" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "plain" @@ -1442,34 +1441,10 @@ ] [[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" dependencies = [ "unicode-ident", ] @@ -1513,9 +1488,9 @@ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" dependencies = [ "proc-macro2", ] @@ -1750,7 +1725,7 @@ dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1765,9 +1740,9 @@ [[package]] name = "security-framework" -version = "2.8.2" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" +checksum = "ca2855b3715770894e67cbfa3df957790aa0c9edc3bf06efa1a84d77fa0839d1" dependencies = [ "bitflags", "core-foundation", @@ -1778,9 +1753,9 @@ [[package]] name = "security-framework-sys" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" +checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" dependencies = [ "core-foundation-sys", "libc", @@ -1797,29 +1772,29 @@ [[package]] name = "serde" -version = "1.0.155" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71f2b4817415c6d4210bfe1c7bfcf4801b2d904cb4d0e1a8fdb651013c9e86b8" +checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.155" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d071a94a3fac4aff69d023a7f411e33f40f3483f8c5190b1953822b6b76d7630" +checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.16", ] [[package]] name = "serde_json" -version = "1.0.95" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ "itoa", "ryu", @@ -1973,6 +1948,17 @@ ] [[package]] +name = "syn" +version = "2.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] name = "tar" version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2034,22 +2020,22 @@ [[package]] name = "thiserror" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ab016db510546d856297882807df8da66a16fb8c4101cb8b30054b0d5b2d9c" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.16", ] [[package]] @@ -2161,20 +2147,20 @@ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.16", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", "valuable", @@ -2341,9 +2327,9 @@ [[package]] name = "uuid" -version = "1.3.1" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b55a3fef2a1e3b3a00ce878640918820d3c51081576ac657d23af9fc7928fdb" +checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" [[package]] name = "valuable" @@ -2400,9 +2386,9 @@ [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "5bba0e8cb82ba49ff4e229459ff22a191bbe9a1cb3a341610c9c33efc27ddf73" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2410,24 +2396,24 @@ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "19b04bc93f9d6bdee709f6bd2118f57dd6679cf1176a1af464fca3ab0d66d8fb" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn", + "syn 2.0.16", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "14d6b024f1a526bb0234f52840389927257beb670610081360e5a03c5df9c258" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2435,28 +2421,28 @@ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "e128beba882dd1eb6200e1dc92ae6c5dbaa4311aa7bb211ca035779e5efc39f8" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.16", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" [[package]] name = "web-sys" -version = "0.3.61" +version = "0.3.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +checksum = "3bdd9ef4e984da1187bf8110c5cf5b845fbc87a23602cdf912386a76fcd3a7c2" dependencies = [ "js-sys", "wasm-bindgen", @@ -2652,9 +2638,9 @@ [[package]] name = "zip" -version = "0.6.4" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0445d0fbc924bb93539b4316c11afb121ea39296f99a3c4c9edad09e3658cdef" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" dependencies = [ "byteorder", "bzip2", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/Cargo.toml new/maturin-0.15.3/Cargo.toml --- old/maturin-0.15.1/Cargo.toml 1970-01-01 01:00:00.000000000 +0100 +++ new/maturin-0.15.3/Cargo.toml 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +1,7 @@ [package] authors = ["konstin <kons...@mailbox.org>", "messense <messe...@icloud.com>"] name = "maturin" -version = "0.15.1" +version = "0.15.3" description = "Build and publish crates with pyo3, rust-cpython and cffi bindings as well as rust binaries as python packages" exclude = ["test-crates/**/*", "sysconfig/*", "test-data/*", "ci/*", "tests/*", "guide/*", ".github/*"] homepage = "https://github.com/pyo3/maturin" @@ -67,7 +67,7 @@ clap_complete_command = { version = "0.5.1", optional = true } # cross compile -cargo-zigbuild = { version = "0.16.7", default-features = false, optional = true } +cargo-zigbuild = { version = "0.16.9", default-features = false, optional = true } cargo-xwin = { version = "0.14.2", default-features = false, optional = true } # log @@ -77,7 +77,7 @@ # project scaffolding, maturin new/init/generate-ci dialoguer = { version = "0.10.2", default-features = false, optional = true } console = { version = "0.15.4", optional = true } -minijinja = { version = "0.31.0", optional = true } +minijinja = { version = "0.32.0", optional = true } # upload bytesize = { version = "1.0.1", optional = true } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/Changelog.md new/maturin-0.15.3/Changelog.md --- old/maturin-0.15.1/Changelog.md 2023-05-07 12:48:56.000000000 +0200 +++ new/maturin-0.15.3/Changelog.md 2023-05-20 17:12:23.000000000 +0200 @@ -7,6 +7,17 @@ ## [Unreleased] +## [0.15.3] - 2023-05-20 + +* Fix cross compile Apple universal2 wheels on non-macOS platforms by MisLink in [#1613](https://github.com/PyO3/maturin/pull/1613) +* Add PEP 517 `config_settings` support in [#1619](https://github.com/PyO3/maturin/pull/1619), + deprecate `MATURIN_PEP517_ARGS` in favor of the new `build-args` config setting. + +## [0.15.2] - 2023-05-16 + +* When determining the python module name, use pyproject.toml `project.name` over Cargo.toml `package.name` in [#1608](https://github.com/PyO3/maturin/pull/1608) +* Fix rewriting `dev-dependencies` in sdist in [#1610](https://github.com/PyO3/maturin/pull/1610) + ## [0.15.1] - 2023-05-07 * Fix finding interpreters from bundled sysconfigs in [#1598](https://github.com/PyO3/maturin/pull/1598) @@ -856,7 +867,9 @@ * Initial Release -[Unreleased]: https://github.com/pyo3/maturin/compare/v0.15.1...HEAD +[Unreleased]: https://github.com/pyo3/maturin/compare/v0.15.3...HEAD +[0.15.3]: https://github.com/pyo3/maturin/compare/v0.15.2...v0.15.3 +[0.15.2]: https://github.com/pyo3/maturin/compare/v0.15.1...v0.15.2 [0.15.1]: https://github.com/pyo3/maturin/compare/v0.15.0...v0.15.1 [0.15.0]: https://github.com/pyo3/maturin/compare/v0.14.17...v0.15.0 [0.14.17]: https://github.com/pyo3/maturin/compare/v0.14.16...v0.14.17 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/PKG-INFO new/maturin-0.15.3/PKG-INFO --- old/maturin-0.15.1/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/maturin-0.15.3/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: maturin -Version: 0.15.1 +Version: 0.15.3 Classifier: Topic :: Software Development :: Build Tools Classifier: Programming Language :: Rust Classifier: Programming Language :: Python :: Implementation :: CPython @@ -29,7 +29,6 @@ [![Actions Status](https://img.shields.io/github/actions/workflow/status/PyO3/maturin/test.yml?branch=main&logo=github&style=flat-square)](https://github.com/PyO3/maturin/actions) [![FreeBSD](https://img.shields.io/cirrus/github/PyO3/maturin/main?logo=CircleCI&style=flat-square)](https://cirrus-ci.com/github/PyO3/maturin) -[![Bors enabled](https://bors.tech/images/badge_small.svg)](https://app.bors.tech/repositories/55651) [![Crates.io](https://img.shields.io/crates/v/maturin.svg?logo=rust&style=flat-square)](https://crates.io/crates/maturin) [![PyPI](https://img.shields.io/pypi/v/maturin.svg?logo=python&style=flat-square)](https://pypi.org/project/maturin) [![Maturin User Guide](https://img.shields.io/badge/user-guide-brightgreen?logo=readthedocs&style=flat-square)](https://maturin.rs) @@ -146,6 +145,7 @@ ```toml [tool.maturin] python-source = "python" +module-name = "my_project._lib_name" ``` then the project structure would look like this: @@ -179,12 +179,24 @@ âââ my_project â  âââ __init__.py â  âââ bar.py -â  âââ my_project.cpython-36m-x86_64-linux-gnu.so +â  âââ _lib_name.cpython-36m-x86_64-linux-gnu.so âââ README.md âââ src   âââ lib.rs ``` +When doing this also be sure to set the module name in your code to match the last part of `module-name` (don't include the package path): + +``` +#[pymodule] +#[pyo3(name="_lib_name")] +fn my_lib_name(_py: Python<'_>, m: &PyModule) -> PyResult<()> { + m.add_class::<MyPythonRustClass>()?; + Ok(()) +} +``` + + ## Python metadata maturin supports [PEP 621](https://www.python.org/dev/peps/pep-0621/), you can specify python package metadata in `pyproject.toml`. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/README.md new/maturin-0.15.3/README.md --- old/maturin-0.15.1/README.md 2023-05-07 12:48:56.000000000 +0200 +++ new/maturin-0.15.3/README.md 2023-05-20 17:12:23.000000000 +0200 @@ -4,7 +4,6 @@ [![Actions Status](https://img.shields.io/github/actions/workflow/status/PyO3/maturin/test.yml?branch=main&logo=github&style=flat-square)](https://github.com/PyO3/maturin/actions) [![FreeBSD](https://img.shields.io/cirrus/github/PyO3/maturin/main?logo=CircleCI&style=flat-square)](https://cirrus-ci.com/github/PyO3/maturin) -[![Bors enabled](https://bors.tech/images/badge_small.svg)](https://app.bors.tech/repositories/55651) [![Crates.io](https://img.shields.io/crates/v/maturin.svg?logo=rust&style=flat-square)](https://crates.io/crates/maturin) [![PyPI](https://img.shields.io/pypi/v/maturin.svg?logo=python&style=flat-square)](https://pypi.org/project/maturin) [![Maturin User Guide](https://img.shields.io/badge/user-guide-brightgreen?logo=readthedocs&style=flat-square)](https://maturin.rs) @@ -121,6 +120,7 @@ ```toml [tool.maturin] python-source = "python" +module-name = "my_project._lib_name" ``` then the project structure would look like this: @@ -154,12 +154,24 @@ âââ my_project â  âââ __init__.py â  âââ bar.py -â  âââ my_project.cpython-36m-x86_64-linux-gnu.so +â  âââ _lib_name.cpython-36m-x86_64-linux-gnu.so âââ README.md âââ src   âââ lib.rs ``` +When doing this also be sure to set the module name in your code to match the last part of `module-name` (don't include the package path): + +``` +#[pymodule] +#[pyo3(name="_lib_name")] +fn my_lib_name(_py: Python<'_>, m: &PyModule) -> PyResult<()> { + m.add_class::<MyPythonRustClass>()?; + Ok(()) +} +``` + + ## Python metadata maturin supports [PEP 621](https://www.python.org/dev/peps/pep-0621/), you can specify python package metadata in `pyproject.toml`. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/deny.toml new/maturin-0.15.3/deny.toml --- old/maturin-0.15.1/deny.toml 2023-05-07 12:48:56.000000000 +0200 +++ new/maturin-0.15.3/deny.toml 2023-05-20 17:12:23.000000000 +0200 @@ -181,6 +181,7 @@ { name = "base64", version = "0.13.1" }, # from cbindgen { name = "toml", version = "0.5.11" }, + { name = "syn" }, ] # Similarly to `skip` allows you to skip certain crates during duplicate # detection. Unlike skip, it also includes the entire tree of transitive diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/maturin/__init__.py new/maturin-0.15.3/maturin/__init__.py --- old/maturin-0.15.1/maturin/__init__.py 2023-05-07 12:48:56.000000000 +0200 +++ new/maturin-0.15.3/maturin/__init__.py 2023-05-20 17:12:23.000000000 +0200 @@ -32,9 +32,19 @@ return pyproject_toml.get("tool", {}).get("maturin", {}) -def get_maturin_pep517_args() -> list[str]: - args = shlex.split(os.getenv("MATURIN_PEP517_ARGS", "")) - return args +def get_maturin_pep517_args( + config_settings: Mapping[str, Any] | None = None +) -> list[str]: + build_args = config_settings.get("build-args") if config_settings else None + if build_args is None: + args = os.getenv("MATURIN_PEP517_ARGS", "") + if args: + print( + f"'MATURIN_PEP517_ARGS' is deprecated, use `--config-settings build-args='{args}'` instead." + ) + else: + args = build_args + return shlex.split(args) def _additional_pep517_args() -> list[str]: @@ -68,7 +78,7 @@ if editable: command.append("--editable") - pep517_args = get_maturin_pep517_args() + pep517_args = get_maturin_pep517_args(config_settings) if pep517_args: command.extend(pep517_args) @@ -185,7 +195,7 @@ sys.executable, ] command.extend(_additional_pep517_args()) - pep517_args = get_maturin_pep517_args() + pep517_args = get_maturin_pep517_args(config_settings) if pep517_args: command.extend(pep517_args) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/src/build_context.rs new/maturin-0.15.3/src/build_context.rs --- old/maturin-0.15.1/src/build_context.rs 2023-05-07 12:48:56.000000000 +0200 +++ new/maturin-0.15.3/src/build_context.rs 2023-05-20 17:12:23.000000000 +0200 @@ -234,7 +234,7 @@ let interp_names: HashSet<_> = non_abi3_interps .iter() .map(|interp| match interp.interpreter_kind { - InterpreterKind::CPython => interp.implmentation_name.to_string(), + InterpreterKind::CPython => interp.implementation_name.to_string(), InterpreterKind::PyPy => "PyPy".to_string(), }) .collect(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/src/build_options.rs new/maturin-0.15.3/src/build_options.rs --- old/maturin-0.15.1/src/build_options.rs 2023-05-07 12:48:56.000000000 +0200 +++ new/maturin-0.15.3/src/build_options.rs 2023-05-20 17:12:23.000000000 +0200 @@ -292,7 +292,7 @@ executable: PathBuf::new(), platform: None, runnable: false, - implmentation_name: interpreter_kind.to_string().to_ascii_lowercase(), + implementation_name: interpreter_kind.to_string().to_ascii_lowercase(), soabi: soabi.cloned(), }); } else { @@ -360,7 +360,7 @@ executable: PathBuf::new(), platform: None, runnable: false, - implmentation_name: "cpython".to_string(), + implementation_name: "cpython".to_string(), soabi: None, }]) } else if let Some(config_file) = env::var_os("PYO3_CONFIG_FILE") { @@ -387,7 +387,7 @@ executable: PathBuf::new(), platform: None, runnable: false, - implmentation_name: "cpython".to_string(), + implementation_name: "cpython".to_string(), soabi: None, }]) } else { @@ -427,7 +427,7 @@ executable: PathBuf::new(), platform: None, runnable: false, - implmentation_name: "cpython".to_string(), + implementation_name: "cpython".to_string(), soabi: None, }]) } else if target.cross_compiling() { @@ -1057,33 +1057,45 @@ target: &Target, requires_python: Option<&VersionSpecifiers>, ) -> Result<Vec<PythonInterpreter>> { - let mut interpreters = Vec::new(); + let mut found_interpreters = Vec::new(); if !interpreter.is_empty() { let mut missing = Vec::new(); for interp in interpreter { match PythonInterpreter::check_executable(interp.clone(), target, bridge) { - Ok(Some(interp)) => interpreters.push(interp), + Ok(Some(interp)) => found_interpreters.push(interp), _ => missing.push(interp.clone()), } } if !missing.is_empty() { let sysconfig_interps = find_interpreter_in_sysconfig(&missing, target, requires_python)?; - interpreters.extend(sysconfig_interps); + found_interpreters.extend(sysconfig_interps); } } else { - interpreters = PythonInterpreter::find_all(target, bridge, requires_python) + found_interpreters = PythonInterpreter::find_all(target, bridge, requires_python) .context("Finding python interpreters failed")?; }; - if interpreters.is_empty() { - if let Some(requires_python) = requires_python { - bail!("Couldn't find any python interpreters with version {}. Please specify at least one with -i", requires_python); + if found_interpreters.is_empty() { + if interpreter.is_empty() { + if let Some(requires_python) = requires_python { + bail!("Couldn't find any python interpreters with version {}. Please specify at least one with -i", requires_python); + } else { + bail!("Couldn't find any python interpreters. Please specify at least one with -i"); + } } else { - bail!("Couldn't find any python interpreters. Please specify at least one with -i"); + let interps_str = interpreter + .iter() + .map(|path| format!("'{}'", path.display())) + .collect::<Vec<_>>() + .join(", "); + bail!( + "Couldn't find any python interpreters from {}.", + interps_str + ); } } - Ok(interpreters) + Ok(found_interpreters) } /// Find python interpreters in the host machine @@ -1141,6 +1153,9 @@ } else { bail!("Unsupported Python interpreter: {}", python); }; + if python_ver.is_empty() { + continue; + } let (ver_major, ver_minor) = python_ver .split_once('.') .context("Invalid python interpreter version")?; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/src/compile.rs new/maturin-0.15.3/src/compile.rs --- old/maturin-0.15.1/src/compile.rs 2023-05-07 12:48:56.000000000 +0200 +++ new/maturin-0.15.3/src/compile.rs 2023-05-20 17:12:23.000000000 +0200 @@ -49,7 +49,7 @@ python_interpreter: Option<&PythonInterpreter>, targets: &[CompileTarget], ) -> Result<Vec<HashMap<String, BuildArtifact>>> { - if context.target.is_macos() && context.universal2 { + if context.universal2 { compile_universal2(context, python_interpreter, targets) } else { compile_targets(context, python_interpreter, targets) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/src/module_writer.rs new/maturin-0.15.3/src/module_writer.rs --- old/maturin-0.15.1/src/module_writer.rs 2023-05-07 12:48:56.000000000 +0200 +++ new/maturin-0.15.3/src/module_writer.rs 2023-05-20 17:12:23.000000000 +0200 @@ -18,12 +18,12 @@ use std::env; use std::ffi::OsStr; use std::fmt::Write as _; -#[cfg(target_family = "unix")] +#[cfg(unix)] use std::fs::OpenOptions; use std::io; use std::io::{Read, Write}; -#[cfg(target_family = "unix")] -use std::os::unix::fs::OpenOptionsExt; +#[cfg(unix)] +use std::os::unix::fs::{OpenOptionsExt, PermissionsExt}; use std::path::{Path, PathBuf}; use std::process::{Command, Output}; use std::str; @@ -1160,7 +1160,12 @@ if source.is_dir() { writer.add_directory(target)?; } else { - writer.add_file(target, source)?; + let permissions = source.metadata()?.permissions(); + #[cfg(unix)] + let mode = permissions.mode(); + #[cfg(not(unix))] + let mode = 0o644; + writer.add_file_with_permissions(target, source, mode)?; } } } @@ -1247,15 +1252,24 @@ .build() { let file = file?; + let permissions = file.metadata()?.permissions(); + #[cfg(unix)] + let mode = permissions.mode(); + #[cfg(not(unix))] + let mode = 0o644; let relative = file.path().strip_prefix(data.parent().unwrap()).unwrap(); if file.path_is_symlink() { // Copy the actual file contents, not the link, so that you can create a // data directory by joining different data sources let source = fs::read_link(file.path())?; - writer.add_file(relative, source.parent().unwrap())?; + writer.add_file_with_permissions( + relative, + source.parent().unwrap(), + mode, + )?; } else if file.path().is_file() { - writer.add_file(relative, file.path())?; + writer.add_file_with_permissions(relative, file.path(), mode)?; } else if file.path().is_dir() { writer.add_directory(relative)?; } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/src/project_layout.rs new/maturin-0.15.3/src/project_layout.rs --- old/maturin-0.15.1/src/project_layout.rs 2023-05-07 12:48:56.000000000 +0200 +++ new/maturin-0.15.3/src/project_layout.rs 2023-05-20 17:12:23.000000000 +0200 @@ -89,8 +89,7 @@ let manifest_dir = manifest_file.parent().unwrap(); let pyproject_toml: Option<PyProjectToml> = if pyproject_file.is_file() { - let pyproject = - PyProjectToml::new(&pyproject_file).context("pyproject.toml is invalid")?; + let pyproject = PyProjectToml::new(&pyproject_file)?; pyproject.warn_missing_maturin_version(); pyproject.warn_missing_build_backend(); Some(pyproject) @@ -119,17 +118,20 @@ // If the package name contains minuses, you must declare a module with // underscores as lib name - let module_name = cargo_toml - .lib - .as_ref() - .and_then(|lib| lib.name.as_ref()) + // Precedence: + // * Explicitly declared pyproject.toml `tool.maturin.module-name` + // * Cargo.toml `lib.name` + // * pyproject.toml `project.name` + // * Cargo.toml `package.name` + let module_name = pyproject + .and_then(|x| x.module_name()) + .or(cargo_toml.lib.as_ref().and_then(|lib| lib.name.as_deref())) + .or(pyproject + .and_then(|pyproject| pyproject.project.as_ref()) + .map(|project| project.name.as_str())) .unwrap_or(crate_name) .to_owned(); - let extension_name = pyproject - .and_then(|x| x.module_name()) - .unwrap_or(&module_name); - let project_root = if pyproject_file.is_file() { pyproject_file.parent().unwrap_or(manifest_dir) } else { @@ -175,8 +177,15 @@ project_root.join(data) } }); - let project_layout = - ProjectLayout::determine(project_root, extension_name, py_root, python_packages, data)?; + let custom_python_source = pyproject.and_then(|x| x.python_source()).is_some(); + let project_layout = ProjectLayout::determine( + project_root, + &module_name, + py_root, + python_packages, + data, + custom_python_source, + )?; Ok(Self { project_layout, cargo_toml_path: manifest_file, @@ -234,8 +243,7 @@ "Found pyproject.toml in working directory at {:?}", pyproject_file ); - let pyproject = - PyProjectToml::new(&pyproject_file).context("pyproject.toml is invalid")?; + let pyproject = PyProjectToml::new(&pyproject_file)?; if let Some(path) = pyproject.manifest_path() { debug!("Using cargo manifest path from pyproject.toml {:?}", path); return Ok(( @@ -333,15 +341,15 @@ impl ProjectLayout { /// Checks whether a python module exists besides Cargo.toml with the right name fn determine( - project_root: impl AsRef<Path>, + project_root: &Path, module_name: &str, python_root: PathBuf, python_packages: Vec<String>, data: Option<PathBuf>, + custom_python_source: bool, ) -> Result<ProjectLayout> { // A dot in the module name means the extension module goes into the module folder specified by the path let parts: Vec<&str> = module_name.split('.').collect(); - let project_root = project_root.as_ref(); let (python_module, rust_module, extension_name) = if parts.len() > 1 { let mut rust_module = python_root.clone(); rust_module.extend(&parts[0..parts.len() - 1]); @@ -363,6 +371,7 @@ rust_module = %rust_module.display(), python_module = %python_module.display(), extension_name = %extension_name, + module_name = %module_name, "Project layout resolved" ); @@ -395,6 +404,15 @@ data, }) } else { + if custom_python_source { + eprintln!( + "â ï¸ Warning: You specified the python source as {}, but the python module at \ + {} is missing. No python module will be included.", + python_root.display(), + python_module.display() + ); + } + Ok(ProjectLayout { python_dir: python_root, python_packages, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/src/pyproject_toml.rs new/maturin-0.15.3/src/pyproject_toml.rs --- old/maturin-0.15.1/src/pyproject_toml.rs 2023-05-07 12:48:56.000000000 +0200 +++ new/maturin-0.15.3/src/pyproject_toml.rs 2023-05-20 17:12:23.000000000 +0200 @@ -1,9 +1,9 @@ //! A pyproject.toml as specified in PEP 517 use crate::PlatformTag; -use anyhow::{format_err, Result}; +use anyhow::{Context, Result}; use fs_err as fs; -use pyproject_toml::PyProjectToml as ProjectToml; +use pyproject_toml::{BuildSystem, Project}; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::path::{Path, PathBuf}; @@ -179,8 +179,10 @@ #[derive(Serialize, Deserialize, Debug, Clone)] #[serde(rename_all = "kebab-case")] pub struct PyProjectToml { - #[serde(flatten)] - inner: ProjectToml, + /// Build-related data + pub build_system: BuildSystem, + /// Project metadata + pub project: Option<Project>, /// PEP 518: The `[tool]` table is where any tool related to your Python project, not just build /// tools, can have users specify configuration data as long as they use a sub-table within /// `[tool]`, e.g. the flit tool would store its configuration in `[tool.flit]`. @@ -189,14 +191,6 @@ pub tool: Option<Tool>, } -impl std::ops::Deref for PyProjectToml { - type Target = ProjectToml; - - fn deref(&self) -> &Self::Target { - &self.inner - } -} - impl PyProjectToml { /// Returns the contents of a pyproject.toml with a `[build-system]` entry or an error /// @@ -205,8 +199,12 @@ pub fn new(pyproject_file: impl AsRef<Path>) -> Result<PyProjectToml> { let path = pyproject_file.as_ref(); let contents = fs::read_to_string(path)?; - let pyproject: PyProjectToml = toml::from_str(&contents) - .map_err(|err| format_err!("pyproject.toml is not PEP 517 compliant: {}", err))?; + let pyproject = toml::from_str(&contents).with_context(|| { + format!( + "pyproject.toml at {} is invalid", + pyproject_file.as_ref().display() + ) + })?; Ok(pyproject) } @@ -355,6 +353,7 @@ PyProjectToml, }; use fs_err as fs; + use indoc::indoc; use pretty_assertions::assert_eq; use std::path::Path; use tempfile::TempDir; @@ -497,4 +496,43 @@ ]) ); } + + #[test] + fn test_gh_1615() { + let source = indoc!( + r#"[build-system] + requires = [ "maturin>=0.14", "numpy", "wheel", "patchelf",] + build-backend = "maturin" + + [project] + name = "..." + license-files = [ "license.txt",] + requires-python = ">=3.8" + requires-dist = [ "maturin>=0.14", "...",] + dependencies = [ "packaging", "...",] + zip-safe = false + version = "..." + readme = "..." + description = "..." + classifiers = [ "...",] + "# + ); + let temp_dir = TempDir::new().unwrap(); + let pyproject_toml = temp_dir.path().join("pyproject.toml"); + fs::write(&pyproject_toml, source).unwrap(); + let outer_error = PyProjectToml::new(&pyproject_toml).unwrap_err(); + let inner_error = outer_error.source().unwrap(); + + assert_eq!( + inner_error.to_string(), + indoc!( + r#"TOML parse error at line 7, column 17 + | + 7 | license-files = [ "license.txt",] + | ^^^^^^^^^^^^^^^^^ + wanted string or table + "# + ) + ); + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/src/python_interpreter/mod.rs new/maturin-0.15.3/src/python_interpreter/mod.rs --- old/maturin-0.15.1/src/python_interpreter/mod.rs 2023-05-07 12:48:56.000000000 +0200 +++ new/maturin-0.15.3/src/python_interpreter/mod.rs 2023-05-20 17:12:23.000000000 +0200 @@ -364,7 +364,7 @@ /// and it's `executable` is empty pub runnable: bool, /// Comes from `sys.platform.name` - pub implmentation_name: String, + pub implementation_name: String, /// Comes from sysconfig var `SOABI` pub soabi: Option<String>, } @@ -433,7 +433,7 @@ impl PythonInterpreter { /// Does this interpreter have PEP 384 stable api aka. abi3 support? pub fn has_stable_api(&self) -> bool { - if self.implmentation_name.parse::<InterpreterKind>().is_err() { + if self.implementation_name.parse::<InterpreterKind>().is_err() { false } else { match self.interpreter_kind { @@ -465,12 +465,12 @@ } else { context.get_platform_tag(platform_tags)? }; - let tag = if self.implmentation_name.parse::<InterpreterKind>().is_err() { + let tag = if self.implementation_name.parse::<InterpreterKind>().is_err() { // Use generic tags when `sys.implementation.name` != `platform.python_implementation()`, for example Pyston // See also https://github.com/pypa/packaging/blob/0031046f7fad649580bc3127d1cef9157da0dd79/packaging/tags.py#L234-L261 format!( "{interpreter}{major}{minor}-{soabi}-{platform}", - interpreter = self.implmentation_name, + interpreter = self.implementation_name, major = self.major, minor = self.minor, soabi = self @@ -676,20 +676,20 @@ executable, platform, runnable: true, - implmentation_name: message.implementation_name, + implementation_name: message.implementation_name, soabi: message.soabi, })) } /// Construct a `PythonInterpreter` from a sysconfig and target pub fn from_config(config: InterpreterConfig) -> Self { - let implmentation_name = config.interpreter_kind.to_string().to_ascii_lowercase(); + let implementation_name = config.interpreter_kind.to_string().to_ascii_lowercase(); PythonInterpreter { config, executable: PathBuf::new(), platform: None, runnable: false, - implmentation_name, + implementation_name, soabi: None, } } @@ -879,7 +879,7 @@ let pointer_width = self.pointer_width.unwrap_or(64); format!( "{}-{}.{}-{}bit", - self.implmentation_name, self.major, self.minor, pointer_width + self.implementation_name, self.major, self.minor, pointer_width ) } @@ -928,3 +928,28 @@ } } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_find_interpreter_by_target() { + let target = + Target::from_target_triple(Some("x86_64-unknown-linux-gnu".to_string())).unwrap(); + let pythons = PythonInterpreter::find_by_target(&target, None); + assert_eq!(pythons.len(), 10); + + let pythons = PythonInterpreter::find_by_target( + &target, + Some(&VersionSpecifiers::from_str(">=3.7").unwrap()), + ); + assert_eq!(pythons.len(), 9); + + let pythons = PythonInterpreter::find_by_target( + &target, + Some(&VersionSpecifiers::from_str(">=3.10").unwrap()), + ); + assert_eq!(pythons.len(), 3); + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.15.1/src/source_distribution.rs new/maturin-0.15.3/src/source_distribution.rs --- old/maturin-0.15.1/src/source_distribution.rs 2023-05-07 12:48:56.000000000 +0200 +++ new/maturin-0.15.3/src/source_distribution.rs 2023-05-20 17:12:23.000000000 +0200 @@ -189,18 +189,22 @@ // ^^^^^^^^^^^^^^^^^^ table[&dep_name]["path"] // ^^^^^^^^^^^^^ dep_name for dep_category in ["dependencies", "dev-dependencies", "build-dependencies"] { - if let Some(table) = table.get_mut(dep_category).and_then(|x| x.as_table_mut()) { + if let Some(dep_table) = table.get_mut(dep_category).and_then(|x| x.as_table_mut()) { if dep_category == "dev-dependencies" && !known_path_deps.is_empty() { // Remove dev-dependencies since building from sdist doesn't need them, // Keep it when there are no path dependencies to support building from // sdist with `--locked`/`--frozen`. - table.remove(dep_category); + table.remove(dep_category).unwrap(); + debug!( + "Removing `dev-dependencies` from {} all together since there are no path dependencies", + manifest_path.display(), + ); rewritten = true; continue; } - let dep_names: Vec<_> = table.iter().map(|(key, _)| key.to_string()).collect(); + let dep_names: Vec<_> = dep_table.iter().map(|(key, _)| key.to_string()).collect(); for dep_name in dep_names { - let workspace_inherit = table + let workspace_inherit = dep_table .get(&dep_name) .and_then(|x| x.get("workspace")) .and_then(|x| x.as_bool()) @@ -208,10 +212,14 @@ if !workspace_inherit { // There should either be no value for path, or it should be a string - if table.get(&dep_name).and_then(|x| x.get("path")).is_none() { + if dep_table + .get(&dep_name) + .and_then(|x| x.get("path")) + .is_none() + { continue; } - if !table[&dep_name]["path"].is_str() { + if !dep_table[&dep_name]["path"].is_str() { bail!( "In {}, {} {} has a path value that is not a string", manifest_path.display(), @@ -235,12 +243,14 @@ if let Some(workspace_dep) = workspace_deps.and_then(|x| x.get(&dep_name)) { let mut workspace_dep = workspace_dep.clone(); // Merge optional and features from the current Cargo.toml - if table[&dep_name].get("optional").is_some() { + if dep_table[&dep_name].get("optional").is_some() { ensure_dep_is_inline_table(&mut workspace_dep); - workspace_dep["optional"] = table[&dep_name]["optional"].clone(); + workspace_dep["optional"] = + dep_table[&dep_name]["optional"].clone(); } - if let Some(features) = - table[&dep_name].get("features").and_then(|x| x.as_array()) + if let Some(features) = dep_table[&dep_name] + .get("features") + .and_then(|x| x.as_array()) { ensure_dep_is_inline_table(&mut workspace_dep); let existing_features = workspace_dep @@ -261,7 +271,7 @@ })?; existing_features.extend(features); } - table[&dep_name] = workspace_dep; + dep_table[&dep_name] = workspace_dep; rewritten = true; } else { bail!( @@ -276,7 +286,7 @@ } } // This is the location of the targeted crate in the source distribution - table[&dep_name]["path"] = if root_crate { + dep_table[&dep_name]["path"] = if root_crate { toml_edit::value(format!("{local_deps_folder}/{dep_name}")) } else { // Cargo.toml contains relative paths, and we're already in LOCAL_DEPENDENCIES_FOLDER @@ -284,7 +294,7 @@ }; if workspace_inherit { // Remove workspace inheritance now that we converted it into a path dependency - table[&dep_name] + dep_table[&dep_name] .as_table_like_mut() .unwrap() .remove("workspace"); ++++++ vendor.tar.xz ++++++ /work/SRC/openSUSE:Factory/python-maturin/vendor.tar.xz /work/SRC/openSUSE:Factory/.python-maturin.new.1533/vendor.tar.xz differ: char 26, line 1