Merge pull request #277655 from eclairevoyant/aiogram
python3Packages.aiogram: fix build failure, add passthru.updateScript
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
, aiohttp
|
||||
, aiohttp-socks
|
||||
, aioredis
|
||||
, aiofiles
|
||||
, aresponses
|
||||
, babel
|
||||
, certifi
|
||||
@@ -13,12 +14,16 @@
|
||||
, pytest-asyncio
|
||||
, pytest-lazy-fixture
|
||||
, redis
|
||||
, hatchling
|
||||
, pydantic
|
||||
, pytz
|
||||
, gitUpdater
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aiogram";
|
||||
version = "3.2.0";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
@@ -29,18 +34,17 @@ buildPythonPackage rec {
|
||||
hash = "sha256-8SYrg+gfNSTR0CTPf4cYDa4bfA0LPBmZtPcATF22fqw=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "aiohttp>=3.8.0,<3.9.0" "aiohttp" \
|
||||
--replace "Babel>=2.9.1,<2.10.0" "Babel" \
|
||||
--replace "magic-filter>=1.0.9" "magic-filter"
|
||||
'';
|
||||
nativeBuildInputs = [
|
||||
hatchling
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
aiofiles
|
||||
aiohttp
|
||||
babel
|
||||
certifi
|
||||
magic-filter
|
||||
pydantic
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
@@ -50,17 +54,20 @@ buildPythonPackage rec {
|
||||
pytest-asyncio
|
||||
pytest-lazy-fixture
|
||||
pytestCheckHook
|
||||
pytz
|
||||
redis
|
||||
];
|
||||
|
||||
# requires network
|
||||
# import failures
|
||||
disabledTests = [
|
||||
"test_download_file_404"
|
||||
"test_download_404"
|
||||
"test_aiohtt_server"
|
||||
"test_deep_linking"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "aiogram" ];
|
||||
|
||||
passthru.updateScript = gitUpdater { };
|
||||
|
||||
meta = with lib; {
|
||||
description = "Modern and fully asynchronous framework for Telegram Bot API";
|
||||
homepage = "https://github.com/aiogram/aiogram";
|
||||
|
||||
@@ -20,6 +20,11 @@ buildPythonPackage rec {
|
||||
hash = "sha256-MSYIZ/bzngRu6mG3EGblUotSCA+6bi+l3EymFA8NRZA=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace magic_filter/__init__.py \
|
||||
--replace '"1"' '"${version}"'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
hatchling
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user