Skip to content

PipEnv docs added#4247

Merged
czoido merged 18 commits into
conan-io:develop2from
davidsanfal:pipenv
Sep 29, 2025
Merged

PipEnv docs added#4247
czoido merged 18 commits into
conan-io:develop2from
davidsanfal:pipenv

Conversation

@davidsanfal

@davidsanfal davidsanfal commented Sep 26, 2025

Copy link
Copy Markdown
Contributor

@davidsanfal davidsanfal requested a review from czoido September 26, 2025 08:32
@davidsanfal davidsanfal marked this pull request as ready for review September 26, 2025 08:32
@czoido

czoido commented Sep 26, 2025

Copy link
Copy Markdown
Contributor

This won't pass until we merge the PR

Comment thread reference/tools/system/pip_manager.rst Outdated
Comment thread reference/tools/system/pip_manager.rst Outdated
Comment thread reference/tools/system/pip_manager.rst Outdated
Comment thread reference/tools/system/pip_manager.rst Outdated
Comment thread reference/tools/system/pip_manager.rst Outdated
----------------------------------

To use a tool installed with Python, we have to install it using the ``PipEnv install`` method.
We also have to call the ``PipEnv generate`` method to create a ``Conan Environment`` to adds the ``Python virtualenv path`` to the system path.

@czoido czoido Sep 29, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, use backticks mostly for things related to source code.

Comment thread reference/tools/system/pip_manager.rst Outdated
Comment thread reference/tools/system/pip_manager.rst Outdated
Comment thread reference/tools/system/pip_manager.rst Outdated
Comment thread reference/tools/system/pip_manager.rst Outdated
Comment thread reference/tools/system/pipenv.rst
Comment thread reference/tools/system/pip_manager.rst Outdated
Comment thread reference/tools/system.rst Outdated
:maxdepth: 2

system/package_manager
system/pip_manager

@czoido czoido Sep 29, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this file should not be named pip_manager but pipenv or something similar.

Comment thread reference/tools/system/pip_manager.rst Outdated
davidsanfal and others added 9 commits September 29, 2025 09:37
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Comment thread reference/tools/system/pipenv.rst
Comment thread reference/tools/system/pipenv.rst Outdated
Comment on lines +7 to +18
The ``PipEnv`` helper installs Python packages with **pip** inside a dedicated virtual environment (**venv**),
keeping them isolated so they don't interfere with system packages or the Conan package itself.

.. currentmodule:: conan.tools.system

.. autoclass:: PipEnv
:members:
:inherited-members:

It is designed to be used in two different ways:

1. Using a Python package in a recipe.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All this, probably the whole doc need to emphasize this is only for executable Python packages. This approach doesn't work for library-like Python code that you expect to use via import

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably an important note at the beginning to clarify this would help.

@AbrilRBS AbrilRBS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super minor review

Comment thread reference/tools/system/pipenv.rst Outdated

These two steps appear in the following recipe in the ``generate()`` method.
Calling it in this method ensures that the **Python package** and the **Conan Environment** will be available in the following steps.
In this case, in the build step, which is where we will use it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite know what this sentence is referring to

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What this means is that if you haven't called it in the generate method, it won't be available in the build method, because the conan environment has to be generated before calling build.

Comment thread reference/tools/system/pipenv.rst Outdated
Co-authored-by: Abril Rincón Blanco <5364255+AbrilRBS@users.noreply.github.com>
@memsharded memsharded added this to the 2.21 milestone Sep 29, 2025
@czoido czoido assigned AbrilRBS and czoido and unassigned AbrilRBS Sep 29, 2025
Comment thread reference/tools/system/pipenv.rst Outdated
Co-authored-by: Abril Rincón Blanco <5364255+AbrilRBS@users.noreply.github.com>
Comment thread reference/tools/system/pipenv.rst Outdated
Comment thread reference/tools/system/pipenv.rst Outdated
davidsanfal and others added 2 commits September 29, 2025 16:04
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Comment thread reference/tools/system/pipenv.rst Outdated
Comment thread reference/tools/system/pipenv.rst Outdated
@czoido czoido merged commit b4978a1 into conan-io:develop2 Sep 29, 2025
2 checks passed
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.

4 participants