File tree Expand file tree Collapse file tree 4 files changed +36
-24
lines changed
pkgs/development/python-modules Expand file tree Collapse file tree 4 files changed +36
-24
lines changed Original file line number Diff line number Diff line change 11{
22 lib ,
3- buildPythonPackage ,
4- pythonOlder ,
5- fetchFromGitHub ,
63 aiohttp ,
7- yarl ,
84 aresponses ,
5+ buildPythonPackage ,
6+ fetchFromGitHub ,
97 poetry-core ,
108 pytest-asyncio ,
9+ pytest-cov-stub ,
1110 pytestCheckHook ,
11+ pythonOlder ,
12+ yarl ,
1213} :
1314
1415buildPythonPackage rec {
@@ -26,8 +27,8 @@ buildPythonPackage rec {
2627 } ;
2728
2829 postPatch = ''
30+ # Upstream is creating GitHub releases without version
2931 substituteInPlace pyproject.toml \
30- --replace "--cov" "" \
3132 --replace '"0.0.0"' '"${ version } "'
3233 '' ;
3334
@@ -41,6 +42,7 @@ buildPythonPackage rec {
4142 nativeCheckInputs = [
4243 aresponses
4344 pytest-asyncio
45+ pytest-cov-stub
4446 pytestCheckHook
4547 ] ;
4648
Original file line number Diff line number Diff line change 33 buildPythonPackage ,
44 fetchFromGitHub ,
55 paho-mqtt_2 ,
6+ pytest-cov-stub ,
67 pytestCheckHook ,
78 python-dateutil ,
89 pythonOlder ,
@@ -30,8 +31,7 @@ buildPythonPackage rec {
3031 substituteInPlace requirements.txt \
3132 --replace-fail "weconnect[Images]~=" "weconnect>="
3233 substituteInPlace pytest.ini \
33- --replace-fail "--cov=weconnect_mqtt --cov-config=.coveragerc --cov-report html" "" \
34- --replace-fail "pytest-cov" ""
34+ --replace-fail "required_plugins = pytest-cov" ""
3535 '' ;
3636
3737 pythonRelaxDeps = [ "python-dateutil" ] ;
@@ -44,15 +44,18 @@ buildPythonPackage rec {
4444 weconnect
4545 ] ++ weconnect . optional-dependencies . Images ;
4646
47- nativeCheckInputs = [ pytestCheckHook ] ;
47+ nativeCheckInputs = [
48+ pytest-cov-stub
49+ pytestCheckHook
50+ ] ;
4851
4952 pythonImportsCheck = [ "weconnect_mqtt" ] ;
5053
5154 meta = {
5255 description = "Python client that publishes data from Volkswagen WeConnect" ;
5356 homepage = "https://github.com/tillsteinbach/WeConnect-mqtt" ;
5457 changelog = "https://github.com/tillsteinbach/WeConnect-mqtt/releases/tag/v${ version } " ;
55- license = with lib . licenses ; [ mit ] ;
58+ license = lib . licenses . mit ;
5659 maintainers = with lib . maintainers ; [ fab ] ;
5760 mainProgram = "weconnect-mqtt" ;
5861 } ;
Original file line number Diff line number Diff line change 55 fetchFromGitHub ,
66 oauthlib ,
77 pillow ,
8+ pytest-cov-stub ,
89 pytestCheckHook ,
910 pythonOlder ,
1011 requests ,
@@ -32,13 +33,12 @@ buildPythonPackage rec {
3233 --replace-fail "setup_requires=SETUP_REQUIRED" "setup_requires=[]" \
3334 --replace-fail "tests_require=TEST_REQUIRED" "tests_require=[]"
3435 substituteInPlace pytest.ini \
35- --replace-fail "--cov=weconnect --cov-config=.coveragerc --cov-report html" "" \
3636 --replace-fail "required_plugins = pytest-cov" ""
3737 '' ;
3838
39- nativeBuildInputs = [ setuptools ] ;
39+ build-system = [ setuptools ] ;
4040
41- propagatedBuildInputs = [
41+ dependencies = [
4242 oauthlib
4343 requests
4444 ] ;
@@ -50,15 +50,18 @@ buildPythonPackage rec {
5050 ] ;
5151 } ;
5252
53- nativeCheckInputs = [ pytestCheckHook ] ;
53+ nativeCheckInputs = [
54+ pytest-cov-stub
55+ pytestCheckHook
56+ ] ;
5457
5558 pythonImportsCheck = [ "weconnect" ] ;
5659
5760 meta = with lib ; {
5861 description = "Python client for the Volkswagen WeConnect Services" ;
5962 homepage = "https://github.com/tillsteinbach/WeConnect-python" ;
6063 changelog = "https://github.com/tillsteinbach/WeConnect-python/releases/tag/v${ version } " ;
61- license = with licenses ; [ mit ] ;
64+ license = licenses . mit ;
6265 maintainers = with maintainers ; [ fab ] ;
6366 } ;
6467}
Original file line number Diff line number Diff line change 11{
22 lib ,
3+ arrow ,
34 buildPythonPackage ,
4- pythonOlder ,
55 fetchFromGitHub ,
66 poetry-core ,
7- arrow ,
8- requests-oauthlib ,
9- typing-extensions ,
107 pydantic ,
11- responses ,
8+ pytest-cov-stub ,
129 pytestCheckHook ,
10+ pythonOlder ,
11+ requests-oauthlib ,
12+ responses ,
13+ typing-extensions ,
1314} :
1415
1516buildPythonPackage rec {
1617 pname = "withings-api" ;
1718 version = "2.4.0" ;
18- format = "pyproject" ;
19+ pyproject = true ;
1920
2021 disabled = pythonOlder "3.6" ;
2122
@@ -28,27 +29,30 @@ buildPythonPackage rec {
2829
2930 postPatch = ''
3031 substituteInPlace pyproject.toml \
31- --replace 'requests-oauth = ">=0.4.1"' ''' \
32- --replace 'addopts = "--capture no --cov ./withings_api --cov-report html:build/coverage_report --cov-report term --cov-report xml:build/coverage.xml"' '''
32+ --replace-fail 'requests-oauth = ">=0.4.1"' '''
3333 '' ;
3434
35- nativeBuildInputs = [ poetry-core ] ;
35+ build-system = [ poetry-core ] ;
3636
37- propagatedBuildInputs = [
37+ dependencies = [
3838 arrow
3939 requests-oauthlib
4040 typing-extensions
4141 pydantic
4242 ] ;
4343
4444 nativeCheckInputs = [
45+ pytest-cov-stub
4546 pytestCheckHook
4647 responses
4748 ] ;
4849
50+ pythonImportsCheck = [ "withings_api" ] ;
51+
4952 meta = with lib ; {
5053 description = "Library for the Withings Health API" ;
5154 homepage = "https://github.com/vangorra/python_withings_api" ;
55+ changelog = "https://github.com/vangorra/python_withings_api/releases/tag/${ version } " ;
5256 license = licenses . mit ;
5357 maintainers = with maintainers ; [ kittywitch ] ;
5458 broken = versionAtLeast pydantic . version "2" ;
You can’t perform that action at this time.
0 commit comments