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

Detect .venv in current or parent folder in maturin develop #1462

Merged
merged 2 commits into from
Feb 11, 2023

Conversation

konstin
Copy link
Member

@konstin konstin commented Feb 5, 2023

See discussion in #1461


maturin develop now looks for a virtualenv .venv in the current or any parent directory if no venv or conda environment is active.


If someone knows a good execv equivalent on windows i'll switch over to that, currently it's a subcommand which is still fine.

@netlify
Copy link

netlify bot commented Feb 5, 2023

Deploy Preview for maturin-guide ready!

Name Link
🔨 Latest commit 7a8a499
🔍 Latest deploy log https://app.netlify.com/sites/maturin-guide/deploys/63e78f2e6260f70008db2d96
😎 Deploy Preview https://deploy-preview-1462--maturin-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@konstin
Copy link
Member Author

konstin commented Feb 6, 2023

image

i tried restarting but it only failed again

Cargo.toml Outdated Show resolved Hide resolved
@messense
Copy link
Member

messense commented Feb 8, 2023

Should maturin run build the project automatically before executing the given command?

@konstin
Copy link
Member Author

konstin commented Feb 8, 2023

i'd say no, because building is slow (vs. run being near-instant) and we'd need to handle all the cli args to develop. Maybe we could add a --run <python options> flag to develop instead, so could e.g. do maturin develop -m python_bindings/Cargo.toml --run "-m pytest"

@messense
Copy link
Member

messense commented Feb 8, 2023

maturin develop now just like maturin run also look for a virtualenv .venv in the current or any parent directory if no environment is active.

Maybe we should split maturin develop changes into another PR given that maturin run needs some more discussions.

@konstin konstin force-pushed the detect-dot-venv-and-maturin-run branch from 2529787 to a427d18 Compare February 11, 2023 10:38
@konstin konstin changed the title Detect .venv and maturin run @konstin Detect .venv in current or parent folder in maturin develop Feb 11, 2023
@konstin konstin changed the title @konstin Detect .venv in current or parent folder in maturin develop Detect .venv in current or parent folder in maturin develop Feb 11, 2023
@konstin
Copy link
Member Author

konstin commented Feb 11, 2023

I've changed this to only include the maturin develop change and moved maturin run to #1475

Changelog.md Outdated Show resolved Hide resolved
@messense
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 11, 2023

@bors bors bot merged commit 78237d6 into main Feb 11, 2023
@bors bors bot deleted the detect-dot-venv-and-maturin-run branch February 11, 2023 13:38
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Mar 19, 2023
https://build.opensuse.org/request/show/1072766
by user mia + dimstar_suse
- Update to v0.14.15:
  * Add sdist and sccache support to generate-ci command
- Changes in v0.14.14:
  * Add support for Emscripten in generate-ci command
    gh#PyO3/maturin#1484
  * Use default ext_suffix for Emscripten target if not provided in
    PYO3_CONFIG_FILE
    gh#PyO3/maturin#1491
  * Deprecate package.metadata.maturin.data in favor of
    tool.maturin.data in pyproject.toml
    gh#PyO3/maturin#1492

- Update to v0.14.13:
  * maturin develop now looks for a virtualenv .venv in the current
    or any parent directory if no virtual environment is active
    gh#PyO3/maturin#1462
  * Add a new generate-ci command to generate CI configuration
    gh#PyO3/maturin#1456
  * Deprecate --univeral2 in favor of universal2-apple-darwin
    target
    gh#PyO3/maturin#1457
  * Raise an error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants