| 1 |
Build and publish the crate as python packages to pypi |
| 2 |
|
| 3 |
Usage: maturin[EXE] publish [OPTIONS] [ARGS]... |
| 4 |
|
| 5 |
Arguments: |
| 6 |
[ARGS]... |
| 7 |
Rustc flags |
| 8 |
|
| 9 |
Options: |
| 10 |
--debug |
| 11 |
Do not pass --release to cargo |
| 12 |
|
| 13 |
--no-strip |
| 14 |
Do not strip the library for minimum file size |
| 15 |
|
| 16 |
--no-sdist |
| 17 |
Don't build a source distribution |
| 18 |
|
| 19 |
-r, --repository <REPOSITORY> |
| 20 |
The repository (package index) to upload the package to. Should be a section in the config |
| 21 |
file. |
| 22 |
|
| 23 |
Can also be set via MATURIN_REPOSITORY environment variable. |
| 24 |
|
| 25 |
[env: MATURIN_REPOSITORY=] |
| 26 |
[default: pypi] |
| 27 |
|
| 28 |
--repository-url <REPOSITORY_URL> |
| 29 |
The URL of the registry where the wheels are uploaded to. This overrides --repository. |
| 30 |
|
| 31 |
Can also be set via MATURIN_REPOSITORY_URL environment variable. |
| 32 |
|
| 33 |
[env: MATURIN_REPOSITORY_URL=] |
| 34 |
|
| 35 |
-u, --username <USERNAME> |
| 36 |
Username for pypi or your custom registry. |
| 37 |
|
| 38 |
Can also be set via MATURIN_USERNAME environment variable. |
| 39 |
|
| 40 |
Set MATURIN_PYPI_TOKEN variable to use token-based authentication instead |
| 41 |
|
| 42 |
[env: MATURIN_USERNAME=] |
| 43 |
|
| 44 |
-p, --password <PASSWORD> |
| 45 |
Password for pypi or your custom registry. |
| 46 |
|
| 47 |
Can also be set via MATURIN_PASSWORD environment variable. |
| 48 |
|
| 49 |
[env: MATURIN_PASSWORD] |
| 50 |
|
| 51 |
--skip-existing |
| 52 |
Continue uploading files if one already exists. (Only valid when uploading to PyPI. Other |
| 53 |
implementations may not support this.) |
| 54 |
|
| 55 |
--non-interactive |
| 56 |
Do not interactively prompt for username/password if the required credentials are missing. |
| 57 |
|
| 58 |
Can also be set via MATURIN_NON_INTERACTIVE environment variable. |
| 59 |
|
| 60 |
[env: MATURIN_NON_INTERACTIVE=] |
| 61 |
|
| 62 |
--compatibility [<compatibility>...] |
| 63 |
Control the platform tag and PyPI compatibility. |
| 64 |
|
| 65 |
This options offers both fine-grained control over the linux libc tag and a more automatic |
| 66 |
PyPI-compatibility option. |
| 67 |
|
| 68 |
The `pypi` option applies on all platforms and ensure that only tags that can be uploaded |
| 69 |
to PyPI are used. The linux-specific options are `manylinux` tags (for example |
| 70 |
`manylinux2014`/`manylinux_2_24`) or `musllinux` tags (for example `musllinux_1_2`), and |
| 71 |
`linux` for the native linux tag. They are ignored on non-linux platforms. |
| 72 |
|
| 73 |
Note that `manylinux1` and `manylinux2010` are unsupported by the rust compiler. Wheels |
| 74 |
with the native `linux` tag will be rejected by pypi, unless they are separately validated |
| 75 |
by `auditwheel`. |
| 76 |
|
| 77 |
The default is the lowest compatible `manylinux` tag, or plain `linux` if nothing matched. |
| 78 |
|
| 79 |
-i, --interpreter [<INTERPRETER>...] |
| 80 |
The python versions to build wheels for, given as the executables of interpreters such as |
| 81 |
`python3.9` or `/usr/bin/python3.8` |
| 82 |
|
| 83 |
-f, --find-interpreter |
| 84 |
Find interpreters from the host machine |
| 85 |
|
| 86 |
-b, --bindings <BINDINGS> |
| 87 |
Which kind of bindings to use |
| 88 |
|
| 89 |
[possible values: pyo3, pyo3-ffi, cffi, uniffi, bin] |
| 90 |
|
| 91 |
-o, --out <OUT> |
| 92 |
The directory to store the built wheels in. Defaults to a new "wheels" directory in the |
| 93 |
project's target directory |
| 94 |
|
| 95 |
--auditwheel <AUDITWHEEL> |
| 96 |
Audit wheel for manylinux compliance |
| 97 |
|
| 98 |
Possible values: |
| 99 |
- repair: Audit and repair wheel for manylinux compliance |
| 100 |
- check: Check wheel for manylinux compliance, but do not repair |
| 101 |
- skip: Don't check for manylinux compliance |
| 102 |
|
| 103 |
--zig |
| 104 |
For manylinux targets, use zig to ensure compliance for the chosen manylinux version |
| 105 |
|
| 106 |
Default to manylinux2014/manylinux_2_17 if you do not specify an `--compatibility` |
| 107 |
|
| 108 |
Make sure you installed zig with `pip install maturin[zig]` |
| 109 |
|
| 110 |
-q, --quiet |
| 111 |
Do not print cargo log messages |
| 112 |
|
| 113 |
--ignore-rust-version |
| 114 |
Ignore `rust-version` specification in packages |
| 115 |
|
| 116 |
-v, --verbose... |
| 117 |
Use verbose output (-vv very verbose/build.rs output) |
| 118 |
|
| 119 |
--color <WHEN> |
| 120 |
Coloring: auto, always, never |
| 121 |
|
| 122 |
--config <KEY=VALUE> |
| 123 |
Override a configuration value (unstable) |
| 124 |
|
| 125 |
-Z <FLAG> |
| 126 |
Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details |
| 127 |
|
| 128 |
--future-incompat-report |
| 129 |
Outputs a future incompatibility report at the end of the build (unstable) |
| 130 |
|
| 131 |
--compression-method <COMPRESSION_METHOD> |
| 132 |
Zip compression method. Only Stored and Deflated are currently compatible with all package |
| 133 |
managers |
| 134 |
|
| 135 |
[default: deflated] |
| 136 |
|
| 137 |
Possible values: |
| 138 |
- deflated: Deflate compression (levels 0-9, default 6) |
| 139 |
- stored: No compression |
| 140 |
- bzip2: BZIP2 compression (levels 0-9, default 6) |
| 141 |
- zstd: Zstandard compression (supported from Python 3.14; levels -7-22, default 3) |
| 142 |
|
| 143 |
--compression-level <COMPRESSION_LEVEL> |
| 144 |
Zip compression level. Defaults to method default |
| 145 |
|
| 146 |
-h, --help |
| 147 |
Print help (see a summary with '-h') |
| 148 |
|
| 149 |
Compilation Options: |
| 150 |
-j, --jobs <N> |
| 151 |
Number of parallel jobs, defaults to # of CPUs |
| 152 |
|
| 153 |
--profile <PROFILE-NAME> |
| 154 |
Build artifacts with the specified Cargo profile |
| 155 |
|
| 156 |
--target <TRIPLE> |
| 157 |
Build for the target triple |
| 158 |
|
| 159 |
[env: CARGO_BUILD_TARGET=] |
| 160 |
|
| 161 |
--target-dir <DIRECTORY> |
| 162 |
Directory for all generated artifacts |
| 163 |
|
| 164 |
--timings=<FMTS> |
| 165 |
Timing output formats (unstable) (comma separated): html, json |
| 166 |
|
| 167 |
Feature Selection: |
| 168 |
-F, --features <FEATURES> |
| 169 |
Space or comma separated list of features to activate |
| 170 |
|
| 171 |
--all-features |
| 172 |
Activate all available features |
| 173 |
|
| 174 |
--no-default-features |
| 175 |
Do not activate the `default` feature |
| 176 |
|
| 177 |
Manifest Options: |
| 178 |
-m, --manifest-path <PATH> |
| 179 |
Path to Cargo.toml |
| 180 |
|
| 181 |
--frozen |
| 182 |
Require Cargo.lock and cache are up to date |
| 183 |
|
| 184 |
--locked |
| 185 |
Require Cargo.lock is up to date |
| 186 |
|
| 187 |
--offline |
| 188 |
Run without accessing the network |