summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/raincloudy
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2023-02-13 17:13:20 +0100
committerMartin Weinelt <hexa@darmstadt.ccc.de>2023-02-13 17:16:05 +0100
commit1069dbc604de80eccfdd2f19b3ecc7e6311b45bc (patch)
tree71aa4ffed73c9ecb3961108da422fcdf8f291418 /pkgs/development/python-modules/raincloudy
parentb421e2a0a3998939d9cdba2f791a253a2f10a570 (diff)
python310Packages.raincloudy: Fix build
Due to an improper update during a python-updates cycle this package broke. With version 1.2.0 there is now `raincloudy.aio`, which does not get installed on recent setuptools versions, due to a misconfigured packages configuration in setup.py. Also convert the build process to a PEP517 based build using setuptools and fix the distinfo version by adding setuptools-scm. Additionally `aiohttp` is an undeclared dependencym, for which a PR has already been submitted upstream.
Diffstat (limited to 'pkgs/development/python-modules/raincloudy')
-rw-r--r--pkgs/development/python-modules/raincloudy/default.nix35
1 files changed, 28 insertions, 7 deletions
diff --git a/pkgs/development/python-modules/raincloudy/default.nix b/pkgs/development/python-modules/raincloudy/default.nix
index da4a3846a95f..6a223bb4fb76 100644
--- a/pkgs/development/python-modules/raincloudy/default.nix
+++ b/pkgs/development/python-modules/raincloudy/default.nix
@@ -1,12 +1,18 @@
{ lib
+, aiohttp
+, aioresponses
, beautifulsoup4
, buildPythonPackage
, fetchFromGitHub
, html5lib
+, pytest-asyncio
+, pytest-aiohttp
, pytestCheckHook
, pythonOlder
, requests
, requests-mock
+, setuptools
+, setuptools-scm
, urllib3
}:
@@ -24,7 +30,25 @@ buildPythonPackage rec {
hash = "sha256-qCkBVirM09iA1sXiOB9FJns8bHjQq7rRk8XbRWrtBDI=";
};
+ nativeBuildInputs = [
+ setuptools
+ setuptools-scm
+ ];
+
+ SETUPTOOLS_SCM_PRETEND_VERSION = version;
+
+ postPatch = ''
+ # https://github.com/vanstinator/raincloudy/pull/60
+ substituteInPlace setup.py \
+ --replace "bs4" "beautifulsoup4" \
+
+ # fix raincloudy.aio package discovery, by relying on
+ # autodiscovery instead.
+ sed -i '/packages=/d' setup.py
+ '';
+
propagatedBuildInputs = [
+ aiohttp
requests
beautifulsoup4
urllib3
@@ -32,19 +56,16 @@ buildPythonPackage rec {
];
nativeCheckInputs = [
+ aioresponses
+ pytest-asyncio
+ pytest-aiohttp
pytestCheckHook
requests-mock
];
- postPatch = ''
- # https://github.com/vanstinator/raincloudy/pull/60
- substituteInPlace setup.py \
- --replace "bs4" "beautifulsoup4" \
- --replace "html5lib==1.0.1" "html5lib"
- '';
-
pythonImportsCheck = [
"raincloudy"
+ "raincloudy.aio"
];
disabledTests = [