Merge pull request #313582 from fabaff/crc16-refactor

python312Packages.crc16: refactor, python312Packages.pyoppleio: refactor
This commit is contained in:
Fabian Affolter 2024-05-22 11:11:47 +02:00 committed by GitHub
commit a2ab4d5ae9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 34 additions and 19 deletions

View File

@ -1,19 +1,34 @@
{ lib, buildPythonPackage, fetchPypi }:
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
pythonOlder,
}:
buildPythonPackage rec {
pname = "crc16";
version = "0.1.1";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "15nkx0pa4lskwin84flpk8fsw3jqg6wic6v3s83syjqg76h6my61";
hash = "sha256-wfhqoDkPS68H0mMbFrl5WA6uHZqXOoJs5FNToi7o05Y=";
};
build-system = [ setuptools ];
# Tests are outdated
doCheck = false;
pythonImportsCheck = [ "crc16" ];
meta = with lib; {
homepage = "https://code.google.com/archive/p/pycrc16/";
description = "Python library for calculating CRC16";
license = licenses.lgpl3;
homepage = "https://code.google.com/archive/p/pycrc16/";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ abbradar ];
};
}

View File

@ -1,14 +1,16 @@
{ lib
, buildPythonPackage
, crc16
, fetchPypi
, pythonOlder
{
lib,
buildPythonPackage,
crc16,
fetchPypi,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "pyoppleio";
version = "1.0.7";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.7";
@ -17,22 +19,20 @@ buildPythonPackage rec {
hash = "sha256-S1w3pPqhX903kkXUq9ALz0+zRvNGOimLughRRVKjV8E=";
};
propagatedBuildInputs = [
crc16
];
build-system = [ setuptools ];
dependencies = [ crc16 ];
# Module has no tests
doCheck = false;
pythonImportsCheck = [
"pyoppleio"
];
pythonImportsCheck = [ "pyoppleio" ];
meta = with lib; {
description = "Library for interacting with OPPLE lights";
mainProgram = "oppleio";
homepage = "https://github.com/jedmeng/python-oppleio";
license = with licenses; [ asl20 ];
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
mainProgram = "oppleio";
};
}