Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.2.0 #12

Merged
merged 2 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,26 @@ 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)

## [Unreleased]

## [0.2.0]

- many improvements to `maturin_import_hook site install` [#11](https://github.com/PyO3/maturin-import-hook/pull/11)
- `--args="..."` to specify which arguments should be used with maturin when installing into `sitecustomize.py`
- automatically detect if `--uv` should be used
- enable/disable project or rs file importer with
`--project-importer/--no-project-importer` and `--rs-file-importer/--no-rs-file-importer`
- ignore directories with `.maturin_hook_ignore` file marker and ignore `.py` files by default [#10](https://github.com/PyO3/maturin-import-hook/pull/10)
- caching and optimisation to greatly reduce overhead when searching for maturin packages [#8](https://github.com/PyO3/maturin-import-hook/pull/8)
- support clearing cache with `importlib.invalidate_caches()` [#8](https://github.com/PyO3/maturin-import-hook/pull/8)
- upgrade to support maturin 1.7.8 [#9](https://github.com/PyO3/maturin-import-hook/pull/9)
- option to install into usercustomize [#5](https://github.com/PyO3/maturin-import-hook/pull/5)
- `maturin_import_hook site install --force` option to overwrite previous installation [#5](https://github.com/PyO3/maturin-import-hook/pull/5)
- ignore `ImportError` in `sitecustomize.py` (in case user uninstalls `maturin_import_hook`) [#5](https://github.com/PyO3/maturin-import-hook/pull/5)

## [0.1.0]

Initial release of the import hook.

[Unreleased]: https://github.com/pyo3/maturin-import-hook/compare/v0.2.0...HEAD
[0.2.0]: https://github.com/pyo3/maturin-import-hook/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/pyo3/maturin-import-hook/compare/c2689735a61a322998f7304a113b7c74b8108ab3...v0.1.0
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = [
{name = "Matthew Broadway", email = "[email protected]"}
]
readme = "README.md"
version = "0.1.0"
version = "0.2.0"
requires-python = ">=3.9"
dependencies = [
"filelock",
Expand Down
9 changes: 7 additions & 2 deletions tests/test_import_hook/test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,20 @@
log = logging.getLogger(__name__)


@pytest.mark.skipif(os.linesep != "\n", reason="hashes calculated with \\n line endings")
def test_maturin_unchanged() -> None:
"""if new options have been added to maturin then the import hook needs to be updated to match"""
env = {"PATH": os.environ["PATH"], "COLUMNS": "120"}

build_help = subprocess.check_output("stty rows 50 cols 120; maturin build --help", shell=True, env=env) # noqa: S602
assert hashlib.sha1(build_help).hexdigest() == "ea47a884c90c9376047687aed98ab1dca29b433a"
assert hashlib.sha1(build_help).hexdigest() == "ea47a884c90c9376047687aed98ab1dca29b433a", (
f"hashes don't match. build_help = {build_help!r}"
)

develop_help = subprocess.check_output("stty rows 50 cols 120; maturin develop --help", shell=True, env=env) # noqa: S602
assert hashlib.sha1(develop_help).hexdigest() == "ad7036a829c6801224933d589b1f9848678c9458"
assert hashlib.sha1(develop_help).hexdigest() == "ad7036a829c6801224933d589b1f9848678c9458", (
f"hashes don't match. develop_help = {develop_help!r}"
)


def test_settings() -> None:
Expand Down
Loading