Skip to content

Commit

Permalink
Document PYO3_PACK_PASSWORD
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin committed Sep 14, 2018
1 parent dd47f5c commit a7028d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Pip allows adding so called console scripts, which are shell commands that execu
get_42 = "get_fourtytwo:DummyClass.get_42"
```

For pyo3 and rust-cpython, pyo3-pack can only build packages for installed python versions, so you might want to use pyenv, deadsnakes or docker for building. If you don't set your own interpreters with `-i`, a heuristic is used to search for python installations. You can get a list of those with the `list-python` subcommand. cffi wheels are compatible with all python versions, but they need to have `cffi` installed to build (`pip install cffi`).
For pyo3 and rust-cpython, pyo3-pack can only build packages for installed python versions, so you might want to use pyenv, deadsnakes or docker for building. If you don't set your own interpreters with `-i`, a heuristic is used to search for python installations. You can get a list all found versions with the `list-python` subcommand.

### Build

Expand Down Expand Up @@ -99,7 +99,9 @@ OPTIONS:
-o, --out <out>
The directory to store the built wheels in. Defaults to a new "wheels" directory in the project's target
directory
-p, --password <password> Password for pypi or your custom registry
-p, --password <password>
Password for pypi or your custom registry. Note that you can also pass the password through
PYO3_PACK_PASSWORD
-r, --repository-url <registry>
The url of registry where the wheels are uploaded to [default: https://upload.pypi.org/legacy/]
Expand Down Expand Up @@ -135,7 +137,7 @@ OPTIONS:

## Cffi

For crates with cffi you need to use a build script that writes c headers to a file called `target/header.h` until [eqrion/cbdingen#203](https://github.com/eqrion/cbindgen/issues/203) is resolved:
Cffi wheels are compatible with all python versions, but they need to have `cffi` installed to build (`pip install cffi`). Until [eqrion/cbdingen#203](https://github.com/eqrion/cbindgen/issues/203) is resolved, you also need to use a build script that writes c headers to a file called `target/header.h`

```rust
extern crate cbindgen;
Expand All @@ -160,7 +162,7 @@ For portability reasons, native python modules on linux must only dynamically li

To ship a completely static binary with musl, you can use `pyo3-pack build -b bin --cargo-extra-args="--target=x86_64-unknown-linux-musl"`.

Note that the pyo3-pack pip package is not manylinux compliant (A compliant package could neither upload not use the keyring)
Note that the pyo3-pack pip package is not manylinux compliant (A compliant package, which you get with `--no-default-features --features auditwheel`, can neither upload nor use the keyring)

## Code

Expand Down
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ struct PublishOpt {
/// Username for pypi or your custom registry
username: Option<String>,
#[structopt(short = "p", long = "password")]
/// Password for pypi or your custom registry
/// Password for pypi or your custom registry. Note that you can also pass the password
/// through PYO3_PACK_PASSWORD
password: Option<String>,
}

Expand Down

0 comments on commit a7028d8

Please sign in to comment.