PipModule

mill.pythonlib.PipModule
See thePipModule companion object
@Scaladoc(value = "/**\n * Basic tasks for preparing a python interpreter in a venv with required\n * dependencies installed.\n */")
trait PipModule extends Module

Basic tasks for preparing a python interpreter in a venv with required dependencies installed.

Attributes

Companion
object
Graph
Supertypes
trait Module
trait ModuleApi
trait Wrapper
class BaseClass
trait Cacher
trait Cacher
class Object
trait Matchable
class Any
Show all
Known subtypes
trait PythonModule
trait PythonTests
trait RuffModule
object RuffModule
trait Pytest
trait Unittest
Show all

Members list

Type members

Inherited classlikes

@Scaladoc(value = "/**\n * Miscellaneous machinery around traversing & querying the build hierarchy,\n * that should not be needed by normal users of Mill\n */")
object moduleInternal extends Internal

Miscellaneous machinery around traversing & querying the build hierarchy, that should not be needed by normal users of Mill

Miscellaneous machinery around traversing & querying the build hierarchy, that should not be needed by normal users of Mill

Attributes

Inherited from:
Module
Supertypes
class Internal
class Object
trait Matchable
class Any

Value members

Concrete methods

@Scaladoc(value = "/**\n * Base URLs of the Python Package Indexes to search for packages. Defaults to\n * https://pypi.org/simple.\n *\n * These should point to repositories compliant with PEP 503 (the simple\n * repository API) or local directories laid out in the same format.\n */")
def indexes: Target[Seq[String]]

Base URLs of the Python Package Indexes to search for packages. Defaults to https://pypi.org/simple.

Base URLs of the Python Package Indexes to search for packages. Defaults to https://pypi.org/simple.

These should point to repositories compliant with PEP 503 (the simple repository API) or local directories laid out in the same format.

Attributes

@Scaladoc(value = "/**\n * The direct dependencies of this module.\n * This is meant to be overridden to add dependencies.\n */")
def moduleDeps: Seq[PipModule]

The direct dependencies of this module. This is meant to be overridden to add dependencies.

The direct dependencies of this module. This is meant to be overridden to add dependencies.

Attributes

@Scaladoc(value = "/**\n * Arguments to be passed to `pip install` when preparing the environment.\n *\n * This task is called by `pythonExe`. It serves as an escape hatch, should\n * you need to override it for some reason. Normally, you should not need to\n * edit this task directly. Instead, prefer editing the other tasks of this\n * module which influence how the arguments are created.\n *\n * @see [[indexes]]\n * @see [[pythonDeps]]\n * @see [[unmanagedWheels]]\n * @see [[pythonToolDeps]]\n */")

Arguments to be passed to pip install when preparing the environment.

Arguments to be passed to pip install when preparing the environment.

This task is called by pythonExe. It serves as an escape hatch, should you need to override it for some reason. Normally, you should not need to edit this task directly. Instead, prefer editing the other tasks of this module which influence how the arguments are created.

Attributes

See also
@Scaladoc(value = "/**\n * Any python dependencies you want to add to this module. The format of each\n * dependency should be the same as used with `pip install`, or as you would\n * find in a `requirements.txt` file. E.g. `def pythonDeps =\n * Seq(\"numpy==2.1.3\")`.\n *\n * Dependencies declared here will also be required when installing this module.\n */")
def pythonDeps: Target[Seq[String]]

Any python dependencies you want to add to this module. The format of each dependency should be the same as used with pip install, or as you would find in a requirements.txt file. E.g. def pythonDeps = Seq("numpy==2.1.3").

Any python dependencies you want to add to this module. The format of each dependency should be the same as used with pip install, or as you would find in a requirements.txt file. E.g. def pythonDeps = Seq("numpy==2.1.3").

Dependencies declared here will also be required when installing this module.

Attributes

@Scaladoc(value = "/**\n * Python dependencies declared in `requirements.txt` files. This is similar\n * to `pythonDeps`, but reads dependencies from a text file, allowing you to\n * reuse requirements files from existing projects.\n *\n * @see [[pythonDeps]]\n */")
def pythonRequirementFiles: Target[Seq[PathRef]]

Python dependencies declared in requirements.txt files. This is similar to pythonDeps, but reads dependencies from a text file, allowing you to reuse requirements files from existing projects.

Python dependencies declared in requirements.txt files. This is similar to pythonDeps, but reads dependencies from a text file, allowing you to reuse requirements files from existing projects.

Attributes

See also
@Scaladoc(value = "/**\n * Any python dependencies for development tools you want to add to this module.\n *\n * These dependencies are similar to `pythonDeps`, but will not be required to install this\n * module, only to work on it. For example, type checkers, linters, and bundlers should be\n * declared here.\n *\n * @see [[pythonDeps]]\n */")
def pythonToolDeps: Target[Seq[String]]

Any python dependencies for development tools you want to add to this module.

Any python dependencies for development tools you want to add to this module.

These dependencies are similar to pythonDeps, but will not be required to install this module, only to work on it. For example, type checkers, linters, and bundlers should be declared here.

Attributes

See also
@Scaladoc(value = "/**\n * Python dependencies of this module, and all other modules that this module\n * depends on, recursively.\n */")
def transitivePythonDeps: Target[Seq[String]]

Python dependencies of this module, and all other modules that this module depends on, recursively.

Python dependencies of this module, and all other modules that this module depends on, recursively.

Attributes

@Scaladoc(value = "/**\n * requirements.txt of this module, and all other modules that this module\n * depends on, recursively.\n *\n * @see [[pythonRequirementFiles]]\n */")
def transitivePythonRequirementFiles: Target[Seq[PathRef]]

requirements.txt of this module, and all other modules that this module depends on, recursively.

requirements.txt of this module, and all other modules that this module depends on, recursively.

Attributes

See also
@Scaladoc(value = "/**\n * Any python wheels to install directly, for this module and all upstream modules, recursively.\n *\n * @see [[unmanagedWheels]]\n */")
def transitiveUnmanagedWheels: Target[Seq[PathRef]]

Any python wheels to install directly, for this module and all upstream modules, recursively.

Any python wheels to install directly, for this module and all upstream modules, recursively.

Attributes

See also
@Scaladoc(value = "/**\n * Any python wheels to install directly.\n *\n * Note: you can also include wheels by using [direct\n * references](https://peps.python.org/pep-0440/#direct-references) in [[pythonRequirementFiles]], for\n * example `\"pip @ file:///localbuilds/pip-1.3.1-py33-none-any.whl\"`. However, if you do that then\n * changes to these files won\'t get picked up and you are on the hook for cache invalidation.\n * Therefore, if you have any wheels that you wish to install directly, it is recommended to add\n * them here.\n */")
def unmanagedWheels: Target[Seq[PathRef]]

Any python wheels to install directly.

Any python wheels to install directly.

Note: you can also include wheels by using direct references in pythonRequirementFiles, for example "pip @ file:///localbuilds/pip-1.3.1-py33-none-any.whl". However, if you do that then changes to these files won't get picked up and you are on the hook for cache invalidation. Therefore, if you have any wheels that you wish to install directly, it is recommended to add them here.

Attributes

Inherited methods

def moduleCtx: ModuleCtx

Attributes

Inherited from:
BaseClass
def moduleDir: Path

Attributes

Inherited from:
Module
def moduleDirJava: Path

Attributes

Inherited from:
Module
def moduleDirectChildren: Seq[Module]

Attributes

Inherited from:
Module
def moduleSegments: Segments

Attributes

Inherited from:
Module
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Module -> Any
Inherited from:
Module

Implicits

Inherited implicits

implicit def moduleNestedCtx: Nested

Attributes

Inherited from:
Module