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 2021-08-03 22:48:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-maturin (Old) and /work/SRC/openSUSE:Factory/.python-maturin.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-maturin" Tue Aug 3 22:48:46 2021 rev:5 rq:909889 version:0.11.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-maturin/python-maturin.changes 2021-07-12 01:25:29.885018421 +0200 +++ /work/SRC/openSUSE:Factory/.python-maturin.new.1899/python-maturin.changes 2021-08-03 22:49:12.192463402 +0200 @@ -1,0 +2,13 @@ +Tue Aug 3 00:40:29 UTC 2021 - Mia Herkt <m...@0x0.st> + +- Update to 0.11.2 + * Use UTF-8 encoding when reading `pyproject.toml` + gh#PyO3/maturin#588 + * Use Cargo's `repository` field as `Source Code` in project URL + gh#PyO3/maturin#590 + * Fold long header fields in Python metadata + gh#PyO3/maturin#594 + * Fix `maturin develop` for PyPy on Unix + gh#PyO3/maturin#596 + +------------------------------------------------------------------- Old: ---- maturin-0.11.1.tar.gz New: ---- maturin-0.11.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-maturin.spec ++++++ --- /var/tmp/diff_new_pack.AZ24UG/_old 2021-08-03 22:49:13.012462413 +0200 +++ /var/tmp/diff_new_pack.AZ24UG/_new 2021-08-03 22:49:13.016462408 +0200 @@ -19,7 +19,7 @@ %define skip_python2 1 %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-maturin -Version: 0.11.1 +Version: 0.11.2 Release: 0 Summary: Rust/Python Interoperability License: Apache-2.0 OR MIT ++++++ maturin-0.11.1.tar.gz -> maturin-0.11.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.11.1/.github/workflows/test.yml new/maturin-0.11.2/.github/workflows/test.yml --- old/maturin-0.11.1/.github/workflows/test.yml 2021-07-10 03:53:14.000000000 +0200 +++ new/maturin-0.11.2/.github/workflows/test.yml 2021-07-20 12:56:03.000000000 +0200 @@ -26,7 +26,7 @@ python-version: 3.8 - uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: 3.9.5 - name: Install cffi and virtualenv run: pip install cffi virtualenv - uses: actions-rs/toolchain@v1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.11.1/Cargo.lock new/maturin-0.11.2/Cargo.lock --- old/maturin-0.11.1/Cargo.lock 2021-07-10 03:53:14.000000000 +0200 +++ new/maturin-0.11.2/Cargo.lock 2021-07-20 12:56:03.000000000 +0200 @@ -246,9 +246,9 @@ [[package]] name = "cc" -version = "1.0.68" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a72c244c1ff497a746a7e1fb3d14bd08420ecda70c8f25c7112f2781652d787" +checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" [[package]] name = "cfg-if" @@ -285,7 +285,7 @@ "atty", "bitflags", "strsim", - "textwrap", + "textwrap 0.11.0", "unicode-width", "vec_map", ] @@ -821,9 +821,9 @@ [[package]] name = "mailparse" -version = "0.13.4" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62db73ff1a42b0e3a8858cf0d5c183bdfc23491f7294ae4a8200c83577457386" +checksum = "c06f526fc13a50f46a3689a6f438cb833c59817c898bb40a3954f341ddf74ce1" dependencies = [ "base64 0.13.0", "charset", @@ -838,7 +838,7 @@ [[package]] name = "maturin" -version = "0.11.1" +version = "0.11.2" dependencies = [ "anyhow", "base64 0.13.0", @@ -872,6 +872,7 @@ "tar", "target-lexicon", "tempfile", + "textwrap 0.14.2", "thiserror", "toml", "walkdir", @@ -1570,6 +1571,12 @@ checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" [[package]] +name = "smawk" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" + +[[package]] name = "socket2" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1617,9 +1624,9 @@ [[package]] name = "subtle" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" @@ -1645,9 +1652,9 @@ [[package]] name = "target-lexicon" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ae3b39281e4b14b8123bdbaddd472b7dfe215e444181f2f9d2443c2444f834" +checksum = "b0652da4c4121005e9ed22b79f6c5f2d9e2752906b53a33e9490489ba421a6fb" [[package]] name = "tempfile" @@ -1682,6 +1689,17 @@ ] [[package]] +name = "textwrap" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80" +dependencies = [ + "smawk", + "unicode-linebreak", + "unicode-width", +] + +[[package]] name = "thiserror" version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1728,9 +1746,9 @@ [[package]] name = "tokio" -version = "1.8.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c8b05dc14c75ea83d63dd391100353789f5f24b8b3866542a5e85c8be8e985" +checksum = "c2602b8af3767c285202012822834005f596c811042315fa7e9f5b12b2a43207" dependencies = [ "autocfg", "bytes", @@ -1833,6 +1851,15 @@ ] [[package]] +name = "unicode-linebreak" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05a31f45d18a3213b918019f78fe6a73a14ab896807f0aaf5622aa0684749455" +dependencies = [ + "regex", +] + +[[package]] name = "unicode-normalization" version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.11.1/Cargo.toml new/maturin-0.11.2/Cargo.toml --- old/maturin-0.11.1/Cargo.toml 1970-01-01 01:00:00.000000000 +0100 +++ new/maturin-0.11.2/Cargo.toml 1970-01-01 01:00:00.000000000 +0100 @@ -1,9 +1,10 @@ [package] authors = ["konstin <kons...@mailbox.org>"] name = "maturin" -version = "0.11.1" +version = "0.11.2" 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/*"] +homepage = "https://github.com/pyo3/maturin" readme = "Readme.md" repository = "https://github.com/pyo3/maturin" license = "MIT OR Apache-2.0" @@ -57,6 +58,7 @@ target-lexicon = "0.12.0" pyproject-toml = "0.1.0" python-pkginfo = "0.4.0" +textwrap = "0.14.2" [dev-dependencies] indoc = "1.0.3" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.11.1/Changelog.md new/maturin-0.11.2/Changelog.md --- old/maturin-0.11.1/Changelog.md 2021-07-10 03:53:14.000000000 +0200 +++ new/maturin-0.11.2/Changelog.md 2021-07-20 12:56:03.000000000 +0200 @@ -5,12 +5,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) (for the cli, not for the crate). -## 0.11.1 - 2021-07-10 +## [Unreleased] + +## [0.11.2] - 2021-07-20 + +* Use UTF-8 encoding when reading `pyproject.toml` by domdfcoding in [#588](https://github.com/PyO3/maturin/pull/588) +* Use Cargo's `repository` field as `Source Code` in project URL in [#590](https://github.com/PyO3/maturin/pull/590) +* Fold long header fields in Python metadata in [#594](https://github.com/PyO3/maturin/pull/594) +* Fix `maturin develop` for PyPy on Unix in [#596](https://github.com/PyO3/maturin/pull/596) + +## [0.11.1] - 2021-07-10 * Fix sdist error when VCS has uncommitted renamed files in [#585](https://github.com/PyO3/maturin/pull/585) * Add `maturin completions <shell>` command to generate shell completions in [#586](https://github.com/PyO3/maturin/pull/586) -## 0.11.0 - 2021-07-04 +## [0.11.0] - 2021-07-04 * Add support for reading metadata from [PEP 621](https://www.python.org/dev/peps/pep-0621/) project table in `pyproject.toml` in [#555](https://github.com/PyO3/maturin/pull/555) * Users should migrate away from the old `[package.metadata.maturin]` table of `Cargo.toml` to this new `[project]` table of `pyproject.toml` @@ -25,12 +34,12 @@ * Allow dotted keys in `Cargo.toml` by switch from `toml_edit` to `toml` crate in [#577](https://github.com/PyO3/maturin/pull/577) * Fix source distribution with local path dependencies on Windows in [#580](https://github.com/PyO3/maturin/pull/580) -## 0.10.6 - 2021-05-21 +## [0.10.6] - 2021-05-21 * Fix corrupted macOS binary release in [#547](https://github.com/PyO3/maturin/pull/547) * Fix build with the "upload" feature disabled by ravenexp in [#548](https://github.com/PyO3/maturin/pull/548) -## 0.10.5 - 2021-05-21 +## [0.10.5] - 2021-05-21 * Add `manylinux_2_27` support in [#521](https://github.com/PyO3/maturin/pull/521) * Add support for Windows arm64 target in [#524](https://github.com/PyO3/maturin/pull/524) @@ -42,29 +51,29 @@ * Support uploading heterogenous wheels by ravenexp in [#544](https://github.com/PyO3/maturin/pull/544) * Warn about `pyproject.toml` missing maturin version constraint in [#545](https://github.com/PyO3/maturin/pull/545) -## 0.10.4 - 2021-04-28 +## [0.10.4] - 2021-04-28 * Interpreter search now uses python 3.6 to 3.12 in [#495](https://github.com/PyO3/maturin/pull/495) * Consider requires-python when searching for interpreters in [#495](https://github.com/PyO3/maturin/pull/495) * Support Rust extension as a submodule in mixed Python/Rust projects in [#489](https://github.com/PyO3/maturin/pull/489) -## 0.10.3 - 2021-04-13 +## [0.10.3] - 2021-04-13 * The `upload` command is now implemented, it is mostly similar to `twine upload`. [#484](https://github.com/PyO3/maturin/pull/484) * Interpreter search now uses python 3.6 to 3.12 * Add basic support for OpenBSD in [#496](https://github.com/PyO3/maturin/pull/496) * Fix the PowerPC platform by messense in [#503](https://github.com/PyO3/maturin/pull/503) -## 0.10.2 - 2021-04-03 +## [0.10.2] - 2021-04-03 * Fix `--target` being silently ignored -## 0.10.1 - 2021-04-03 +## [0.10.1] - 2021-04-03 * Fix a regression in 0.10.0 that would incorrectly assume we're building for musl instead of gnu by messense in [#487](https://github.com/PyO3/maturin/pull/487) * Basic s390x support -## 0.10.0 - 2021-04-02 +## [0.10.0] - 2021-04-02 * Change manylinux default version based on target arch by messense in [#424](https://github.com/PyO3/maturin/pull/424) * Support local path dependencies in source distribution (i.e. you can now package a workspace into an sdist) @@ -81,22 +90,22 @@ * develop removes an old .dist-info directory if it exists before installing the new one * Fix wheels for PyPy on windows containing extension modules with incorrect names. [#482](https://github.com/PyO3/maturin/pull/482) -## 0.9.4 - 2021-02-18 +## [0.9.4] - 2021-02-18 * Fix building a bin with musl -## 0.9.3 +## [0.9.3] * CI failure -## 0.9.2 - 2021-02-17 +## [0.9.2] - 2021-02-17 * Escape version in wheel metadata by messense in [#420](https://github.com/PyO3/maturin/pull/420) * Set executable bit on shared library by messense in [#421](https://github.com/PyO3/maturin/pull/421) * Rename `classifier` to `classifiers` for pypi compatibility. The old `classifier` is still available and now also works with pypi * Fix building for musl by automatically setting `-C target-feature=-crt-static` -## 0.9.1 - 2021-01-13 +## [0.9.1] - 2021-01-13 * Error when the `abi3` feature is selected but no minimum version * Support building universal2 wheels (x86 and aarch64 in a single file) by messense in [#403](https://github.com/PyO3/maturin/pull/403) @@ -104,7 +113,7 @@ * `package.metadata.maturin.classifier` is renamed to `classifiers` by kngwyu in [#416](https://github.com/PyO3/maturin/pull/416) * Added more instructions to building complex manylinux setups -## 0.9.0 - 2021-01-10 +## [0.9.0] - 2021-01-10 * Added support for building abi3 wheels with pyo3 0.13.1 * Python 3.9 is supported (it should have worked before, but it is now tested on ci) @@ -120,7 +129,7 @@ * No more retry loop when the password was wrong * When bootstrapping, also search for `cargo.exe` if `cargo` was not found -## 0.8.3 - 2020-08-17 +## [0.8.3] - 2020-08-17 ### Added @@ -134,19 +143,19 @@ * Fix incorrectly returning full path (not basename) from PEP 517 `build_sdist` hook. This fixes tox support from maturin's side * Packages installed with `maturin develop` are now visible to pip and can be uninstalled with pip -## 0.8.2 - 2020-06-29 +## [0.8.2] - 2020-06-29 ### Added * Python 3.8 was added to PATH in the docker image by oconnor663 in [#302](https://github.com/PyO3/maturin/pull/302) -## 0.8.1 - 2020-04-30 +## [0.8.1] - 2020-04-30 ### Added * cffi is installed if it's missing and python is running inside a virtualenv. -## 0.8.0 - 2020-04-03 +## [0.8.0] - 2020-04-03 ### Added @@ -157,13 +166,13 @@ * Omit author_email if `@` is not found in authors by evandrocoan in [#290](https://github.com/PyO3/maturin/pull/290) -## 0.7.9 - 2020-03-06 +## [0.7.9] - 2020-03-06 ### Fixed * This release includes binary wheels for mac os -## 0.7.8 - 2020-03-06 +## [0.7.8] - 2020-03-06 ### Added @@ -176,7 +185,7 @@ * 32-bit wheels didn't work on linux. This has been fixed by dae in [#250](https://github.com/PyO3/maturin/pull/250) * The path of the RECORD file on windows used a backward slash instead of a forward slash -## 0.7.7 - 2019-11-12 +## [0.7.7] - 2019-11-12 ### Added @@ -421,16 +430,38 @@ * Initial Release -[Unreleased]: https://github.com/pyo3/maturin/compare/v0.7.6...HEAD -[0.7.6]: https://github.com/pyo3/maturin/compare/v0.7.5...0.7.6 -[0.7.5]: https://github.com/pyo3/maturin/compare/v0.7.4...0.7.5 -[0.7.4]: https://github.com/pyo3/maturin/compare/v0.7.3...0.7.4 -[0.7.3]: https://github.com/pyo3/maturin/compare/v0.7.2...0.7.3 -[0.7.2]: https://github.com/pyo3/maturin/compare/v0.7.1...0.7.2 -[0.7.1]: https://github.com/pyo3/maturin/compare/v0.7.0...0.7.1 -[0.7.0]: https://github.com/pyo3/maturin/compare/v0.6.1...0.7.0 -[0.6.1]: https://github.com/pyo3/maturin/compare/v0.6.0...0.6.1 -[0.6.0]: https://github.com/pyo3/maturin/compare/v0.5.0...0.6.0 +[Unreleased]: https://github.com/pyo3/maturin/compare/v0.11.2...HEAD +[0.11.2]: https://github.com/pyo3/maturin/compare/v0.11.1...v0.11.2 +[0.11.1]: https://github.com/pyo3/maturin/compare/v0.11.0...v0.11.1 +[0.11.0]: https://github.com/pyo3/maturin/compare/v0.10.6...v0.11.0 +[0.10.6]: https://github.com/pyo3/maturin/compare/v0.10.5...v0.10.6 +[0.10.5]: https://github.com/pyo3/maturin/compare/v0.10.4...v0.10.5 +[0.10.4]: https://github.com/pyo3/maturin/compare/v0.10.3...v0.10.4 +[0.10.3]: https://github.com/pyo3/maturin/compare/v0.10.2...v0.10.3 +[0.10.2]: https://github.com/pyo3/maturin/compare/v0.10.1...v0.10.2 +[0.10.1]: https://github.com/pyo3/maturin/compare/v0.10.0...v0.10.1 +[0.10.0]: https://github.com/pyo3/maturin/compare/v0.9.4...v0.10.0 +[0.9.4]: https://github.com/pyo3/maturin/compare/v0.9.3...v0.9.4 +[0.9.3]: https://github.com/pyo3/maturin/compare/v0.9.2...v0.9.3 +[0.9.2]: https://github.com/pyo3/maturin/compare/v0.9.1...v0.9.2 +[0.9.1]: https://github.com/pyo3/maturin/compare/v0.9.0...v0.9.1 +[0.9.0]: https://github.com/pyo3/maturin/compare/v0.8.3...v0.9.0 +[0.8.3]: https://github.com/pyo3/maturin/compare/v0.8.2...v0.8.3 +[0.8.2]: https://github.com/pyo3/maturin/compare/v0.8.1...v0.8.2 +[0.8.1]: https://github.com/pyo3/maturin/compare/v0.8.0...v0.8.1 +[0.8.0]: https://github.com/pyo3/maturin/compare/v0.7.9...v0.8.0 +[0.7.9]: https://github.com/pyo3/maturin/compare/v0.7.8...v0.7.9 +[0.7.8]: https://github.com/pyo3/maturin/compare/v0.7.7...v0.7.8 +[0.7.7]: https://github.com/pyo3/maturin/compare/v0.7.6...v0.7.7 +[0.7.6]: https://github.com/pyo3/maturin/compare/v0.7.5...v0.7.6 +[0.7.5]: https://github.com/pyo3/maturin/compare/v0.7.4...v0.7.5 +[0.7.4]: https://github.com/pyo3/maturin/compare/v0.7.3...v0.7.4 +[0.7.3]: https://github.com/pyo3/maturin/compare/v0.7.2...v0.7.3 +[0.7.2]: https://github.com/pyo3/maturin/compare/v0.7.1...v0.7.2 +[0.7.1]: https://github.com/pyo3/maturin/compare/v0.7.0...v0.7.1 +[0.7.0]: https://github.com/pyo3/maturin/compare/v0.6.1...v0.7.0 +[0.6.1]: https://github.com/pyo3/maturin/compare/v0.6.0...v0.6.1 +[0.6.0]: https://github.com/pyo3/maturin/compare/v0.5.0...v0.6.0 [0.5.0]: https://github.com/pyo3/maturin/compare/v0.4.2...v0.5.0 [0.4.2]: https://github.com/pyo3/maturin/compare/v0.4.1...v0.4.2 [0.4.1]: https://github.com/pyo3/maturin/compare/v0.4.0...v0.4.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.11.1/PKG-INFO new/maturin-0.11.2/PKG-INFO --- old/maturin-0.11.1/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/maturin-0.11.2/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,18 +1,21 @@ Metadata-Version: 2.1 Name: maturin -Version: 0.11.1 +Version: 0.11.2 Classifier: Topic :: Software Development :: Build Tools Classifier: Programming Language :: Rust Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Requires-Dist: toml~=0.10.2 -Summary: Build and publish crates with pyo3, rust-cpython and cffi bindings as well as rust binaries as python packages +Summary: Build and publish crates with pyo3, rust-cpython and cffi bindings as well as + rust binaries as python packages Keywords: python,cffi,packaging,pypi,pyo3 +Home-Page: https://github.com/pyo3/maturin Author: konstin <kons...@mailbox.org> Author-email: konstin <kons...@mailbox.org> License: MIT OR Apache-2.0 Requires-Python: >=3.6 Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM +Project-URL: Source Code, https://github.com/pyo3/maturin # Maturin @@ -140,6 +143,7 @@ ## Python metadata maturin supports [PEP 621](https://www.python.org/dev/peps/pep-0621/), you can specify python package metadata in `pyproject.toml`. +maturin merges metadata from `Cargo.toml` and `pyproject.toml`, `pyproject.toml` take precedence over `Cargo.toml`. To specify python dependencies, add a list `dependencies` in a `[project]` section in the `pyproject.toml`. This list is equivalent to `install_requires` in setuptools: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.11.1/Readme.md new/maturin-0.11.2/Readme.md --- old/maturin-0.11.1/Readme.md 2021-07-10 03:53:14.000000000 +0200 +++ new/maturin-0.11.2/Readme.md 2021-07-20 12:56:03.000000000 +0200 @@ -124,6 +124,7 @@ ## Python metadata maturin supports [PEP 621](https://www.python.org/dev/peps/pep-0621/), you can specify python package metadata in `pyproject.toml`. +maturin merges metadata from `Cargo.toml` and `pyproject.toml`, `pyproject.toml` take precedence over `Cargo.toml`. To specify python dependencies, add a list `dependencies` in a `[project]` section in the `pyproject.toml`. This list is equivalent to `install_requires` in setuptools: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.11.1/maturin/__init__.py new/maturin-0.11.2/maturin/__init__.py --- old/maturin-0.11.1/maturin/__init__.py 2021-07-10 03:53:14.000000000 +0200 +++ new/maturin-0.11.2/maturin/__init__.py 2021-07-20 12:56:03.000000000 +0200 @@ -35,7 +35,7 @@ def get_config() -> Dict[str, str]: - with open("pyproject.toml") as fp: + with open("pyproject.toml", encoding="utf-8") as fp: pyproject_toml = toml.load(fp) return pyproject_toml.get("tool", {}).get("maturin", {}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.11.1/src/metadata.rs new/maturin-0.11.2/src/metadata.rs --- old/maturin-0.11.1/src/metadata.rs 2021-07-10 03:53:14.000000000 +0200 +++ new/maturin-0.11.2/src/metadata.rs 2021-07-20 12:56:03.000000000 +0200 @@ -171,8 +171,12 @@ (None, None) => {} } } - self.author = Some(names.join(", ")); - self.author_email = Some(emails.join(", ")); + if !names.is_empty() { + self.author = Some(names.join(", ")); + } + if !emails.is_empty() { + self.author_email = Some(emails.join(", ")); + } } if let Some(maintainers) = &project.maintainers { @@ -192,8 +196,12 @@ (None, None) => {} } } - self.maintainer = Some(names.join(", ")); - self.maintainer_email = Some(emails.join(", ")); + if !names.is_empty() { + self.maintainer = Some(names.join(", ")); + } + if !emails.is_empty() { + self.maintainer_email = Some(emails.join(", ")); + } } if let Some(keywords) = &project.keywords { @@ -301,6 +309,10 @@ } }) .unwrap_or_else(|| cargo_toml.package.name.clone()); + let mut project_url = extra_metadata.project_url.unwrap_or_default(); + if let Some(repository) = cargo_toml.package.repository.as_ref() { + project_url.insert("Source Code".to_string(), repository.clone()); + } let mut metadata = Metadata21 { metadata_version: "2.1".to_owned(), @@ -330,7 +342,7 @@ requires_dist: extra_metadata.requires_dist.unwrap_or_default(), requires_python: extra_metadata.requires_python, requires_external: extra_metadata.requires_external.unwrap_or_default(), - project_url: extra_metadata.project_url.unwrap_or_default(), + project_url, provides_extra: extra_metadata.provides_extra.unwrap_or_default(), // Officially rarely used, and afaik not applicable with pyo3 @@ -379,7 +391,7 @@ } }; - add_option("Summary", &self.summary); + add_option("Summary", &self.summary.as_deref().map(fold_header)); add_option("Keywords", &self.keywords); add_option("Home-Page", &self.home_page); add_option("Download-URL", &self.download_url); @@ -387,7 +399,7 @@ add_option("Author-email", &self.author_email); add_option("Maintainer", &self.maintainer); add_option("Maintainer-email", &self.maintainer_email); - add_option("License", &self.license); + add_option("License", &self.license.as_deref().map(fold_header)); add_option("Requires-Python", &self.requires_python); add_option("Description-Content-Type", &self.description_content_type); // Project-URL is special @@ -459,6 +471,28 @@ } } +/// Fold long header field according to RFC 5322 section 2.2.3 +/// https://datatracker.ietf.org/doc/html/rfc5322#section-2.2.3 +fn fold_header(text: &str) -> String { + let mut result = String::with_capacity(text.len()); + + let options = textwrap::Options::new(78) + .initial_indent("") + .subsequent_indent("\t"); + for (i, line) in textwrap::wrap(text, options).iter().enumerate() { + if i > 0 { + result.push_str("\r\n"); + } + if line.is_empty() { + result.push('\t'); + } else { + result.push_str(&line); + } + } + + result +} + #[cfg(test)] mod test { use super::*; @@ -584,6 +618,7 @@ version = "0.1.0" description = "A test project" homepage = "https://example.org" + repository = "https://example.org" readme = "REPLACE_README_PATH" keywords = ["ffi", "test"] @@ -615,6 +650,7 @@ Author: konstin <kons...@mailbox.org> Author-email: konstin <kons...@mailbox.org> Description-Content-Type: text/x-rst + Project-URL: Source Code, https://example.org Some test package ================= @@ -734,6 +770,10 @@ "attrs; extra == 'test'", "boltons; (sys_platform == 'win32') and extra == 'test'" ] - ) + ); + + let content = metadata.to_file_contents(); + let pkginfo: Result<python_pkginfo::Metadata, _> = content.parse(); + assert!(pkginfo.is_ok()); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/maturin-0.11.1/src/target.rs new/maturin-0.11.2/src/target.rs --- old/maturin-0.11.1/src/target.rs 2021-07-10 03:53:14.000000000 +0200 +++ new/maturin-0.11.2/src/target.rs 2021-07-20 12:56:03.000000000 +0200 @@ -1,3 +1,4 @@ +use crate::python_interpreter::InterpreterKind; use crate::{PlatformTag, PythonInterpreter}; use anyhow::{bail, format_err, Context, Result}; use platform_info::*; @@ -316,13 +317,17 @@ interpreter: &PythonInterpreter, ) -> PathBuf { if self.is_unix() { - let python_dir = format!("python{}.{}", interpreter.major, interpreter.minor); - - venv_base - .as_ref() - .join("lib") - .join(python_dir) - .join("site-packages") + match interpreter.interpreter_kind { + InterpreterKind::CPython => { + let python_dir = format!("python{}.{}", interpreter.major, interpreter.minor); + venv_base + .as_ref() + .join("lib") + .join(python_dir) + .join("site-packages") + } + InterpreterKind::PyPy => venv_base.as_ref().join("site-packages"), + } } else { venv_base.as_ref().join("Lib").join("site-packages") } ++++++ vendor.tar.xz ++++++ /work/SRC/openSUSE:Factory/python-maturin/vendor.tar.xz /work/SRC/openSUSE:Factory/.python-maturin.new.1899/vendor.tar.xz differ: char 26, line 1