Merge pull request #66391 from doom3wasagoodgame/init-python-package-coreapi

Packages for the python coreapi client
This commit is contained in:
Lancelot SIX 2020-01-21 11:47:40 +01:00 committed by GitHub
commit e0fa73d692
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 157 additions and 0 deletions

View file

@ -0,0 +1,44 @@
{
stdenv,
fetchFromGitHub,
buildPythonPackage,
django,
coreschema,
itypes,
uritemplate,
requests,
pytest,
}:
buildPythonPackage rec {
pname = "coreapi";
version = "2.3.3";
src = fetchFromGitHub {
repo = "python-client";
owner = "core-api";
rev = version;
sha256 = "1c6chm3q3hyn8fmjv23qgc79ai1kr3xvrrkp4clbqkssn10k7mcw";
};
propagatedBuildInputs = [
django
coreschema
itypes
uritemplate
requests
];
checkInputs = [ pytest ];
checkPhase = ''
cd ./tests
pytest
'';
meta = with stdenv.lib; {
description = "Python client library for Core API";
homepage = https://github.com/core-api/python-client;
license = licenses.bsd3;
maintainers = with maintainers; [ ivegotasthma ];
};
}

View file

@ -0,0 +1,34 @@
{
stdenv,
fetchFromGitHub,
buildPythonPackage,
jinja2,
pytest,
}:
buildPythonPackage rec {
pname = "coreschema";
version = "0.0.4";
src = fetchFromGitHub {
repo = "python-coreschema";
owner = "core-api";
rev = version;
sha256 = "027pc753mkgbb3r1v1x7dsdaarq93drx0f79ppvw9pfkcjcq6wb1";
};
propagatedBuildInputs = [ jinja2 ];
checkInputs = [ pytest ];
checkPhase = ''
cd ./tests
pytest
'';
meta = with stdenv.lib; {
description = "Python client library for Core Schema";
homepage = https://github.com/ivegotasthma/python-coreschema;
license = licenses.bsd3;
maintainers = with maintainers; [ ivegotasthma ];
};
}

View file

@ -0,0 +1,40 @@
{
stdenv,
buildPythonPackage,
fetchPypi,
inflection,
ruamel_yaml,
setuptools_scm,
six,
coreapi,
djangorestframework,
}:
buildPythonPackage rec {
pname = "drf-yasg";
version = "1.16.1";
src = fetchPypi {
inherit pname version;
sha256 = "0ri5h5xsacm99c6gvb4ldwisbqgiv2vq8qbn7vrh6vplzlpyvzb8";
};
nativeBuildInputs = [
setuptools_scm
];
propagatedBuildInputs = [
six
inflection
ruamel_yaml
coreapi
djangorestframework
];
meta = with stdenv.lib; {
description = "Generation of Swagger/OpenAPI schemas for Django REST Framework";
homepage = https://github.com/axnsan12/drf-yasg;
maintainers = with maintainers; [ ivegotasthma ];
license = licenses.bsd3;
};
}

View file

@ -0,0 +1,31 @@
{
stdenv,
fetchFromGitHub,
buildPythonPackage,
pytest,
}:
buildPythonPackage rec {
pname = "itypes";
version = "1.1.0";
src = fetchFromGitHub {
repo = pname;
owner = "tomchristie";
rev = version;
sha256 = "0zkhn16wpslkxkq77dqw5rxa28nrchcb6nd3vgnxv91p4skyfm62";
};
checkInputs = [ pytest ];
checkPhase = ''
mv itypes.py itypes.py.hidden
pytest tests.py
'';
meta = with stdenv.lib; {
description = "Simple immutable types for python";
homepage = https://github.com/tomchristie/itypes;
license = licenses.bsd3;
maintainers = with maintainers; [ ivegotasthma ];
};
}

View file

@ -2115,6 +2115,10 @@ in {
cookies = callPackage ../development/python-modules/cookies { };
coreapi = callPackage ../development/python-modules/coreapi { };
coreschema = callPackage ../development/python-modules/coreschema { };
coveralls = callPackage ../development/python-modules/coveralls { };
coverage = callPackage ../development/python-modules/coverage { };
@ -2500,6 +2504,8 @@ in {
urllib3 = callPackage ../development/python-modules/urllib3 {};
drf-yasg = callPackage ../development/python-modules/drf-yasg { };
dropbox = callPackage ../development/python-modules/dropbox {};
drms = callPackage ../development/python-modules/drms { };
@ -2749,6 +2755,8 @@ in {
itsdangerous = callPackage ../development/python-modules/itsdangerous { };
itypes = callPackage ../development/python-modules/itypes { };
iniparse = callPackage ../development/python-modules/iniparse { };
intreehooks = callPackage ../development/python-modules/intreehooks { };