nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 async-timeout,
5 buildPythonPackage,
6 fetchPypi,
7 pytest-asyncio,
8 pytest-cov-stub,
9 pytest-mock,
10 pytestCheckHook,
11 setuptools,
12 siosocks,
13 trustme,
14}:
15
16buildPythonPackage rec {
17 pname = "aioftp";
18 version = "0.27.2";
19 pyproject = true;
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-fASMMiAIF5bFmDKm/Z/Y+tl+POwSpQvjq8zy3LvrJho=";
24 };
25
26 build-system = [ setuptools ];
27
28 optional-dependencies = {
29 socks = [ siosocks ];
30 };
31
32 nativeCheckInputs = [
33 async-timeout
34 pytest-asyncio
35 pytest-cov-stub
36 pytest-mock
37 pytestCheckHook
38 trustme
39 ]
40 ++ lib.concatAttrValues optional-dependencies;
41
42 disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
43 # uses 127.0.0.2, which macos doesn't like
44 "test_pasv_connection_pasv_forced_response_address"
45 ];
46
47 pythonImportsCheck = [ "aioftp" ];
48
49 meta = {
50 description = "Python FTP client/server for asyncio";
51 homepage = "https://aioftp.readthedocs.io/";
52 changelog = "https://github.com/aio-libs/aioftp/blob/${version}/history.rst";
53 license = lib.licenses.asl20;
54 maintainers = [ ];
55 };
56}