Skip to content

Commit 8c2be6d

Browse files
authored
python312Packages.atproto: init at 0.0.59 (#383978)
2 parents e4dd0c7 + 5b70ebc commit 8c2be6d

File tree

3 files changed

+179
-0
lines changed

3 files changed

+179
-0
lines changed
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{
2+
lib,
3+
fetchFromGitHub,
4+
buildPythonPackage,
5+
pythonOlder,
6+
nix-update-script,
7+
8+
# build-system
9+
poetry-core,
10+
poetry-dynamic-versioning,
11+
12+
# dependencies
13+
click,
14+
cryptography,
15+
dnspython,
16+
httpx,
17+
libipld,
18+
pydantic,
19+
typing-extensions,
20+
websockets,
21+
22+
# nativeCheckInputs
23+
pytestCheckHook,
24+
pytest-asyncio,
25+
coverage,
26+
}:
27+
28+
buildPythonPackage rec {
29+
pname = "atproto";
30+
version = "0.0.59";
31+
format = "pyproject";
32+
disabled = pythonOlder "3.8";
33+
34+
# use GitHub, pypi does not include tests
35+
src = fetchFromGitHub {
36+
owner = "MarshalX";
37+
repo = "atproto";
38+
tag = "v${version}";
39+
hash = "sha256-Q+ZJMbchz3u7kXAR9fJpzJd6Zdc44LkntPmEE7IeW6A=";
40+
};
41+
42+
POETRY_DYNAMIC_VERSIONING_BYPASS = version;
43+
44+
build-system = [
45+
poetry-core
46+
poetry-dynamic-versioning
47+
];
48+
49+
dependencies = [
50+
click
51+
cryptography
52+
dnspython
53+
httpx
54+
libipld
55+
pydantic
56+
typing-extensions
57+
websockets
58+
];
59+
60+
pythonRelaxDeps = [
61+
"websockets"
62+
];
63+
64+
nativeCheckInputs = [
65+
pytestCheckHook
66+
pytest-asyncio
67+
coverage
68+
];
69+
70+
disabledTestPaths = [
71+
# the required `_PATH_TO_LEXICONS` is outside the package tree
72+
"tests/test_atproto_lexicon/test_lexicon_parser.py"
73+
# touches network
74+
"tests/test_atproto_identity/test_atproto_data.py"
75+
"tests/test_atproto_identity/test_async_atproto_data.py"
76+
"tests/test_atproto_identity/test_did_resolver.py"
77+
"tests/test_atproto_identity/test_async_did_resolver.py"
78+
"tests/test_atproto_identity/test_did_resolver_cache.py"
79+
"tests/test_atproto_identity/test_async_did_resolver_cache.py"
80+
"tests/test_atproto_identity/test_handle_resolver.py"
81+
"tests/test_atproto_identity/test_async_handle_resolver.py"
82+
"tests/test_atproto_server/auth/test_custom_feed_auth.py"
83+
];
84+
85+
pythonImportsCheck = [
86+
"atproto"
87+
"atproto_cli"
88+
"atproto_client"
89+
"atproto_codegen"
90+
"atproto_core"
91+
"atproto_crypto"
92+
"atproto_firehose"
93+
"atproto_identity"
94+
"atproto_lexicon"
95+
"atproto_server"
96+
];
97+
98+
passthru.updateScript = nix-update-script { };
99+
100+
meta = {
101+
description = "AT Protocol (Bluesky) SDK for Python";
102+
homepage = "https://github.com/MarshalX/atproto";
103+
changelog = "https://github.com/MarshalX/atproto/blob/v${version}/CHANGES.md";
104+
license = lib.licenses.mit;
105+
maintainers = with lib.maintainers; [ vji ];
106+
};
107+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
lib,
3+
fetchPypi,
4+
buildPythonPackage,
5+
pythonOlder,
6+
rustPlatform,
7+
nix-update-script,
8+
9+
# build-system
10+
maturin,
11+
12+
# nativeCheckInputs
13+
pytestCheckHook,
14+
pytest-benchmark,
15+
pytest-codspeed,
16+
pytest-xdist,
17+
}:
18+
19+
buildPythonPackage rec {
20+
pname = "libipld";
21+
version = "3.0.1";
22+
format = "pyproject";
23+
disabled = pythonOlder "3.8";
24+
25+
# use pypi, GitHub does not include Cargo.lock
26+
src = fetchPypi {
27+
inherit pname version;
28+
hash = "sha256-KXB1LecOX9ysRkaQDN76oNygjbm11ZxAtUltmeO/+mQ=";
29+
};
30+
31+
cargoDeps = rustPlatform.fetchCargoVendor {
32+
inherit src;
33+
hash = "sha256-V/UGTO+VEBtv5gwKR/fZmmhbeYILsIVc7Mq/Rl6E4Dw=";
34+
};
35+
36+
build-system = [
37+
maturin
38+
];
39+
40+
nativeBuildInputs = with rustPlatform; [
41+
cargoSetupHook
42+
maturinBuildHook
43+
];
44+
45+
nativeCheckInputs = [
46+
pytestCheckHook
47+
pytest-benchmark
48+
pytest-codspeed
49+
pytest-xdist
50+
];
51+
52+
disabledTests = [
53+
# touches network
54+
"test_decode_car"
55+
];
56+
57+
pythonImportsCheck = [ "libipld" ];
58+
59+
passthru.updateScript = nix-update-script { };
60+
61+
meta = {
62+
description = "Fast Python library to work with IPLD: DAG-CBOR, CID, CAR, multibase";
63+
homepage = "https://github.com/MarshalX/python-libipld";
64+
changelog = "https://github.com/MarshalX/python-libipld/blob/v${version}/CHANGES.md";
65+
license = lib.licenses.mit;
66+
maintainers = with lib.maintainers; [ vji ];
67+
};
68+
}

pkgs/top-level/python-packages.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,8 @@ self: super: with self; {
998998

999999
atomman = callPackage ../development/python-modules/atomman { };
10001000

1001+
atproto = callPackage ../development/python-modules/atproto { };
1002+
10011003
atpublic = callPackage ../development/python-modules/atpublic { };
10021004

10031005
atsim-potentials = callPackage ../development/python-modules/atsim-potentials { };
@@ -7407,6 +7409,8 @@ self: super: with self; {
74077409
inherit python;
74087410
})).python;
74097411

7412+
libipld = callPackage ../development/python-modules/libipld { };
7413+
74107414
libkeepass = callPackage ../development/python-modules/libkeepass { };
74117415

74127416
libknot = callPackage ../development/python-modules/libknot { };

0 commit comments

Comments
 (0)