You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Changelog.md
+17-3
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,18 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [0.3.4] - 2018-09-18
8
9
9
-
## [Unreleased]
10
+
### Added
11
+
12
+
* A `--target` option which behaves like cargo option of the same name
13
+
14
+
### Changed
15
+
16
+
* Musl and auditwheel compliance: Using the new `musl` feature combined with the musl target, you can build completely static binaries. The `password-storage`, which enables keyring integration, is now disabled by default. The Pypi packages are now statically linked with musl so that they are audtiwheel compliant.
17
+
* Replaced `--debug` with `--release`. All builds are now debug by default
18
+
19
+
## [0.3.3] - 2018-09-17
10
20
11
21
### Added
12
22
@@ -16,6 +26,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
16
26
## Fixed
17
27
18
28
* Usage with stable
29
+
* Wrong tags in WHEEL file on non-linux platforms
30
+
* Uploading on windows
19
31
20
32
## [0.3.1] - 2017-09-14
21
33
@@ -56,8 +68,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Copy file name to clipboardexpand all lines: Readme.md
+39-35
Original file line number
Diff line number
Diff line change
@@ -41,21 +41,55 @@ Pip allows adding so called console scripts, which are shell commands that execu
41
41
get_42 = "get_fourtytwo:DummyClass.get_42"
42
42
```
43
43
44
+
## pyo3 and rust-cpython
45
+
44
46
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.
45
47
48
+
49
+
## Cffi
50
+
51
+
Cffi wheels are compatible with all python versions, but they need to have `cffi` installed for the python used for building (`pip install cffi`).
52
+
53
+
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`
For portability reasons, native python modules on linux must only dynamically link a set of very few libraries which are installed basically everywhere, hence the name manylinux. The pypa offers a special docker container and a tool called [auditwheel](https://github.com/pypa/auditwheel/) to ensure compliance with the [manylinux rules](https://www.python.org/dev/peps/pep-0513/#the-manylinux1-policy). pyo3-pack contains a reimplementation of the most important part of auditwheel that checks the generated library, so there's no need to use external tools. If you want to disable the manylinux compliance checks for some reason, use the `--skip-auditwheel` flag.
75
+
76
+
pyo3-pack itself is manylinux compliant when compiled with the `musl` feature and a musl target, which is true for the version published on pypi. The binaries on the release pages have keyring integration (though the `password-storage` feature), which is not manylinux compliant.
77
+
46
78
### Build
47
79
48
80
```
49
81
USAGE:
50
82
pyo3-pack build [FLAGS] [OPTIONS]
51
83
52
84
FLAGS:
53
-
-d, --debug Do a debug build (don't pass --release to cargo)
54
85
-h, --help Prints help information
86
+
--release Pass --release to cargo
55
87
--skip-auditwheel Don't check for manylinux compliance
56
88
-V, --version Prints version information
57
89
58
90
OPTIONS:
91
+
-m, --manifest-path <PATH> The path to the Cargo.toml [default: Cargo.toml]
92
+
--target <TRIPLE> The --target option for cargo
59
93
-b, --bindings-crate <bindings>
60
94
The crate providing the python bindings. pyo3, rust-cpython and cffi are supported
61
95
@@ -65,7 +99,6 @@ OPTIONS:
65
99
-i, --interpreter <interpreter>...
66
100
The python versions to build wheels for, given as the names of the interpreters. Uses autodiscovery if not
67
101
explicitly set.
68
-
-m, --manifest-path <manifest_path> The path to the Cargo.toml [default: Cargo.toml]
69
102
-o, --out <out>
70
103
The directory to store the built wheels in. Defaults to a new "wheels" directory in the project's target
71
104
directory
@@ -80,12 +113,14 @@ USAGE:
80
113
pyo3-pack publish [FLAGS] [OPTIONS]
81
114
82
115
FLAGS:
83
-
-d, --debug Do a debug build (don't pass --release to cargo)
84
116
-h, --help Prints help information
117
+
--release Pass --release to cargo
85
118
--skip-auditwheel Don't check for manylinux compliance
86
119
-V, --version Prints version information
87
120
88
121
OPTIONS:
122
+
-m, --manifest-path <PATH> The path to the Cargo.toml [default: Cargo.toml]
123
+
--target <TRIPLE> The --target option for cargo
89
124
-b, --bindings-crate <bindings>
90
125
The crate providing the python bindings. pyo3, rust-cpython and cffi are supported
91
126
@@ -95,7 +130,6 @@ OPTIONS:
95
130
-i, --interpreter <interpreter>...
96
131
The python versions to build wheels for, given as the names of the interpreters. Uses autodiscovery if not
97
132
explicitly set.
98
-
-m, --manifest-path <manifest_path> The path to the Cargo.toml [default: Cargo.toml]
99
133
-o, --out <out>
100
134
The directory to store the built wheels in. Defaults to a new "wheels" directory in the project's target
101
135
directory
@@ -119,7 +153,7 @@ USAGE:
119
153
120
154
FLAGS:
121
155
-h, --help Prints help information
122
-
--release Compile in release mode. This is useful e.g. for benchmarking
156
+
--release Pass --release to cargo
123
157
-V, --version Prints version information
124
158
125
159
OPTIONS:
@@ -134,36 +168,6 @@ OPTIONS:
134
168
Extra arguments that will be passed to rustc as `cargo rustc [...] -- [arg1] [arg2]`
135
169
```
136
170
137
-
138
-
## Cffi
139
-
140
-
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`
For portability reasons, native python modules on linux must only dynamically link a set of very few libraries which are installed basically everywhere, hence the name manylinux. The pypa offers a special docker container and a tool called [auditwheel](https://github.com/pypa/auditwheel/) to ensure compliance with the [manylinux rules](https://www.python.org/dev/peps/pep-0513/#the-manylinux1-policy). pyo3-pack contains a reimplementation of the most important part of auditwheel that checks the generated library, so there's no need to use external tools. If you want to disable the manylinux compliance checks for some reason, use the `--skip-auditwheel` flag.
162
-
163
-
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"`.
164
-
165
-
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)
166
-
167
171
## Code
168
172
169
173
The main part is the pyo3-pack library, which is completely documented and should be well integratable. The accompanying `main.rs` takes care username and password for the pypi upload and otherwise calls into the library.
0 commit comments