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

Enable a .venv export that includes -e installed development packages #18594

Closed
SimonBiggs opened this issue Mar 27, 2023 · 4 comments
Closed
Labels
backend: Python Python backend-related issues enhancement

Comments

@SimonBiggs
Copy link
Contributor

I am trying to use the .venv created by pants as a Jupyter Kernel by running:

python -m ipykernel install --user --name monorepo

And then using that kernel within Jupyter Lab.

However, the packages I am currently working on are not included within the exported venv which I create by calling:

pants export --resolve=python-default

As such, I am currently activating the venv, and then manually installing each of my packages within my monorepo with the pip install -e approach.

Ideally, we could export a standard .venv for use with IDEs and Jupyter that is simple, standard, and includes each of our packages installed via -e with pip.

@huonw huonw added the backend: Python Python backend-related issues label Apr 26, 2023
@huonw
Copy link
Contributor

huonw commented Apr 26, 2023

I think this might be (partly?) fixed by #18639, for python_distribution targets, via a [export].py_editables_in_resolves option. Could you confirm, @cognifloyd?

@cognifloyd
Copy link
Member

Yes. This request is explicitly for "development packages", which is represented in pants via python_distribution BUILD targets. So, yes, #18639 resolves this issue. That feature should be released with pants 2.17 😁

@cognifloyd
Copy link
Member

Fixed by #18639.

@SimonBiggs When you upgrade to 2.17, please circle back to let me know about your experience using [export].py_editables_in_resolves. Thanks!

@SimonBiggs
Copy link
Contributor Author

When you upgrade to 2.17, please circle back to let me

Absolutely! Will do. Thanks @cognifloyd 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: Python Python backend-related issues enhancement
Projects
None yet
Development

No branches or pull requests

3 participants