Unverified Commit 2de3b786 authored by OTABI Tomoya's avatar OTABI Tomoya Committed by GitHub
Browse files

python312Packages.drf-yasg: refactor (#346826)

parents 86248c18 7943dadc
Loading
Loading
Loading
Loading
+30 −14
Original line number Diff line number Diff line
@@ -2,21 +2,25 @@
  lib,
  buildPythonPackage,
  fetchPypi,
  inflection,
  ruamel-yaml,
  setuptools,
  setuptools-scm,
  six,
  coreapi,
  django,
  djangorestframework,
  pytestCheckHook,
  pytest-django,
  inflection,
  packaging,
  pytz,
  pyyaml,
  uritemplate,
  datadiff,
  dj-database-url,
  pytest-django,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "drf-yasg";
  version = "1.21.7";
  format = "setuptools";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
@@ -28,23 +32,35 @@ buildPythonPackage rec {
    sed -i "/packaging/d" requirements/base.txt
  '';

  nativeBuildInputs = [ setuptools-scm ];
  build-system = [
    setuptools
    setuptools-scm
  ];

  propagatedBuildInputs = [
    six
    inflection
    ruamel-yaml
    coreapi
  dependencies = [
    django
    djangorestframework
    inflection
    packaging
    pytz
    pyyaml
    uritemplate
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-django
    datadiff
    dj-database-url
  ];

  # ImportError: No module named 'testproj.settings'
  env.DJANGO_SETTINGS_MODULE = "testproj.settings.local";

  preCheck = ''
    cd testproj
  '';

  # a lot of libraries are missing
  doCheck = false;

  pythonImportsCheck = [ "drf_yasg" ];