Skip to content

Commit 6b85c04

Browse files
committed
update docs for new build system
1 parent 9521cc7 commit 6b85c04

File tree

8 files changed

+485
-46
lines changed

8 files changed

+485
-46
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,6 @@ Python-3.9.9 | packaged by conda-forge | (main, Dec 20 2021, 02:38:53)
3939
[Clang 11.1.0 ]
4040
```
4141

42-
## Licensing and contributing to PyZMQ
43-
44-
PyZMQ uses different licenses for different parts of the code.
45-
46-
The 'core' of PyZMQ (located in zmq/core) is licensed under LGPLv3.
47-
This just means that if you make any changes to how that code works,
48-
you must release those changes under the LGPL.
49-
If you just _use_ pyzmq, then you can use any license you want for your own code.
50-
51-
We don't feel that the restrictions imposed by the LGPL make sense for the
52-
'non-core' functionality in pyzmq (derivative code must _also_ be LGPL or GPL),
53-
especially for examples and utility code, so we have relicensed all 'non-core'
54-
code under the more permissive BSD (specifically Modified BSD aka New BSD aka
55-
3-clause BSD), where possible. This means that you can copy this code and build
56-
your own apps without needing to license your own code with the LGPL or GPL.
57-
5842
### Your contributions
5943

6044
**Pull Requests are welcome!**
@@ -85,10 +69,7 @@ inherits that project's license.
8569

8670
- zmq/ssh/forward.py is from [paramiko], and inherits LGPL
8771

88-
- zmq/devices/monitoredqueue.pxd is derived from the zmq_device function in
89-
libzmq, and inherits LGPL
90-
91-
- perf examples are (c) iMatix, and LGPL
72+
- perf examples are (c) iMatix, and MPL
9273

9374
[paramiko]: http://www.lag.net/paramiko
9475
[pre-commit]: https://pre-commit.com

README.md

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ building from the repository will require that you install recent Cython.
4141

4242
## Building and installation
4343

44-
For more detail on building pyzmq, see [our Wiki](https://github.com/zeromq/pyzmq/wiki/Building-and-Installing-PyZMQ).
44+
For more detail on building pyzmq, see [our docs](https://pyzmq.readthedocs.io/en/latest/howto/build.html).
4545

4646
We build wheels for macOS, Windows, and Linux, so you can get a binary on those platforms with:
4747

@@ -50,33 +50,16 @@ pip install pyzmq
5050
```
5151

5252
but compiling from source with `pip install pyzmq` should work in most environments.
53-
Especially on macOS, make sure you are using the latest pip (≥ 8), or it may not find the right wheels.
53+
Make sure you are using the latest pip, or it may not find the right wheels.
5454

5555
If the wheel doesn't work for some reason, or you want to force pyzmq to be compiled
5656
(this is often preferable if you already have libzmq installed and configured the way you want it),
57-
you can force installation with:
57+
you can force installation from source with:
5858

5959
```
60-
pip install --no-binary=:all: pyzmq
60+
pip install --no-binary=pyzmq pyzmq
6161
```
6262

63-
When compiling pyzmq (e.g. installing with pip on Linux),
64-
it is generally recommended that zeromq be installed separately,
65-
via homebrew, apt, yum, etc:
66-
67-
```
68-
# Debian-based
69-
sudo apt-get install libzmq3-dev
70-
71-
# RHEL-based
72-
sudo yum install libzmq3-devel
73-
```
74-
75-
If this is not available, pyzmq will _try_ to build libzmq as a Python Extension,
76-
though this is not guaranteed to work.
77-
78-
Building pyzmq from the git repo (including release tags on GitHub) requires Cython.
79-
8063
## Old versions
8164

8265
pyzmq 16 drops support Python 2.6 and 3.2.

docs/source/changelog.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,27 @@ For a full changelog, consult the [git log](https://github.com/zeromq/pyzmq/comm
77

88
## 26
99

10-
pyzmq 26 is a small release, but with some big changes nobody should notice.
11-
The Cython backend has been rewritten using Cython 3's pure Python mode.
10+
pyzmq 26 is a small release, but with some big changes _hopefully_ nobody will notice.
11+
The highlights are:
12+
13+
- The Cython backend has been rewritten using Cython 3's pure Python mode.
14+
- The build system has been rewritten to use CMake via [scikit-build-core] instead of setuptools (setup.py is gone!).
15+
- Bundled libzmq is updated to 4.3.5, which changes its license from LGPL to MPL.
16+
1217
This means:
1318

1419
1. Cython >=3.0 is now a build requirement (if omitted, source distributions _should_ still build from Cython-generated .c files without any Cython present)
1520
1. pyzmq's Cython backend is a single extension module, which should improve install size, import time, compile time, etc.
1621
1. pyzmq's Cython backend is now BSD-licensed, matching the rest of pyzmq.
22+
1. The license of the libzmq library (included in pyzmq wheels) starting with 4.3.5 is now Mozilla Public License 2.0 (MPL-2.0).
23+
1. when building pyzmq from source and it falls back on bundled libzmq, libzmq and libsodium are built as static libraries using their own build systems (CMake for libzmq, autotools for libsodium except on Windows where it uses msbuild)
24+
rather than bundling libzmq with tweetnacl as a Python Extension.
25+
26+
Since the new build system uses libzmq and libsodium's own build systems, evaluated at install time, building pyzmq with bundled libzmq from source should be much more likely to succeed on a variety of platforms than the previous method, where their build system was skipped and approximated as a Python extension.
27+
But I would also be _very_ surprised if I didn't break anything in the process of replacing 14 years of setup.py from scratch, especially cases like cross-compiling.
28+
Please [report](https://github.com/zeromq/pyzmq/issues/new) any issues you encounter building pyzmq.
1729

18-
The license of the libzmq library (included in pyzmq wheels and sources included but may not be used in pyzmq tarballs) remains unchanged and has its own LGPL license.
30+
See [build docs](building-pyzmq) for more info.
1931

2032
__Enhancements__:
2133

@@ -30,6 +42,7 @@ __Breaking changes__:
3042
`bytes(Frame)` remains unchanged, and utf-8 text strings can still be produced with:
3143
`bytes(Frame).decode("utf8")`,
3244
which works in all versions of pyzmq and does the same thing.
45+
- Stop building Python 3.7 wheels for manylinux1, which reached EOL in January, 2022. The new build system doesn't seem to be able to find cmake in that environment.
3346

3447
## 25
3548

@@ -1041,3 +1054,4 @@ s.linger
10411054

10421055
[cython-build-requires]: https://groups.google.com/g/cython-users/c/ZqKFQmS0JdA/m/1FrK1ApYBAAJ
10431056
[pyczmq]: https://github.com/zeromq/pyczmq
1057+
[scikit-build-core]: https://scikit-build-core.readthedocs.io

0 commit comments

Comments
 (0)