Merge pull request #140862 from SuperSandro2000/swift

This commit is contained in:
Sandro 2021-10-07 21:28:15 +02:00 committed by GitHub
commit 16d0a1310c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 176 additions and 31 deletions

View File

@ -0,0 +1,26 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook, zlib }:
stdenv.mkDerivation rec {
pname = "liberasurecode";
version = "1.6.2";
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "openstack";
repo = pname;
rev = version;
sha256 = "sha256-qV7DL/7zrwrYOaPj6iHnChGA6KHFwYKjeaMnrGrTPrQ=";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ zlib ];
meta = with lib; {
description = "Erasure Code API library written in C with pluggable Erasure Code backends";
homepage = "https://github.com/openstack/liberasurecode";
license = licenses.bsd2;
maintainers = teams.openstack.members;
};
}

View File

@ -1,4 +1,4 @@
{ pkgs
{ lib
, buildPythonPackage
, fetchPypi
, pythonAtLeast
@ -24,11 +24,11 @@ buildPythonPackage rec {
${python.interpreter} tests/test.py default
'';
doCheck = (!isPy38); # hmac functionality has changed
doCheck = !isPy38; # hmac functionality has changed
checkInputs = [ nose mock ];
propagatedBuildInputs = [ requests httpretty ];
meta = with pkgs.lib; {
meta = with lib; {
homepage = "https://github.com/boto/boto";
license = licenses.mit;
description = "Python interface to Amazon Web Services";

View File

@ -1,31 +1,26 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytest-runner
, pytest
, fetchFromGitHub
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pastedeploy";
version = "2.1.1";
pname = "PasteDeploy";
src = fetchPypi {
inherit pname version;
sha256 = "6dead6ab9823a85d585ef27f878bc647f787edb9ca8da0716aa9f1261b464817";
src = fetchFromGitHub {
owner = "Pylons";
repo = pname;
rev = version;
sha256 = "sha256-9/8aM/G/EdapCZJlx0ZPzNbmw2uYjA1zGbNWJAWoeCU=";
};
buildInputs = [ pytest-runner ];
checkInputs = [ pytest ];
# no tests in PyPI tarball
# should be included with versions > 2.0.1
doCheck = false;
checkInputs = [ pytestCheckHook ];
meta = with lib; {
description = "Load, configure, and compose WSGI applications and servers";
homepage = "http://pythonpaste.org/deploy/";
homepage = "https://github.com/Pylons/pastedeploy";
license = licenses.mit;
maintainers = teams.openstack.members;
};
}

View File

@ -4,7 +4,7 @@
, nose
, six
, paste
, PasteDeploy
, pastedeploy
, cheetah
}:
@ -18,7 +18,7 @@ buildPythonPackage rec {
};
buildInputs = [ nose ];
propagatedBuildInputs = [ six paste PasteDeploy cheetah ];
propagatedBuildInputs = [ six paste pastedeploy cheetah ];
doCheck = false;

View File

@ -1,5 +1,5 @@
{ buildPythonPackage, fetchPypi, fetchpatch
, plaster, PasteDeploy
, plaster, pastedeploy
, pytest, pytest-cov
}:
@ -13,7 +13,7 @@ buildPythonPackage rec {
};
patches = [
# Fix tests compatibility with PasteDeploy 2+
# Fix tests compatibility with pastedeploy 2+
# https://github.com/Pylons/plaster_pastedeploy/pull/17
(fetchpatch {
url = "https://github.com/Pylons/plaster_pastedeploy/commit/d77d81a57e917c67a20332beca8f418651172905.patch";
@ -25,6 +25,6 @@ buildPythonPackage rec {
py.test
'';
propagatedBuildInputs = [ plaster PasteDeploy ];
propagatedBuildInputs = [ plaster pastedeploy ];
checkInputs = [ pytest pytest-cov ];
}

View File

@ -0,0 +1,35 @@
{ lib, buildPythonPackage, fetchPypi, liberasurecode, six }:
buildPythonPackage rec {
pname = "pyeclib";
version = "1.6.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-gBHjHuia5/uZymkWZgyH4BCEZqmWK9SXowAQIJdOO7E=";
};
postPatch = ''
# patch dlopen call
substituteInPlace src/c/pyeclib_c/pyeclib_c.c \
--replace "liberasurecode.so" "${liberasurecode}/lib/liberasurecode.so"
'';
preBuild = ''
# required for the custom find_library function in setup.py
export LD_LIBRARY_PATH="${lib.makeLibraryPath [ liberasurecode ]}"
'';
buildInputs = [ liberasurecode ];
checkInputs = [ six ];
pythonImportsCheck = [ "pyeclib" ];
meta = with lib; {
description = "This library provides a simple Python interface for implementing erasure codes.";
homepage = "https://github.com/openstack/pyeclib";
license = licenses.bsd2;
maintainers = teams.openstack.members;
};
}

View File

@ -4,7 +4,7 @@
, webtest
, zope_component
, hupper
, PasteDeploy
, pastedeploy
, plaster
, plaster-pastedeploy
, repoze_lru
@ -27,7 +27,7 @@ buildPythonPackage rec {
checkInputs = [ webtest zope_component ];
propagatedBuildInputs = [ hupper PasteDeploy plaster plaster-pastedeploy repoze_lru translationstring venusian webob zope_deprecation zope_interface ];
propagatedBuildInputs = [ hupper pastedeploy plaster plaster-pastedeploy repoze_lru translationstring venusian webob zope_deprecation zope_interface ];
# Failing tests
# https://github.com/Pylons/pyramid/issues/1899

View File

@ -3,7 +3,7 @@
, fetchPypi
, pytest
, FormEncode
, PasteDeploy
, pastedeploy
, paste
, pydispatcher
}:
@ -18,7 +18,7 @@ buildPythonPackage rec {
};
checkInputs = [ pytest ];
propagatedBuildInputs = [ FormEncode PasteDeploy paste pydispatcher ];
propagatedBuildInputs = [ FormEncode pastedeploy paste pydispatcher ];
meta = with lib; {
description = "Object Relational Manager for providing an object interface to your database";

View File

@ -0,0 +1,82 @@
{ lib
, buildPythonPackage
, fetchPypi
, boto3
, cryptography
, eventlet
, greenlet
, iana-etc
, libredirect
, lxml
, mock
, netifaces
, pastedeploy
, pbr
, pyeclib
, requests
, setuptools
, six
, stestr
, swiftclient
, xattr
}:
buildPythonPackage rec {
pname = "swift";
version = "2.28.0";
src = fetchPypi {
inherit pname version;
sha256 = "79a216498a842226f71e9dfbbce4dba4a5718cda9b2be92b6e0aa21df977f70d";
};
postPatch = ''
# files requires boto which is incompatible with python 3.9
rm test/functional/s3api/{__init__.py,s3_test_client.py}
'';
nativeBuildInputs = [ pbr ];
propagatedBuildInputs = [
cryptography
eventlet
greenlet
lxml
netifaces
pastedeploy
pyeclib
requests
setuptools
six
xattr
];
checkInputs = [
boto3
mock
stestr
swiftclient
];
# a lot of tests currently fail while establishing a connection
doCheck = false;
checkPhase = ''
echo "nameserver 127.0.0.1" > resolv.conf
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf)
export LD_PRELOAD=${libredirect}/lib/libredirect.so
export SWIFT_TEST_CONFIG_FILE=test/sample.conf
stestr run
'';
pythonImportsCheck = [ "swift" ];
meta = with lib; {
description = "OpenStack Object Storage";
homepage = "https://github.com/openstack/swift";
license = licenses.asl20;
maintainers = teams.openstack.members;
};
}

View File

@ -10,7 +10,7 @@
, mock
, pyquery
, wsgiproxy2
, PasteDeploy
, pastedeploy
}:
buildPythonPackage rec {
@ -38,7 +38,7 @@ buildPythonPackage rec {
checkInputs = [
nose
mock
PasteDeploy
pastedeploy
wsgiproxy2
pyquery
];

View File

@ -15741,6 +15741,8 @@ with pkgs;
libesmtp = callPackage ../development/libraries/libesmtp { };
liberasurecode = callPackage ../applications/misc/liberasurecode { };
exiv2 = callPackage ../development/libraries/exiv2 { };
expat = callPackage ../development/libraries/expat { };

View File

@ -55,6 +55,7 @@ mapAliases ({
lammps-cython = throw "no longer builds and is unmaintained";
MechanicalSoup = mechanicalsoup; # added 2021-06-01
pam = python-pam; # added 2020-09-07.
PasteDeploy = pastedeploy;
privacyidea = throw "renamed to pkgs.privacyidea"; # added 2021-06-20
prometheus_client = prometheus-client; # added 2021-06-10
prompt_toolkit = prompt-toolkit;

View File

@ -5377,7 +5377,7 @@ in {
paste = callPackage ../development/python-modules/paste { };
PasteDeploy = callPackage ../development/python-modules/pastedeploy { };
pastedeploy = callPackage ../development/python-modules/pastedeploy { };
pastel = callPackage ../development/python-modules/pastel { };
@ -6202,6 +6202,8 @@ in {
pyechonest = callPackage ../development/python-modules/pyechonest { };
pyeclib = callPackage ../development/python-modules/pyeclib { };
pyeconet = callPackage ../development/python-modules/pyeconet { };
pyedimax = callPackage ../development/python-modules/pyedimax { };
@ -8833,6 +8835,8 @@ in {
swagger-ui-bundle = callPackage ../development/python-modules/swagger-ui-bundle { };
swift = callPackage ../development/python-modules/swift { };
swisshydrodata = callPackage ../development/python-modules/swisshydrodata { };
swspotify = callPackage ../development/python-modules/swspotify { };