Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.premailer: drop nose dependency #330702

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 29 additions & 14 deletions pkgs/development/python-modules/premailer/default.nix
Original file line number Diff line number Diff line change
@@ -1,40 +1,55 @@
{
lib,
buildPythonPackage,
fetchPypi,
isPy27,
fetchpatch2,
fetchFromGitHub,
setuptools,
cssselect,
cssutils,
lxml,
mock,
nose,
requests,
cachetools,
pytestCheckHook,
}:

buildPythonPackage rec {
buildPythonPackage {
pname = "premailer";
version = "3.10.0";
format = "setuptools";
disabled = isPy27; # no longer compatible with urllib
pyproject = true;

src = fetchPypi {
inherit pname version;
sha256 = "d1875a8411f5dc92b53ef9f193db6c0f879dc378d618e0ad292723e388bfe4c2";
src = fetchFromGitHub {
owner = "peterbe";
repo = "premailer";
rev = "f4ded0b9701c4985e7ff5c5beda83324c264ea62"; # no tags
hash = "sha256-8ALdpR3aIDg0wP+JYCPY1f7mEJgdJm8xlLlgGpa0Sa4=";
};

buildInputs = [
mock
nose
patches = [
# Migrate to pytest: https://github.com/peterbe/premailer/pull/288
(fetchpatch2 {
Sigmanificient marked this conversation as resolved.
Show resolved Hide resolved
url = "https://github.com/peterbe/premailer/commit/afed2d515bbf3b99753abfae7435a44c352027e9.patch?full_index=1";
hash = "sha256-aDProDHowThMBcVCRwXqcG17osHAeznDk4DFJ5Bv8kw=";
})
];
propagatedBuildInputs = [

build-system = [ setuptools ];

dependencies = [
cachetools
cssselect
cssutils
lxml
requests
];

nativeCheckInputs = [ pytestCheckHook ];

pythonImportCheck = [
"premailer"
"premailer.cache"
"premailer.merge_style"
];

meta = {
description = "Turns CSS blocks into style attributes";
homepage = "https://github.com/peterbe/premailer";
Expand Down