Commit ab15e3b7 authored by wxt's avatar wxt
Browse files

litestar: build for all python version

parent 52740553
Loading
Loading
Loading
Loading
+1 −56
Original line number Diff line number Diff line
{
  python3Packages,
  lib,
  fetchFromGitHub,
}:

python3Packages.buildPythonApplication rec {
  pname = "litestar";
  version = "2.13.0";
  pyproject = true;

  build-system = with python3Packages; [
    hatchling
  ];

  src = fetchFromGitHub {
    owner = "litestar-org";
    repo = "litestar";
    tag = "v${version}";
    hash = "sha256-PR2DVNRtILHs7XwVi9/ZCVRJQFqfGLn1x2gpYtYjHDo=";
  };

  dependencies = with python3Packages; [
    anyio
    click
    redis
    httpx
    msgspec
    multidict
    jinja2
    pyyaml
    rich
    rich-click
    typing-extensions
    psutil
    polyfactory
    litestar-htmx
    trio
    cryptography
    psycopg
    fsspec
    mako
    time-machine
    asyncpg
    picologging
  ];

  meta = {
    homepage = "https://litestar.dev/";
    platforms = lib.platforms.unix;
    maintainers = with lib.maintainers; [ bot-wxt1221 ];
    changelog = "https://github.com/litestar-org/litestar/releases/tag/v${version}";
    description = "Production-ready, Light, Flexible and Extensible ASGI API framework";
    license = lib.licenses.mit;
  };
}
{ python3Packages }: with python3Packages; toPythonApplication litestar
+113 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  hatchling,

  # dependencies
  anyio,
  asyncpg,
  click,
  cryptography,
  fsspec,
  httpx,
  jinja2,
  litestar-htmx,
  mako,
  msgspec,
  multidict,
  picologging,
  polyfactory,
  psutil,
  psycopg,
  pyyaml,
  redis,
  rich,
  rich-click,
  time-machine,
  trio,
  typing-extensions,

  # tests
  pytestCheckHook,
  pytest-lazy-fixtures,
  pytest-xdist,
  pytest-mock,
  pytest-asyncio,
  pytest-timeout,
  pytest-rerunfailures,
  versionCheckHook,
}:

buildPythonPackage rec {
  pname = "litestar";
  version = "2.13.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "litestar-org";
    repo = "litestar";
    tag = "v${version}";
    hash = "sha256-PR2DVNRtILHs7XwVi9/ZCVRJQFqfGLn1x2gpYtYjHDo=";
  };

  build-system = [
    hatchling
  ];

  dependencies = [
    anyio
    asyncpg
    click
    cryptography
    fsspec
    httpx
    jinja2
    litestar-htmx
    mako
    msgspec
    multidict
    picologging
    polyfactory
    psutil
    psycopg
    pyyaml
    redis
    rich
    rich-click
    time-machine
    trio
    typing-extensions
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-lazy-fixtures
    pytest-xdist
    pytest-mock
    pytest-asyncio
    pytest-timeout
    pytest-rerunfailures
    versionCheckHook
  ];
  versionCheckProgramArg = [ "version" ];

  __darwinAllowLocalNetworking = true;

  pytestFlagsArray = [
    # Follow github CI
    "docs/examples/"
  ];

  meta = {
    homepage = "https://litestar.dev/";
    platforms = lib.platforms.unix;
    maintainers = with lib.maintainers; [ bot-wxt1221 ];
    changelog = "https://github.com/litestar-org/litestar/releases/tag/v${version}";
    description = "Production-ready, Light, Flexible and Extensible ASGI API framework";
    license = lib.licenses.mit;
    mainProgram = "litestar";
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -7603,6 +7603,8 @@ self: super: with self; {
  litestar-htmx = callPackage ../development/python-modules/litestar-htmx { };
  litestar = callPackage ../development/python-modules/litestar { };
  littleutils = callPackage ../development/python-modules/littleutils { };
  livelossplot = callPackage ../development/python-modules/livelossplot { };