3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/pyserial/default.nix
Rouven Czerwinski db945b0751 python3Packages.pyserial: patches for RFC2217
These two patches significantly improve the RFC2217 negotiation and
support for devices like the Moxa serial servers. The patches reduce the
amount of negotiations done over RFC2217 and, in case of the timeout
setter patch, prevent pyserial from setting the timeout again on every
send line. We have been using these in a downstream fork for 2 years now
and have not seen problems in the field. Upstream has acted neither on
the issue [1] nor on the proposed pull request [2], so I am proposing to
include them downstream within nixpkgs instead.

[1]: https://github.com/pyserial/pyserial/issues/376
[2]: https://github.com/pyserial/pyserial/pull/382
2021-02-17 10:56:45 +01:00

27 lines
689 B
Nix

{ stdenv, lib, fetchPypi, buildPythonPackage }:
buildPythonPackage rec {
pname = "pyserial";
version="3.5";
src = fetchPypi {
inherit pname version;
sha256 = "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw";
};
patches = [
./001-rfc2217-only-negotiate-on-value-change.patch
./002-rfc2217-timeout-setter-for-rfc2217.patch
];
checkPhase = "python -m unittest discover -s test";
doCheck = !stdenv.hostPlatform.isDarwin; # broken on darwin
meta = with lib; {
homepage = "https://github.com/pyserial/pyserial";
license = licenses.psfl;
description = "Python serial port extension";
maintainers = with maintainers; [ makefu ];
};
}