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

Improved import hook #1748

Closed
wants to merge 63 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
43e79e2
removed original import hook
mbway Aug 27, 2023
c4386c2
small fixes to test-crates
mbway Aug 27, 2023
43524e7
added pyo3-mixed-with-path-dep test crate
mbway Aug 27, 2023
a32a78e
added new import hook
mbway Aug 27, 2023
a728218
added new import hook instructions to guide
mbway Aug 27, 2023
1b9ccec
added import hook tests
mbway Aug 27, 2023
4ce765d
added to changelog
mbway Aug 27, 2023
ca62147
test improvements to fix CI
mbway Aug 27, 2023
1a7005f
small changes
mbway Aug 28, 2023
6b0eccf
clean up test temporary directories by default
mbway Aug 28, 2023
1be2370
support more maturin flags and properly support parsing output with c…
mbway Aug 28, 2023
f4059a0
refactor build cache to make operations on an unlocked cache impossible
mbway Aug 28, 2023
75c8981
small improvements from reviewing
mbway Aug 29, 2023
dfe850f
refactored to make more customization possible by subclassing importe…
mbway Aug 29, 2023
127d34b
Use `env!("CARGO_BIN_EXE_maturin")`
messense Sep 1, 2023
aa47670
Skip lib_with_path_dep in import hook tests
messense Sep 2, 2023
5bf8d1d
Add maturin package path to PYTHONPATH
messense Sep 2, 2023
b9e999a
black format
messense Sep 2, 2023
e021fda
No need to copy maturin to venv bin now
messense Sep 3, 2023
37a133b
run import hook tests in parallel
mbway Sep 3, 2023
0dcd8b7
replaced custom FileLock implementation with filelock package
mbway Sep 3, 2023
4642108
formatting fixes
mbway Sep 3, 2023
97d066b
merged with main
mbway Sep 3, 2023
f761aa2
run mypy checks on the python scripts in tests/ as well
mbway Sep 3, 2023
ad0cd50
fixed python 3.7 compatibility
mbway Sep 3, 2023
5f53785
Merge branch 'main' into improved_import_hook
messense Sep 26, 2023
95671b5
added notes on running the tests
mbway Oct 24, 2023
b4da2db
added utility to print more details when an error occurs in a worker …
mbway Oct 24, 2023
384e32f
merged with main
mbway Oct 24, 2023
a2155bc
provide more output of which tests passed
mbway Oct 24, 2023
114f719
Merge branch 'main' into improved_import_hook
mbway Nov 18, 2023
88153df
linting
mbway Nov 18, 2023
07af8b8
improved package resolving for tests to better match maturin cli beha…
mbway Dec 22, 2023
c514744
added some notes
mbway Dec 22, 2023
0605953
Merge branch 'main' into improved_import_hook
mbway Dec 22, 2023
f1cbb2f
improved cargo manifest detection
mbway Dec 27, 2023
d2029ce
resolve path dependencies relative to the manifest dir instead of the…
mbway Dec 27, 2023
b760c61
allow not using the debug utility function
mbway Dec 27, 2023
db520fd
better concurrent python runner making output easier to debug
mbway Dec 31, 2023
b79330e
increase lock timeout for concurrent tests
mbway Dec 31, 2023
a84d584
Merge branch 'main' into improved_import_hook
mbway Dec 31, 2023
de4c31a
fixed linting issues
mbway Dec 31, 2023
6f9c05f
pass function to call to concurrent runner utility
mbway Dec 31, 2023
1e56fd2
run import hook tests in serial on Cirrus CI
mbway Jan 1, 2024
5b54604
normalize newline in python output
mbway Jan 1, 2024
1eca5d9
check_match utility to give more informative error messages
mbway Jan 1, 2024
5f3becb
add support for pypy error message
mbway Jan 1, 2024
fb42e94
disabled pip version check
mbway Jan 1, 2024
1ee950a
skip import hook tests on CIRRUS_CI
mbway Jan 1, 2024
6213b0b
improved logging in case of run_python failure
mbway Jan 2, 2024
53d5cd0
fix handling of file URIs on Windows
mbway Jan 2, 2024
b51976e
fix setting PATH environment on windows
mbway Jan 3, 2024
4372300
improved OS detection
mbway Jan 3, 2024
f582ee4
fixed expected error message for pypy
mbway Jan 3, 2024
76b3231
add windows support to test
mbway Jan 3, 2024
584a799
moved fixing of direct_url.json into maturin itself. Also refactored …
mbway Jan 4, 2024
03e3304
changed some notes and added ability to disable with an environment v…
mbway Jan 4, 2024
72d9f32
renamed document to match title
mbway Jan 4, 2024
6d1b3a1
small fixes
mbway Jan 4, 2024
01685a2
added some documentation
mbway Jan 4, 2024
9cc276c
support windows style paths when fixing direct_url.json
mbway Jan 4, 2024
7a2302c
improved logging in utility tests
mbway Jan 4, 2024
18b03d1
hopefully fix problem causing flaky test
mbway Jan 4, 2024
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ repos:
rev: v1.8.0
hooks:
- id: mypy
entry: mypy maturin/
entry: mypy maturin/ tests/
pass_filenames: false
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ path-slash = "0.2.1"
pep440_rs = { version = "0.3.6", features = ["serde"] }
pep508_rs = { version = "0.2.1", features = ["serde"] }
time = "0.3.17"
url = "2.5.0"

# cli
clap = { version = "4.0.0", features = ["derive", "env", "wrap_help", "unstable-styles"] }
Expand Down Expand Up @@ -104,7 +105,6 @@ rustls = { version = "0.21.9", optional = true }
rustls-pemfile = { version = "2.0.0", optional = true }
keyring = { version = "2.0.0", default-features = false, features = ["linux-no-secret-service"], optional = true }
wild = { version = "2.1.0", optional = true }
url = { version = "2.5.0", optional = true }

[dev-dependencies]
expect-test = "1.4.1"
Expand All @@ -124,7 +124,7 @@ log = ["tracing-subscriber"]

cli-completion = ["dep:clap_complete_command"]

upload = ["ureq", "multipart", "configparser", "bytesize", "dialoguer/password", "url", "wild", "dep:dirs"]
upload = ["ureq", "multipart", "configparser", "bytesize", "dialoguer/password", "wild", "dep:dirs"]
# keyring doesn't support *BSD so it's not enabled in `full` by default
password-storage = ["upload", "keyring"]

Expand Down
2 changes: 2 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

* Add new import hook with support for many more use cases [#1748](https://github.com/PyO3/maturin/pull/1748)

## [1.4.0] - 2023-12-02

* Bump MSRV to 1.67.0 in [#1847](https://github.com/PyO3/maturin/pull/1847)
Expand Down
150 changes: 0 additions & 150 deletions guide/src/develop.md

This file was deleted.

5 changes: 5 additions & 0 deletions guide/src/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ See [environment variables Cargo reads](https://doc.rust-lang.org/cargo/referenc
* `MATURIN_PYPI_TOKEN`: PyPI token for uploading wheels
* `MATURIN_PASSWORD`: PyPI password for uploading wheels

## Import hook environment variables

* `MATURIN_BUILD_DIR`: Path to a location to cache build files
* `MATURIN_IMPORT_HOOK_ENABLED`: set to `0` to disable calls to `import_hook.install()`

## `pyo3` environment variables

* `PYO3_CROSS_PYTHON_VERSION`: Python version to use for cross compilation
Expand Down
Loading
Loading