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-06-11 19:55:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-maturin (Old) and /work/SRC/openSUSE:Factory/.python-maturin.new.15902 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-maturin" Sun Jun 11 19:55:36 2023 rev:32 rq:1092127 version:1.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-maturin/python-maturin.changes 2023-05-28 19:24:09.501431912 +0200 +++ /work/SRC/openSUSE:Factory/.python-maturin.new.15902/python-maturin.changes 2023-06-11 19:58:18.236253741 +0200 @@ -1,0 +2,18 @@ +Sun Jun 11 03:35:53 UTC 2023 - Mia Herkt <m...@0x0.st> + +- Update to v1.1.0: + * Add basic support for GraalPy + gh#PyO3/maturin#1645 + * Refactor abi tag to use `EXT_SUFFIX` + gh#PyO3/maturin#1648 + * Add Linux loongarch64 architecture support + gh#PyO3/maturin#1653 + * Add `--skip-install` option to `maturin develop` + gh#PyO3/maturin#1654 + +------------------------------------------------------------------- +Sat Jun 10 17:45:23 UTC 2023 - ecsos <ec...@opensuse.org> + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- Old: ---- maturin-1.0.1.tar.gz New: ---- maturin-1.1.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-maturin.spec ++++++ --- /var/tmp/diff_new_pack.lxO15N/_old 2023-06-11 19:58:19.188259481 +0200 +++ /var/tmp/diff_new_pack.lxO15N/_new 2023-06-11 19:58:19.196259530 +0200 @@ -16,8 +16,9 @@ # +%{?sle15_python_module_pythons} Name: python-maturin -Version: 1.0.1 +Version: 1.1.0 Release: 0 Summary: Rust/Python Interoperability License: Apache-2.0 OR MIT ++++++ maturin-1.0.1.tar.gz -> maturin-1.1.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/Cargo.lock new/maturin-1.1.0/Cargo.lock --- old/maturin-1.0.1/Cargo.lock 2023-05-28 04:31:17.000000000 +0200 +++ new/maturin-1.1.0/Cargo.lock 2023-06-10 14:17:57.000000000 +0200 @@ -230,9 +230,9 @@ [[package]] name = "cbindgen" -version = "0.24.3" +version = "0.24.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6358dedf60f4d9b8db43ad187391afe959746101346fe51bb978126bec61dfb" +checksum = "4b922faaf31122819ec80c4047cc684c6979a087366c069611e33649bf98e18d" dependencies = [ "heck", "indexmap", @@ -265,9 +265,9 @@ [[package]] name = "cfg-expr" -version = "0.15.1" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8790cf1286da485c72cf5fc7aeba308438800036ec67d89425924c4807268c9" +checksum = "e70d3ad08698a0568b0562f22710fe6bfc1f4a61a367c77d0398c562eadd453a" dependencies = [ "smallvec", ] @@ -617,17 +617,6 @@ [[package]] name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] - -[[package]] -name = "errno" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" @@ -673,7 +662,7 @@ dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "windows-sys 0.48.0", ] @@ -710,9 +699,9 @@ [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -735,9 +724,9 @@ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", @@ -831,9 +820,9 @@ [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -869,13 +858,14 @@ [[package]] name = "indicatif" -version = "0.17.3" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cef509aa9bc73864d6756f0d34d35504af3cf0844373afe9b8669a5b8005a729" +checksum = "8ff8cc23a7393a397ed1d7f56e6365cba772aba9f9912ab968b03043c395d057" dependencies = [ "console", + "instant", "number_prefix", - "portable-atomic 0.3.20", + "portable-atomic", "unicode-width", ] @@ -913,7 +903,7 @@ dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", - "rustix 0.37.19", + "rustix", "windows-sys 0.48.0", ] @@ -973,9 +963,9 @@ [[package]] name = "libc" -version = "0.2.144" +version = "0.2.146" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" [[package]] name = "linux-keyutils" @@ -989,12 +979,6 @@ [[package]] name = "linux-raw-sys" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" - -[[package]] -name = "linux-raw-sys" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" @@ -1011,12 +995,9 @@ [[package]] name = "log" -version = "0.4.17" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de" [[package]] name = "lzxd" @@ -1046,7 +1027,7 @@ [[package]] name = "maturin" -version = "1.0.1" +version = "1.1.0" dependencies = [ "anyhow", "base64 0.21.2", @@ -1148,9 +1129,9 @@ [[package]] name = "minijinja" -version = "0.33.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "933dc6e6e1f909926a2f6bf72ba8b8d6e38ab4f92778c77ea898001e044a30eb" +checksum = "75aa91cba87dcad6af3e53bc7adb9c99755eba2d49b6c5f10dbcc79d4727c1bd" dependencies = [ "serde", ] @@ -1266,15 +1247,15 @@ [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "openssl" -version = "0.10.52" +version = "0.10.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b8574602df80f7b85fdfc5392fa884a4e3b3f4f35402c070ab34c3d3f78d56" +checksum = "69b3f656a17a6cbc115b5c7a40c616947d213ba182135b014d6051b73ab6f019" dependencies = [ "bitflags", "cfg-if", @@ -1304,18 +1285,18 @@ [[package]] name = "openssl-src" -version = "111.25.3+1.1.1t" +version = "111.26.0+1.1.1u" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "924757a6a226bf60da5f7dd0311a34d2b52283dd82ddeb103208ddc66362f80c" +checksum = "efc62c9f12b22b8f5208c23a7200a442b2e5999f8bdf80233852122b5a4f6f37" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.87" +version = "0.9.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e17f59264b2809d77ae94f0e1ebabc434773f370d6ca667bd223ea10e06cc7e" +checksum = "c2ce0f250f34a308dcfdbb351f511359857d4ed2134ba715a4eadd46e1ffd617" dependencies = [ "cc", "libc", @@ -1373,7 +1354,7 @@ dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "windows-sys 0.42.0", ] @@ -1399,9 +1380,9 @@ [[package]] name = "pep508_rs" -version = "0.1.5" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969679a29dfdc8278a449f75b3dd45edf57e649bd59f7502429c2840751c46d8" +checksum = "c0713d7bb861ca2b7d4c50a38e1f31a4b63a2e2df35ef1e5855cc29e108453e2" dependencies = [ "once_cell", "pep440_rs", @@ -1415,9 +1396,9 @@ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project-lite" @@ -1449,18 +1430,9 @@ [[package]] name = "portable-atomic" -version = "0.3.20" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e30165d31df606f5726b090ec7592c308a0eaf61721ff64c9a3018e344a8753e" -dependencies = [ - "portable-atomic 1.3.2", -] - -[[package]] -name = "portable-atomic" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc59d1bcc64fc5d021d67521f818db868368028108d37f0e98d74e33f68297b5" +checksum = "767eb9f07d4a5ebcb39bbf2d452058a93c011373abf6832e24194a1c3f004794" [[package]] name = "ppv-lite86" @@ -1482,9 +1454,9 @@ [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" dependencies = [ "unicode-ident", ] @@ -1500,9 +1472,9 @@ [[package]] name = "pyproject-toml" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04dbbb336bd88583943c7cd973a32fed323578243a7569f40cb0c7da673321b" +checksum = "ee79feaa9d31e1c417e34219e610b67db4e786ce9b49d77dda549640abb9dc5f" dependencies = [ "indexmap", "pep440_rs", @@ -1603,13 +1575,22 @@ ] [[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags", +] + +[[package]] name = "redox_users" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", - "redox_syscall", + "redox_syscall 0.2.16", "thiserror", ] @@ -1679,29 +1660,15 @@ [[package]] name = "rustix" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03" -dependencies = [ - "bitflags", - "errno 0.2.8", - "io-lifetimes", - "libc", - "linux-raw-sys 0.1.4", - "windows-sys 0.42.0", -] - -[[package]] -name = "rustix" version = "0.37.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" dependencies = [ "bitflags", - "errno 0.3.1", + "errno", "io-lifetimes", "libc", - "linux-raw-sys 0.3.8", + "linux-raw-sys", "windows-sys 0.48.0", ] @@ -1826,18 +1793,18 @@ [[package]] name = "serde" -version = "1.0.163" +version = "1.0.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" dependencies = [ "proc-macro2", "quote", @@ -1944,9 +1911,9 @@ [[package]] name = "snapbox-macros" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "485e65c1203eb37244465e857d15a26d3a85a5410648ccb53b18bd44cb3a7336" +checksum = "eaaf09df9f0eeae82be96290918520214530e738a7fe5a351b0f24cf77c0ca31" [[package]] name = "socks" @@ -2031,15 +1998,16 @@ [[package]] name = "tempfile" -version = "3.4.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" +checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" dependencies = [ + "autocfg", "cfg-if", "fastrand", - "redox_syscall", - "rustix 0.36.7", - "windows-sys 0.42.0", + "redox_syscall 0.3.5", + "rustix", + "windows-sys 0.48.0", ] [[package]] @@ -2057,7 +2025,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" dependencies = [ - "rustix 0.37.19", + "rustix", "windows-sys 0.48.0", ] @@ -2369,9 +2337,9 @@ [[package]] name = "url" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", "idna", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/Cargo.toml new/maturin-1.1.0/Cargo.toml --- old/maturin-1.0.1/Cargo.toml 1970-01-01 01:00:00.000000000 +0100 +++ new/maturin-1.1.0/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 = "1.0.1" +version = "1.1.0" 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" @@ -47,7 +47,7 @@ semver = "1.0.13" target-lexicon = "0.12.0" indexmap = "1.9.3" -pyproject-toml = "0.6.0" +pyproject-toml = "0.6.1" python-pkginfo = "0.5.5" textwrap = "0.16.0" ignore = "0.4.20" @@ -56,8 +56,8 @@ cc = "1.0.72" dunce = "1.0.2" normpath = "1.0.0" -pep440_rs = { version = "0.3.3", features = ["serde"] } -pep508_rs = { version = "0.1.1", features = ["serde"] } +pep440_rs = { version = "0.3.6", features = ["serde"] } +pep508_rs = { version = "0.2.1", features = ["serde"] } same-file = "1.0.6" time = "0.3.17" @@ -76,7 +76,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.33.0", optional = true } +minijinja = { version = "0.34.0", optional = true } # upload bytesize = { version = "1.0.1", optional = true } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/Changelog.md new/maturin-1.1.0/Changelog.md --- old/maturin-1.0.1/Changelog.md 2023-05-28 04:31:17.000000000 +0200 +++ new/maturin-1.1.0/Changelog.md 2023-06-10 14:17:57.000000000 +0200 @@ -7,6 +7,13 @@ ## [Unreleased] +## [1.1.0] - 2023-06-10 + +* Add basic support for GraalPy in [#1645](https://github.com/PyO3/maturin/pull/1645) +* Refactor abi tag to use `EXT_SUFFIX` in [#1648](https://github.com/PyO3/maturin/pull/1648) +* Add Linux loongarch64 architecture support in [#1653](https://github.com/PyO3/maturin/pull/1653) +* Add `--skip-install` option to `maturin develop` in [#1654](https://github.com/PyO3/maturin/pull/1654) + ## [1.0.1] - 2023-05-28 * Add more Python 3.12 sysconfigs in [#1629](https://github.com/PyO3/maturin/pull/1629) @@ -878,7 +885,8 @@ * Initial Release -[Unreleased]: https://github.com/pyo3/maturin/compare/v1.0.1...HEAD +[Unreleased]: https://github.com/pyo3/maturin/compare/v1.1.0...HEAD +[1.1.0]: https://github.com/pyo3/maturin/compare/v1.0.1...v1.1.0 [1.0.1]: https://github.com/pyo3/maturin/compare/v1.0.0...v1.0.1 [1.0.0]: https://github.com/pyo3/maturin/compare/v0.15.3...v1.0.0 [0.15.3]: https://github.com/pyo3/maturin/compare/v0.15.2...v0.15.3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/PKG-INFO new/maturin-1.1.0/PKG-INFO --- old/maturin-1.0.1/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/maturin-1.1.0/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: maturin -Version: 1.0.1 +Version: 1.1.0 Classifier: Topic :: Software Development :: Build Tools Classifier: Programming Language :: Rust Classifier: Programming Language :: Python :: Implementation :: CPython @@ -37,7 +37,7 @@ Build and publish crates with pyo3, rust-cpython, cffi and uniffi bindings as well as rust binaries as python packages. This project is meant as a zero configuration replacement for [setuptools-rust](https://github.com/PyO3/setuptools-rust) and [milksnake](https://github.com/getsentry/milksnake). -It supports building wheels for python 3.5+ on windows, linux, mac and freebsd, can upload them to [pypi](https://pypi.org/) and has basic pypy support. +It supports building wheels for python 3.5+ on windows, linux, mac and freebsd, can upload them to [pypi](https://pypi.org/) and has basic pypy and graalpy support. Check out the [User Guide](https://maturin.rs/)! @@ -299,6 +299,7 @@ * [connector-x](https://github.com/sfu-db/connector-x/tree/main/connectorx-python) - ConnectorX enables you to load data from databases into Python in the fastest and most memory efficient way * [datafusion-python](https://github.com/apache/arrow-datafusion-python) - a Python library that binds to Apache Arrow in-memory query engine DataFusion * [deltalake-python](https://github.com/delta-io/delta-rs/tree/main/python) - Native Delta Lake Python binding based on delta-rs with Pandas integration +* [opendal](https://github.com/apache/incubator-opendal/tree/main/bindings/python) - OpenDAL Python Binding to access data freely * [orjson](https://github.com/ijl/orjson) - A fast, correct JSON library for Python * [polars](https://github.com/pola-rs/polars/tree/master/py-polars) - Fast multi-threaded DataFrame library in Rust | Python | Node.js * [pydantic-core](https://github.com/pydantic/pydantic-core) - Core validation logic for pydantic written in Rust diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/README.md new/maturin-1.1.0/README.md --- old/maturin-1.0.1/README.md 2023-05-28 04:31:17.000000000 +0200 +++ new/maturin-1.1.0/README.md 2023-06-10 14:17:57.000000000 +0200 @@ -12,7 +12,7 @@ Build and publish crates with pyo3, rust-cpython, cffi and uniffi bindings as well as rust binaries as python packages. This project is meant as a zero configuration replacement for [setuptools-rust](https://github.com/PyO3/setuptools-rust) and [milksnake](https://github.com/getsentry/milksnake). -It supports building wheels for python 3.5+ on windows, linux, mac and freebsd, can upload them to [pypi](https://pypi.org/) and has basic pypy support. +It supports building wheels for python 3.5+ on windows, linux, mac and freebsd, can upload them to [pypi](https://pypi.org/) and has basic pypy and graalpy support. Check out the [User Guide](https://maturin.rs/)! @@ -274,6 +274,7 @@ * [connector-x](https://github.com/sfu-db/connector-x/tree/main/connectorx-python) - ConnectorX enables you to load data from databases into Python in the fastest and most memory efficient way * [datafusion-python](https://github.com/apache/arrow-datafusion-python) - a Python library that binds to Apache Arrow in-memory query engine DataFusion * [deltalake-python](https://github.com/delta-io/delta-rs/tree/main/python) - Native Delta Lake Python binding based on delta-rs with Pandas integration +* [opendal](https://github.com/apache/incubator-opendal/tree/main/bindings/python) - OpenDAL Python Binding to access data freely * [orjson](https://github.com/ijl/orjson) - A fast, correct JSON library for Python * [polars](https://github.com/pola-rs/polars/tree/master/py-polars) - Fast multi-threaded DataFrame library in Rust | Python | Node.js * [pydantic-core](https://github.com/pydantic/pydantic-core) - Core validation logic for pydantic written in Rust diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/deny.toml new/maturin-1.1.0/deny.toml --- old/maturin-1.0.1/deny.toml 2023-05-28 04:31:17.000000000 +0200 +++ new/maturin-1.1.0/deny.toml 2023-06-10 14:17:57.000000000 +0200 @@ -185,7 +185,6 @@ { name = "syn" }, { name = "rustix", version = "0.36.7" }, { name = "linux-raw-sys", version = "0.1.4" }, - { name = "portable-atomic", version = "0.3.20" }, ] # 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-1.0.1/src/build_context.rs new/maturin-1.1.0/src/build_context.rs --- old/maturin-1.0.1/src/build_context.rs 2023-05-28 04:31:17.000000000 +0200 +++ new/maturin-1.1.0/src/build_context.rs 2023-06-10 14:17:57.000000000 +0200 @@ -42,7 +42,7 @@ /// providing crate, e.g. pyo3, the number is the minimum minor python version Bindings(String, usize), /// `Bindings`, but specifically for pyo3 with feature flags that allow building a single wheel - /// for all cpython versions (pypy still needs multiple versions). + /// for all cpython versions (pypy & graalpy still need multiple versions). /// The numbers are the minimum major and minor version BindingsAbi3(u8, u8), /// A native module with c bindings, i.e. `#[no_mangle] extern "C" <some item>` @@ -234,7 +234,9 @@ let interp_names: HashSet<_> = non_abi3_interps .iter() .map(|interp| match interp.interpreter_kind { - InterpreterKind::CPython => interp.implementation_name.to_string(), + InterpreterKind::CPython | InterpreterKind::GraalPy => { + interp.implementation_name.to_string() + } InterpreterKind::PyPy => "PyPy".to_string(), }) .collect(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/src/build_options.rs new/maturin-1.1.0/src/build_options.rs --- old/maturin-1.0.1/src/build_options.rs 2023-05-28 04:31:17.000000000 +0200 +++ new/maturin-1.1.0/src/build_options.rs 2023-06-10 14:17:57.000000000 +0200 @@ -261,14 +261,14 @@ .get("EXT_SUFFIX") .context("syconfig didn't define an `EXT_SUFFIX` ಠ_ಠ")?; let soabi = sysconfig_data.get("SOABI"); - let abi_tag = - soabi.and_then(|abi| abi.split('-').nth(1).map(ToString::to_string)); let interpreter_kind = soabi .and_then(|tag| { if tag.starts_with("pypy") { Some(InterpreterKind::PyPy) } else if tag.starts_with("cpython") { Some(InterpreterKind::CPython) + } else if tag.starts_with("graalpy") { + Some(InterpreterKind::GraalPy) } else { None } @@ -281,7 +281,6 @@ interpreter_kind, abiflags, ext_suffix: ext_suffix.to_string(), - abi_tag, pointer_width: None, }, executable: PathBuf::new(), @@ -349,7 +348,6 @@ interpreter_kind: InterpreterKind::CPython, abiflags: "".to_string(), ext_suffix: ".pyd".to_string(), - abi_tag: None, pointer_width: None, }, executable: PathBuf::new(), @@ -376,7 +374,6 @@ interpreter_kind: InterpreterKind::CPython, abiflags: "".to_string(), ext_suffix: ".pyd".to_string(), - abi_tag: None, pointer_width: None, }, executable: PathBuf::new(), @@ -416,7 +413,6 @@ interpreter_kind: InterpreterKind::CPython, abiflags: "".to_string(), ext_suffix: "".to_string(), - abi_tag: None, pointer_width: None, }, executable: PathBuf::new(), @@ -563,6 +559,8 @@ vec![PathBuf::from("python3")] } } else { + // XXX: False positive clippy warning + #[allow(clippy::redundant_clone)] self.interpreter.clone() }; self.find_interpreters(&bridge, &interpreter, &target, None, generate_import_lib)? @@ -1101,8 +1099,7 @@ requires_python: Option<&VersionSpecifiers>, ) -> Result<Vec<PythonInterpreter>> { let interpreters = if !interpreter.is_empty() { - PythonInterpreter::check_executables(interpreter, target, bridge) - .context("The given list of python interpreters is invalid")? + PythonInterpreter::check_executables(interpreter, target, bridge)? } else { PythonInterpreter::find_all(target, bridge, requires_python) .context("Finding python interpreters failed")? @@ -1132,6 +1129,11 @@ let python = interp.display().to_string(); let (python_impl, python_ver) = if let Some(ver) = python.strip_prefix("pypy") { (InterpreterKind::PyPy, ver.strip_prefix('-').unwrap_or(ver)) + } else if let Some(ver) = python.strip_prefix("graalpy") { + ( + InterpreterKind::GraalPy, + ver.strip_prefix('-').unwrap_or(ver), + ) } else if let Some(ver) = python.strip_prefix("python") { ( InterpreterKind::CPython, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/src/ci.rs new/maturin-1.1.0/src/ci.rs --- old/maturin-1.0.1/src/ci.rs 2023-05-28 04:31:17.000000000 +0200 +++ new/maturin-1.1.0/src/ci.rs 2023-06-10 14:17:57.000000000 +0200 @@ -240,35 +240,52 @@ " steps: - uses: actions/checkout@v3\n", ); - // setup python on demand - if setup_python { - conf.push_str( - " - uses: actions/setup-python@v4 - with: - python-version: '3.10'\n", - ); - if matches!(platform, Platform::Windows) { - conf.push_str(" architecture: ${{ matrix.target }}\n"); - } - } // install pyodide-build for emscripten if matches!(platform, Platform::Emscripten) { + // install stable pyodide-build conf.push_str(" - run: pip install pyodide-build\n"); - conf.push_str(" - shell: bash\n run: echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV\n"); + // get the current python version for the installed pyodide-build + conf.push_str( + " - name: Get Emscripten and Python version info + shell: bash + run: | + echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV + echo PYTHON_VERSION=$(pyodide config get python_version | cut -d '.' -f 1-2) >> $GITHUB_ENV + pip uninstall -y pyodide-build\n", + ); conf.push_str( " - uses: mymindstorm/setup-emsdk@v12 with: version: ${{ env.EMSCRIPTEN_VERSION }} actions-cache-folder: emsdk-cache\n", ); + conf.push_str( + " - uses: actions/setup-python@v4 + with: + python-version: ${{ env.PYTHON_VERSION }}\n", + ); + // install pyodide-build again in the right Python version + conf.push_str(" - run: pip install pyodide-build\n"); + } else { + // setup python on demand + if setup_python { + conf.push_str( + " - uses: actions/setup-python@v4 + with: + python-version: '3.10'\n", + ); + if matches!(platform, Platform::Windows) { + conf.push_str(" architecture: ${{ matrix.target }}\n"); + } + } } // build wheels let mut maturin_args = if is_abi3 || (is_bin && !setup_python) { Vec::new() } else if matches!(platform, Platform::Emscripten) { - vec!["-i".to_string(), "3.10".to_string()] + vec!["-i".to_string(), "${{ env.PYTHON_VERSION }}".to_string()] } else { vec!["--find-interpreter".to_string()] }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/src/compile.rs new/maturin-1.1.0/src/compile.rs --- old/maturin-1.0.1/src/compile.rs 2023-05-28 04:31:17.000000000 +0200 +++ new/maturin-1.1.0/src/compile.rs 2023-06-10 14:17:57.000000000 +0200 @@ -350,10 +350,10 @@ } if let BridgeModel::BindingsAbi3(_, _) = bridge_model { - let is_pypy = python_interpreter - .map(|p| p.interpreter_kind.is_pypy()) + let is_pypy_or_graalpy = python_interpreter + .map(|p| p.interpreter_kind.is_pypy() || p.interpreter_kind.is_graalpy()) .unwrap_or(false); - if !is_pypy && !target.is_windows() { + if !is_pypy_or_graalpy && !target.is_windows() { let pyo3_ver = pyo3_version(&context.cargo_metadata) .context("Failed to get pyo3 version from cargo metadata")?; if pyo3_ver < PYO3_ABI3_NO_PYTHON_VERSION { @@ -389,7 +389,8 @@ } else if (bridge_model.is_bindings("pyo3") || bridge_model.is_bindings("pyo3-ffi") || (matches!(bridge_model, BridgeModel::BindingsAbi3(_, _)) - && interpreter.interpreter_kind.is_pypy())) + && (interpreter.interpreter_kind.is_pypy() + || interpreter.interpreter_kind.is_graalpy()))) && env::var_os("PYO3_CONFIG_FILE").is_none() { let pyo3_config = interpreter.pyo3_config_file(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/src/develop.rs new/maturin-1.1.0/src/develop.rs --- old/maturin-1.0.1/src/develop.rs 2023-05-28 04:31:17.000000000 +0200 +++ new/maturin-1.1.0/src/develop.rs 2023-06-10 14:17:57.000000000 +0200 @@ -10,19 +10,57 @@ use std::process::Command; use tempfile::TempDir; +/// Install the crate as module in the current virtualenv +#[derive(Debug, clap::Parser)] +pub struct DevelopOptions { + /// Which kind of bindings to use + #[arg( + short = 'b', + long = "bindings", + alias = "binding-crate", + value_parser = ["pyo3", "pyo3-ffi", "rust-cpython", "cffi", "uniffi", "bin"] + )] + pub bindings: Option<String>, + /// Pass --release to cargo + #[arg(short = 'r', long)] + pub release: bool, + /// Strip the library for minimum file size + #[arg(long)] + pub strip: bool, + /// Install extra requires aka. optional dependencies + /// + /// Use as `--extras=extra1,extra2` + #[arg( + short = 'E', + long, + value_delimiter = ',', + action = clap::ArgAction::Append + )] + pub extras: Vec<String>, + /// Skip installation, only build the extension module inplace + /// + /// Only works with mixed Rust/Python project layout + #[arg(long)] + pub skip_install: bool, + /// `cargo rustc` options + #[command(flatten)] + pub cargo_options: CargoOptions, +} + /// Installs a crate by compiling it and copying the shared library to site-packages. /// Also adds the dist-info directory to make sure pip and other tools detect the library /// /// Works only in a virtualenv. #[allow(clippy::too_many_arguments)] -pub fn develop( - bindings: Option<String>, - cargo_options: CargoOptions, - venv_dir: &Path, - release: bool, - strip: bool, - extras: Vec<String>, -) -> Result<()> { +pub fn develop(develop_options: DevelopOptions, venv_dir: &Path) -> Result<()> { + let DevelopOptions { + bindings, + release, + strip, + extras, + skip_install, + cargo_options, + } = develop_options; let mut target_triple = cargo_options.target.as_ref().map(|x| x.to_string()); let target = Target::from_target_triple(cargo_options.target)?; let python = target.get_venv_python(venv_dir); @@ -117,22 +155,23 @@ } let wheels = build_context.build_wheels()?; - for (filename, _supported_version) in wheels.iter() { - let command = [ - "-m", - "pip", - "--disable-pip-version-check", - "install", - "--no-deps", - "--force-reinstall", - ]; - let output = Command::new(&python) - .args(command) - .arg(dunce::simplified(filename)) - .output() - .context(format!("pip install failed with {python:?}"))?; - if !output.status.success() { - bail!( + if !skip_install { + for (filename, _supported_version) in wheels.iter() { + let command = [ + "-m", + "pip", + "--disable-pip-version-check", + "install", + "--no-deps", + "--force-reinstall", + ]; + let output = Command::new(&python) + .args(command) + .arg(dunce::simplified(filename)) + .output() + .context(format!("pip install failed with {python:?}"))?; + if !output.status.success() { + bail!( "pip install in {} failed running {:?}: {}\n--- Stdout:\n{}\n--- Stderr:\n{}\n---\n", venv_dir.display(), &command, @@ -140,18 +179,19 @@ String::from_utf8_lossy(&output.stdout).trim(), String::from_utf8_lossy(&output.stderr).trim(), ); - } - if !output.stderr.is_empty() { + } + if !output.stderr.is_empty() { + eprintln!( + "â ï¸ Warning: pip raised a warning running {:?}:\n{}", + &command, + String::from_utf8_lossy(&output.stderr).trim(), + ); + } eprintln!( - "â ï¸ Warning: pip raised a warning running {:?}:\n{}", - &command, - String::from_utf8_lossy(&output.stderr).trim(), + "ð Installed {}-{}", + build_context.metadata21.name, build_context.metadata21.version ); } - eprintln!( - "ð Installed {}-{}", - build_context.metadata21.name, build_context.metadata21.version - ); } Ok(()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/src/lib.rs new/maturin-1.1.0/src/lib.rs --- old/maturin-1.0.1/src/lib.rs 2023-05-28 04:31:17.000000000 +0200 +++ new/maturin-1.1.0/src/lib.rs 2023-06-10 14:17:57.000000000 +0200 @@ -27,7 +27,7 @@ pub use crate::build_options::{BuildOptions, CargoOptions}; pub use crate::cargo_toml::CargoToml; pub use crate::compile::{compile, BuildArtifact}; -pub use crate::develop::develop; +pub use crate::develop::{develop, DevelopOptions}; pub use crate::metadata::{Metadata21, WheelMetadata}; pub use crate::module_writer::{ write_dist_info, ModuleWriter, PathWriter, SDistWriter, WheelWriter, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/src/main.rs new/maturin-1.1.0/src/main.rs --- old/maturin-1.0.1/src/main.rs 2023-05-28 04:31:17.000000000 +0200 +++ new/maturin-1.1.0/src/main.rs 2023-06-10 14:17:57.000000000 +0200 @@ -12,8 +12,8 @@ #[cfg(feature = "scaffolding")] use maturin::{ci::GenerateCI, init_project, new_project, GenerateProjectOptions}; use maturin::{ - develop, write_dist_info, BridgeModel, BuildOptions, CargoOptions, PathWriter, PlatformTag, - PythonInterpreter, Target, + develop, write_dist_info, BridgeModel, BuildOptions, CargoOptions, DevelopOptions, PathWriter, + PlatformTag, PythonInterpreter, Target, }; #[cfg(feature = "upload")] use maturin::{upload_ui, PublishOpt}; @@ -73,36 +73,7 @@ }, #[command(name = "develop", alias = "dev")] /// Install the crate as module in the current virtualenv - /// - /// Note that this command doesn't create entrypoints - Develop { - /// Which kind of bindings to use - #[arg( - short = 'b', - long = "bindings", - alias = "binding-crate", - value_parser = ["pyo3", "pyo3-ffi", "rust-cpython", "cffi", "uniffi", "bin"] - )] - bindings: Option<String>, - /// Pass --release to cargo - #[arg(short = 'r', long)] - release: bool, - /// Strip the library for minimum file size - #[arg(long)] - strip: bool, - /// Install extra requires aka. optional dependencies - /// - /// Use as `--extras=extra1,extra2` - #[arg( - short = 'E', - long, - value_delimiter = ',', - action = clap::ArgAction::Append - )] - extras: Vec<String>, - #[command(flatten)] - cargo_options: CargoOptions, - }, + Develop(DevelopOptions), /// Build only a source distribution (sdist) without compiling. /// /// Building a source distribution requires a pyproject.toml with a `[build-system]` table. @@ -404,16 +375,10 @@ eprintln!(" - {interpreter}"); } } - Opt::Develop { - bindings, - release, - strip, - extras, - cargo_options, - } => { - let target = Target::from_target_triple(cargo_options.target.clone())?; + Opt::Develop(develop_options) => { + let target = Target::from_target_triple(develop_options.cargo_options.target.clone())?; let venv_dir = detect_venv(&target)?; - develop(bindings, cargo_options, &venv_dir, release, strip, extras)?; + develop(develop_options, &venv_dir)?; } Opt::SDist { manifest_path, out } => { let build_options = BuildOptions { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/src/module_writer.rs new/maturin-1.1.0/src/module_writer.rs --- old/maturin-1.0.1/src/module_writer.rs 2023-05-28 04:31:17.000000000 +0200 +++ new/maturin-1.1.0/src/module_writer.rs 2023-06-10 14:17:57.000000000 +0200 @@ -1162,9 +1162,8 @@ if source.is_dir() { writer.add_directory(target)?; } else { - let permissions = source.metadata()?.permissions(); #[cfg(unix)] - let mode = permissions.mode(); + let mode = source.metadata()?.permissions().mode(); #[cfg(not(unix))] let mode = 0o644; writer.add_file_with_permissions(target, source, mode)?; @@ -1254,9 +1253,8 @@ .build() { let file = file?; - let permissions = file.metadata()?.permissions(); #[cfg(unix)] - let mode = permissions.mode(); + let mode = file.metadata()?.permissions().mode(); #[cfg(not(unix))] let mode = 0o644; let relative = file.path().strip_prefix(data.parent().unwrap()).unwrap(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/src/python_interpreter/config.rs new/maturin-1.1.0/src/python_interpreter/config.rs --- old/maturin-1.0.1/src/python_interpreter/config.rs 2023-05-28 04:31:17.000000000 +0200 +++ new/maturin-1.1.0/src/python_interpreter/config.rs 2023-06-10 14:17:57.000000000 +0200 @@ -9,6 +9,7 @@ use std::path::Path; const PYPY_ABI_TAG: &str = "pp73"; +const GRAALPY_ABI_TAG: &str = "graalpy230_310_native"; /// Some of the sysconfigdata of Python interpreter we care about #[derive(Debug, Clone, Deserialize, Eq, PartialEq)] @@ -17,7 +18,7 @@ pub major: usize, /// Python's minor version pub minor: usize, - /// cpython or pypy + /// cpython, pypy, or graalpy #[serde(rename = "interpreter")] pub interpreter_kind: InterpreterKind, /// For linux and mac, this contains the value of the abiflags, e.g. "m" @@ -28,10 +29,6 @@ pub abiflags: String, /// Suffix to use for extension modules as given by sysconfig. pub ext_suffix: String, - /// Part of sysconfig's SOABI specifying {major}{minor}{abiflags} - /// - /// Note that this always `None` on windows - pub abi_tag: Option<String>, /// Pointer width pub pointer_width: Option<usize>, } @@ -68,7 +65,7 @@ target.target_env().to_string().replace("musl", "gnu") } } - PyPy => "gnu".to_string(), + PyPy | GraalPy => "gnu".to_string(), }; match (target.target_os(), python_impl) { (Os::Linux, CPython) => { @@ -77,10 +74,10 @@ } else { "".to_string() }; - let abi_tag = format!("{}{}{}", major, minor, abiflags); + let ldversion = format!("{}{}{}", major, minor, abiflags); let ext_suffix = format!( ".cpython-{}-{}-linux-{}.so", - abi_tag, python_arch, target_env + ldversion, python_arch, target_env ); Some(Self { major, @@ -88,23 +85,18 @@ interpreter_kind: CPython, abiflags, ext_suffix, - abi_tag: Some(abi_tag), pointer_width: Some(target.pointer_width()), }) } (Os::Linux, PyPy) => { - let abi_tag = PYPY_ABI_TAG.to_string(); - let ext_suffix = format!( - ".pypy{}{}-{}-{}-linux-{}.so", - major, minor, abi_tag, python_arch, target_env - ); + let abi_tag = format!("pypy{}{}-{}", major, minor, PYPY_ABI_TAG); + let ext_suffix = format!(".{}-{}-linux-{}.so", abi_tag, python_arch, target_env); Some(Self { major, minor, interpreter_kind: PyPy, abiflags: String::new(), ext_suffix, - abi_tag: Some(abi_tag), pointer_width: Some(target.pointer_width()), }) } @@ -114,28 +106,25 @@ } else { "".to_string() }; - let abi_tag = format!("{}{}{}", major, minor, abiflags); - let ext_suffix = format!(".cpython-{}-darwin.so", abi_tag); + let ldversion = format!("{}{}{}", major, minor, abiflags); + let ext_suffix = format!(".cpython-{}-darwin.so", ldversion); Some(Self { major, minor, interpreter_kind: CPython, abiflags, ext_suffix, - abi_tag: Some(abi_tag), pointer_width: Some(target.pointer_width()), }) } (Os::Macos, PyPy) => { - let abi_tag = PYPY_ABI_TAG.to_string(); - let ext_suffix = format!(".pypy{}{}-{}-darwin.so", major, minor, abi_tag); + let ext_suffix = format!(".pypy{}{}-{}-darwin.so", major, minor, PYPY_ABI_TAG); Some(Self { major, minor, interpreter_kind: PyPy, abiflags: String::new(), ext_suffix, - abi_tag: Some(abi_tag), pointer_width: Some(target.pointer_width()), }) } @@ -157,7 +146,6 @@ interpreter_kind: CPython, abiflags: String::new(), ext_suffix, - abi_tag: None, pointer_width: Some(target.pointer_width()), }) } @@ -166,15 +154,13 @@ // PyPy on Windows only supports x86_64 return None; } - let abi_tag = PYPY_ABI_TAG.to_string(); - let ext_suffix = format!(".pypy{}{}-{}-win_amd64.pyd", major, minor, abi_tag); + let ext_suffix = format!(".pypy{}{}-{}-win_amd64.pyd", major, minor, PYPY_ABI_TAG); Some(Self { major, minor, interpreter_kind: PyPy, abiflags: String::new(), ext_suffix, - abi_tag: Some(abi_tag), pointer_width: Some(target.pointer_width()), }) } @@ -184,19 +170,16 @@ } else { ("".to_string(), format!(".cpython-{}{}.so", major, minor)) }; - let abi_tag = format!("{}{}{}", major, minor, abiflags); Some(Self { major, minor, interpreter_kind: CPython, abiflags, ext_suffix, - abi_tag: Some(abi_tag), pointer_width: Some(target.pointer_width()), }) } (Os::NetBsd, CPython) => { - let abi_tag = format!("{}{}", major, minor); let ext_suffix = ".so".to_string(); Some(Self { major, @@ -204,33 +187,30 @@ interpreter_kind: CPython, abiflags: String::new(), ext_suffix, - abi_tag: Some(abi_tag), pointer_width: Some(target.pointer_width()), }) } (Os::OpenBsd, CPython) => { - let abi_tag = format!("{}{}", major, minor); - let ext_suffix = format!(".cpython-{}.so", abi_tag); + let ldversion = format!("{}{}", major, minor); + let ext_suffix = format!(".cpython-{}.so", ldversion); Some(Self { major, minor, interpreter_kind: CPython, abiflags: String::new(), ext_suffix, - abi_tag: Some(abi_tag), pointer_width: Some(target.pointer_width()), }) } (Os::Emscripten, CPython) => { - let abi_tag = format!("{}{}", major, minor); - let ext_suffix = format!(".cpython-{}-{}-emscripten.so", abi_tag, python_arch); + let ldversion = format!("{}{}", major, minor); + let ext_suffix = format!(".cpython-{}-{}-emscripten.so", ldversion, python_arch); Some(Self { major, minor, interpreter_kind: CPython, abiflags: String::new(), ext_suffix, - abi_tag: Some(abi_tag), pointer_width: Some(target.pointer_width()), }) } @@ -316,6 +296,7 @@ } } InterpreterKind::PyPy => abi_tag.unwrap_or_else(|| PYPY_ABI_TAG.to_string()), + InterpreterKind::GraalPy => abi_tag.unwrap_or_else(|| GRAALPY_ABI_TAG.to_string()), }; let file_ext = if target.is_windows() { "pyd" } else { "so" }; let ext_suffix = if target.is_linux() || target.is_macos() { @@ -350,6 +331,16 @@ file_ext, ) }), + InterpreterKind::GraalPy => ext_suffix.unwrap_or_else(|| { + // e.g. .graalpy230-310-native-x86_64-linux.so + format!( + ".{}-{}-{}.{}", + abi_tag.replace('_', "-"), + target.get_python_arch(), + target.get_python_os(), + file_ext, + ) + }), } } else if target.is_emscripten() && matches!(interpreter_kind, InterpreterKind::CPython) { ext_suffix.unwrap_or_else(|| { @@ -370,7 +361,6 @@ interpreter_kind, abiflags: abiflags.unwrap_or_default(), ext_suffix, - abi_tag: Some(abi_tag), pointer_width, }) } @@ -470,7 +460,6 @@ ) .unwrap(); assert_eq!(sysconfig.abiflags, ""); - assert_eq!(sysconfig.abi_tag.as_deref(), Some("pp73")); assert_eq!(sysconfig.ext_suffix, ".pypy39-pp73-x86_64-linux-gnu.so"); let sysconfig = InterpreterConfig::lookup_one( @@ -548,7 +537,6 @@ ) .unwrap(); assert_eq!(sysconfig.abiflags, "m"); - assert_eq!(sysconfig.abi_tag.as_deref(), Some("37m")); assert_eq!(sysconfig.ext_suffix, ".cpython-37m-darwin.so"); // PyPy @@ -559,7 +547,6 @@ ) .unwrap(); assert_eq!(sysconfig.abiflags, ""); - assert_eq!(sysconfig.abi_tag.as_deref(), Some("pp73")); assert_eq!(sysconfig.ext_suffix, ".pypy39-pp73-darwin.so"); let sysconfig = InterpreterConfig::lookup_one( @@ -618,7 +605,6 @@ ) .unwrap(); assert_eq!(sysconfig.abiflags, "m"); - assert_eq!(sysconfig.abi_tag.as_deref(), Some("37m")); assert_eq!(sysconfig.ext_suffix, ".so"); let sysconfig = InterpreterConfig::lookup_one( @@ -628,7 +614,6 @@ ) .unwrap(); assert_eq!(sysconfig.abiflags, ""); - assert_eq!(sysconfig.abi_tag.as_deref(), Some("310")); assert_eq!(sysconfig.ext_suffix, ".cpython-310.so"); let sysconfig = InterpreterConfig::lookup_one( @@ -666,7 +651,6 @@ ) .unwrap(); assert_eq!(sysconfig.abiflags, ""); - assert_eq!(sysconfig.abi_tag.as_deref(), Some("37")); assert_eq!(sysconfig.ext_suffix, ".so"); let sysconfig = InterpreterConfig::lookup_one( @@ -716,7 +700,6 @@ ) .unwrap(); assert_eq!(sysconfig.abiflags, ""); - assert_eq!(sysconfig.abi_tag.as_deref(), Some("310")); assert_eq!(sysconfig.ext_suffix, ".cpython-310-wasm32-emscripten.so"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/src/python_interpreter/get_interpreter_metadata.py new/maturin-1.1.0/src/python_interpreter/get_interpreter_metadata.py --- old/maturin-1.0.1/src/python_interpreter/get_interpreter_metadata.py 2023-05-28 04:31:17.000000000 +0200 +++ new/maturin-1.1.0/src/python_interpreter/get_interpreter_metadata.py 2023-06-10 14:17:57.000000000 +0200 @@ -30,7 +30,6 @@ "interpreter": platform.python_implementation().lower(), "ext_suffix": ext_suffix, "soabi": sysconfig.get_config_var("SOABI") or None, - "abi_tag": (sysconfig.get_config_var("SOABI") or "-").split("-")[1] or None, "platform": sysconfig.get_platform(), # This one isn't technically necessary, but still very useful for sanity checks "system": platform.system().lower(), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/src/python_interpreter/mod.rs new/maturin-1.1.0/src/python_interpreter/mod.rs --- old/maturin-1.0.1/src/python_interpreter/mod.rs 2023-05-28 04:31:17.000000000 +0200 +++ new/maturin-1.1.0/src/python_interpreter/mod.rs 2023-06-10 14:17:57.000000000 +0200 @@ -277,7 +277,6 @@ interpreter_kind: InterpreterKind::CPython, abiflags: String::new(), ext_suffix: String::new(), - abi_tag: None, pointer_width: Some(pointer_width), })) } else { @@ -291,6 +290,7 @@ pub enum InterpreterKind { CPython, PyPy, + GraalPy, } impl InterpreterKind { @@ -303,6 +303,11 @@ pub fn is_pypy(&self) -> bool { matches!(self, InterpreterKind::PyPy) } + + /// Is this a GraalPy interpreter? + pub fn is_graalpy(&self) -> bool { + matches!(self, InterpreterKind::GraalPy) + } } impl fmt::Display for InterpreterKind { @@ -310,6 +315,7 @@ match *self { InterpreterKind::CPython => write!(f, "CPython"), InterpreterKind::PyPy => write!(f, "PyPy"), + InterpreterKind::GraalPy => write!(f, "GraalPy"), } } } @@ -321,6 +327,7 @@ match s.to_ascii_lowercase().as_str() { "cpython" => Ok(InterpreterKind::CPython), "pypy" => Ok(InterpreterKind::PyPy), + "graalvm" | "graalpy" => Ok(InterpreterKind::GraalPy), unknown => Err(format!("Unknown interpreter kind '{unknown}'")), } } @@ -341,7 +348,6 @@ // comes from `platform.system()` system: String, soabi: Option<String>, - abi_tag: Option<String>, } /// The location and version of an interpreter @@ -407,8 +413,8 @@ ); } - if message.interpreter == "pypy" { - // pypy does not specify abi flags + if message.interpreter == "pypy" || message.interpreter == "graalvm" { + // pypy and graalpy do not specify abi flags Ok("".to_string()) } else if message.system == "windows" { if matches!(message.abiflags.as_deref(), Some("") | None) { @@ -438,7 +444,7 @@ } else { match self.interpreter_kind { InterpreterKind::CPython => true, - InterpreterKind::PyPy => false, + InterpreterKind::PyPy | InterpreterKind::GraalPy => false, } } } @@ -505,17 +511,29 @@ // pypy uses its version as part of the ABI, e.g. // pypy 3.7 7.3 => numpy-1.20.1-pp37-pypy37_pp73-manylinux2014_x86_64.whl format!( - "pp{major}{minor}-pypy{major}{minor}_{abi_tag}-{platform}", + "pp{major}{minor}-{abi_tag}-{platform}", major = self.major, minor = self.minor, - // TODO: Proper tag handling for pypy - abi_tag = self - .abi_tag - .clone() - .expect("PyPy's syconfig didn't define an `SOABI` ಠ_ಠ"), + abi_tag = calculate_abi_tag(&self.ext_suffix) + .expect("PyPy's syconfig didn't define a valid `EXT_SUFFIX` ಠ_ಠ"), platform = platform, ) } + InterpreterKind::GraalPy => { + // GraalPy suffers from pypa/packaging#614, where + // packaging misdetects it as a 32-bit implementation, + // so GraalPy adds the correct platform itself, e.g. + // graalpy 3.10 23.1 => numpy-1.23.5-graalpy310-graalpy231_310_native_x86_64_linux-linux_i686.whl + format!( + "graalpy{major}{minor}-{abi_tag}_{arch}_{os}-{os}_i686", + major = self.major, + minor = self.minor, + abi_tag = calculate_abi_tag(&self.ext_suffix) + .expect("GraalPy's syconfig didn't define a valid `EXT_SUFFIX` ಠ_ಠ"), + os = target.get_python_os(), + arch = target.get_python_arch(), + ) + } } }; Ok(tag) @@ -635,6 +653,7 @@ let interpreter = match message.interpreter.as_str() { "cpython" => InterpreterKind::CPython, "pypy" => InterpreterKind::PyPy, + "graalvm" | "graalpy" => InterpreterKind::GraalPy, other => { bail!("Unsupported interpreter {}", other); } @@ -670,7 +689,6 @@ ext_suffix: message .ext_suffix .context("syconfig didn't define an `EXT_SUFFIX` ಠ_ಠ")?, - abi_tag: message.abi_tag, pointer_width: None, }, executable, @@ -888,7 +906,7 @@ pub fn get_venv_site_package(&self, venv_base: impl AsRef<Path>, target: &Target) -> PathBuf { if target.is_unix() { match self.interpreter_kind { - InterpreterKind::CPython => { + InterpreterKind::CPython | InterpreterKind::GraalPy => { let python_dir = format!("python{}.{}", self.major, self.minor); venv_base .as_ref() @@ -929,6 +947,35 @@ } } +/// Calculate the ABI tag from EXT_SUFFIX +fn calculate_abi_tag(ext_suffix: &str) -> Option<String> { + let parts = ext_suffix.split('.').collect::<Vec<_>>(); + if parts.len() < 3 { + // CPython3.7 and earlier uses ".pyd" on Windows. + return None; + } + let soabi = parts[1]; + let mut soabi_split = soabi.split('-'); + let abi = if soabi.starts_with("cpython") { + // non-windows + format!("cp{}", soabi_split.nth(1).unwrap()) + } else if soabi.starts_with("cp") { + // windows + soabi_split.next().unwrap().to_string() + } else if soabi.starts_with("pypy") { + soabi_split.take(2).collect::<Vec<_>>().join("-") + } else if soabi.starts_with("graalpy") { + soabi_split.take(3).collect::<Vec<_>>().join("-") + } else if !soabi.is_empty() { + // pyston, ironpython, others? + soabi_split.nth(1).unwrap().to_string() + } else { + return None; + }; + let abi_tag = abi.replace(['.', '-', ' '], "_"); + Some(abi_tag) +} + #[cfg(test)] mod tests { use super::*; @@ -952,4 +999,28 @@ ); assert_eq!(pythons.len(), 4); } + + #[test] + fn test_calculate_abi_tag() { + let cases = vec![ + (".cpython-37m-x86_64-linux-gnu.so", Some("cp37m")), + (".cpython-310-x86_64-linux-gnu.so", Some("cp310")), + (".cpython-310-darwin.so", Some("cp310")), + (".cp310-win_amd64.pyd", Some("cp310")), + (".cp39-mingw_x86_64.pyd", Some("cp39")), + (".cpython-312-wasm32-wasi.so", Some("cp312")), + (".cpython-38.so", Some("cp38")), + (".pyd", None), + (".so", None), + (".pypy38-pp73-x86_64-linux-gnu.so", Some("pypy38_pp73")), + ( + ".graalpy-38-native-x86_64-darwin.dylib", + Some("graalpy_38_native"), + ), + (".pyston-23-x86_64-linux-gnu.so", Some("23")), + ]; + for (ext_suffix, expected) in cases { + assert_eq!(calculate_abi_tag(ext_suffix).as_deref(), expected); + } + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/src/target.rs new/maturin-1.1.0/src/target.rs --- old/maturin-1.0.1/src/target.rs 2023-05-28 04:31:17.000000000 +0200 +++ new/maturin-1.1.0/src/target.rs 2023-06-10 14:17:57.000000000 +0200 @@ -73,6 +73,7 @@ Mips64el, Mipsel, Sparc64, + LoongArch64, } impl fmt::Display for Arch { @@ -92,6 +93,7 @@ Arch::Mips64el => write!(f, "mips64el"), Arch::Mipsel => write!(f, "mipsel"), Arch::Sparc64 => write!(f, "sparc64"), + Arch::LoongArch64 => write!(f, "loongarch64"), } } } @@ -115,6 +117,7 @@ Arch::Sparc64 => "sparc64", Arch::Wasm32 => "wasm32", Arch::S390X => "s390x", + Arch::LoongArch64 => "loongarch64", } } } @@ -136,6 +139,7 @@ Arch::Mips64el, Arch::Mipsel, Arch::Sparc64, + Arch::LoongArch64, ], Os::Windows => vec![Arch::X86, Arch::X86_64, Arch::Aarch64], Os::Macos => vec![Arch::Aarch64, Arch::X86_64], @@ -243,6 +247,7 @@ Architecture::Mips64(Mips64Architecture::Mips64el) => Arch::Mips64el, Architecture::Mips32(Mips32Architecture::Mipsel) => Arch::Mipsel, Architecture::Sparc64 => Arch::Sparc64, + Architecture::LoongArch64 => Arch::LoongArch64, unsupported => bail!("The architecture {} is not supported", unsupported), }; @@ -323,6 +328,7 @@ Arch::Mips64el => "mips64", Arch::Mipsel => "mips", Arch::Sparc64 => "sparc64", + Arch::LoongArch64 => "loongarch64", } } @@ -366,7 +372,8 @@ | Arch::Mips64el | Arch::Mipsel | Arch::Powerpc - | Arch::Sparc64 => PlatformTag::Linux, + | Arch::Sparc64 + | Arch::LoongArch64 => PlatformTag::Linux, } } @@ -380,7 +387,8 @@ | Arch::S390X | Arch::Riscv64 | Arch::Mips64el - | Arch::Sparc64 => 64, + | Arch::Sparc64 + | Arch::LoongArch64 => 64, Arch::Armv6L | Arch::Armv7L | Arch::X86 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-1.0.1/src/templates/Cargo.toml.j2 new/maturin-1.1.0/src/templates/Cargo.toml.j2 --- old/maturin-1.0.1/src/templates/Cargo.toml.j2 2023-05-28 04:31:17.000000000 +0200 +++ new/maturin-1.1.0/src/templates/Cargo.toml.j2 2023-06-10 14:17:57.000000000 +0200 @@ -12,7 +12,7 @@ [dependencies] {% if bindings == "pyo3" -%} -pyo3 = "0.18.3" +pyo3 = "0.19.0" {% elif bindings == "rust-cpython" -%} cpython = "0.7.1" {% elif bindings == "uniffi" -%} ++++++ vendor.tar.xz ++++++ /work/SRC/openSUSE:Factory/python-maturin/vendor.tar.xz /work/SRC/openSUSE:Factory/.python-maturin.new.15902/vendor.tar.xz differ: char 27, line 1