apache-airflow: 1.10.3 -> 1.10.5, enable python
Includes misc fixes suggested during the PR process.
This commit is contained in:
parent
effe7f8a09
commit
7af3a955c9
@ -3,8 +3,11 @@
|
|||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
, alembic
|
, alembic
|
||||||
|
, cached-property
|
||||||
, configparser
|
, configparser
|
||||||
|
, colorlog
|
||||||
, croniter
|
, croniter
|
||||||
, dill
|
, dill
|
||||||
, flask
|
, flask
|
||||||
@ -24,6 +27,7 @@
|
|||||||
, jinja2
|
, jinja2
|
||||||
, ldap3
|
, ldap3
|
||||||
, lxml
|
, lxml
|
||||||
|
, lazy-object-proxy
|
||||||
, markdown
|
, markdown
|
||||||
, pandas
|
, pandas
|
||||||
, pendulum
|
, pendulum
|
||||||
@ -37,6 +41,7 @@
|
|||||||
, sqlalchemy
|
, sqlalchemy
|
||||||
, tabulate
|
, tabulate
|
||||||
, tenacity
|
, tenacity
|
||||||
|
, termcolor
|
||||||
, text-unidecode
|
, text-unidecode
|
||||||
, thrift
|
, thrift
|
||||||
, tzlocal
|
, tzlocal
|
||||||
@ -46,58 +51,47 @@
|
|||||||
, enum34
|
, enum34
|
||||||
, typing
|
, typing
|
||||||
, nose
|
, nose
|
||||||
, isPy27
|
, python
|
||||||
|
, isPy3k
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let # import error "from pendulum import Pendulum" due to 2.x
|
|
||||||
pendulum1 = pendulum.overrideAttrs (super: rec {
|
|
||||||
name = "pendulum-1.5.1";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
pname = super.pname;
|
|
||||||
version = "1.5.1";
|
|
||||||
sha256 = "738878168eb26e5446da5d1f7b3312ae993a542061be8882099c00ef4866b1a2";
|
|
||||||
};
|
|
||||||
|
|
||||||
propagatedBuildInputs = super.propagatedBuildInputs ++ [ tzlocal ];
|
|
||||||
});
|
|
||||||
|
|
||||||
# 2.x has fstrings
|
|
||||||
flask-appbuilder1 = flask-appbuilder.overrideAttrs (super: rec {
|
|
||||||
name = "flask-appbuilder-1.13.0";
|
|
||||||
|
|
||||||
src = fetchPypi {
|
|
||||||
pname = "Flask-AppBuilder";
|
|
||||||
version = "1.13.0";
|
|
||||||
sha256 = "1bjcnklpycw62a02kilkdc48vk67sykvlp8l1bvqszkjxvvfhgvg";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
substituteInPlace setup.py \
|
|
||||||
--replace "prison==0.1.0" "prison"
|
|
||||||
'' + super.buildPhase;
|
|
||||||
});
|
|
||||||
in
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "apache-airflow";
|
pname = "apache-airflow";
|
||||||
version = "1.10.3";
|
version = "1.10.5";
|
||||||
|
disabled = (!isPy3k);
|
||||||
|
|
||||||
|
src = fetchFromGitHub rec {
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "apache";
|
owner = "apache";
|
||||||
repo = "airflow";
|
repo = "airflow";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "040d1wbkcapkgb220yzk2dicnghhynj24m2xlbmqg6j54f007j94";
|
sha256 = "14fmhfwx977c9jdb2kgm93i6acx43l45ggj30rb37r68pzpb6l6h";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Not yet accepted: https://github.com/apache/airflow/pull/6562
|
||||||
|
(fetchpatch {
|
||||||
|
name = "avoid-warning-from-abc.collections";
|
||||||
|
url = https://patch-diff.githubusercontent.com/raw/apache/airflow/pull/6562.patch;
|
||||||
|
sha256 = "0swpay1qlb7f9kgc56631s1qd9k82w4nw2ggvkm7jvxwf056k61z";
|
||||||
|
})
|
||||||
|
# Not yet accepted: https://github.com/apache/airflow/pull/6561
|
||||||
|
(fetchpatch {
|
||||||
|
name = "pendulum2-compatibility";
|
||||||
|
url = https://patch-diff.githubusercontent.com/raw/apache/airflow/pull/6561.patch;
|
||||||
|
sha256 = "17hw8qyd4zxvib9zwpbn32p99vmrdz294r31gnsbkkcl2y6h9knk";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
alembic
|
alembic
|
||||||
|
cached-property
|
||||||
|
colorlog
|
||||||
configparser
|
configparser
|
||||||
croniter
|
croniter
|
||||||
dill
|
dill
|
||||||
flask
|
flask
|
||||||
flask-appbuilder1
|
|
||||||
flask-admin
|
flask-admin
|
||||||
|
flask-appbuilder
|
||||||
flask-bcrypt
|
flask-bcrypt
|
||||||
flask-caching
|
flask-caching
|
||||||
flask_login
|
flask_login
|
||||||
@ -112,9 +106,10 @@ buildPythonPackage rec {
|
|||||||
jinja2
|
jinja2
|
||||||
ldap3
|
ldap3
|
||||||
lxml
|
lxml
|
||||||
|
lazy-object-proxy
|
||||||
markdown
|
markdown
|
||||||
pandas
|
pandas
|
||||||
pendulum1
|
pendulum
|
||||||
psutil
|
psutil
|
||||||
pygments
|
pygments
|
||||||
python-daemon
|
python-daemon
|
||||||
@ -124,13 +119,14 @@ buildPythonPackage rec {
|
|||||||
sqlalchemy
|
sqlalchemy
|
||||||
tabulate
|
tabulate
|
||||||
tenacity
|
tenacity
|
||||||
|
termcolor
|
||||||
text-unidecode
|
text-unidecode
|
||||||
thrift
|
thrift
|
||||||
tzlocal
|
tzlocal
|
||||||
unicodecsv
|
unicodecsv
|
||||||
werkzeug
|
werkzeug
|
||||||
zope_deprecation
|
zope_deprecation
|
||||||
] ++ lib.optionals isPy27 [ enum34 typing ];
|
];
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
snakebite
|
snakebite
|
||||||
@ -138,10 +134,14 @@ buildPythonPackage rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
||||||
substituteInPlace setup.py \
|
substituteInPlace setup.py \
|
||||||
|
--replace "flask>=1.1.0, <2.0" "flask" \
|
||||||
--replace "flask-caching>=1.3.3, <1.4.0" "flask-caching" \
|
--replace "flask-caching>=1.3.3, <1.4.0" "flask-caching" \
|
||||||
--replace "flask-appbuilder==1.12.3" "flask-appbuilder" \
|
--replace "flask-appbuilder>=1.12.5, <2.0.0" "flask-appbuilder" \
|
||||||
--replace "pendulum==1.4.4" "pendulum" \
|
--replace "pendulum==1.4.4" "pendulum" \
|
||||||
|
--replace "cached_property~=1.5" "cached_property" \
|
||||||
|
--replace "dill>=0.2.2, <0.3" "dill" \
|
||||||
--replace "configparser>=3.5.0, <3.6.0" "configparser" \
|
--replace "configparser>=3.5.0, <3.6.0" "configparser" \
|
||||||
--replace "jinja2>=2.7.3, <=2.10.0" "jinja2" \
|
--replace "jinja2>=2.7.3, <=2.10.0" "jinja2" \
|
||||||
--replace "funcsigs==1.0.0" "funcsigs" \
|
--replace "funcsigs==1.0.0" "funcsigs" \
|
||||||
@ -151,7 +151,14 @@ buildPythonPackage rec {
|
|||||||
--replace "markdown>=2.5.2, <3.0" "markdown" \
|
--replace "markdown>=2.5.2, <3.0" "markdown" \
|
||||||
--replace "future>=0.16.0, <0.17" "future" \
|
--replace "future>=0.16.0, <0.17" "future" \
|
||||||
--replace "tenacity==4.12.0" "tenacity" \
|
--replace "tenacity==4.12.0" "tenacity" \
|
||||||
|
--replace "text-unidecode==1.2" "text-unidecode" \
|
||||||
|
--replace "tzlocal>=1.4,<2.0.0" "tzlocal" \
|
||||||
|
--replace "sqlalchemy~=1.3" "sqlalchemy" \
|
||||||
--replace "werkzeug>=0.14.1, <0.15.0" "werkzeug"
|
--replace "werkzeug>=0.14.1, <0.15.0" "werkzeug"
|
||||||
|
|
||||||
|
# dumb-init is only needed for CI and Docker, not relevant for NixOS.
|
||||||
|
substituteInPlace setup.py \
|
||||||
|
--replace "'dumb-init>=1.2.2'," ""
|
||||||
|
|
||||||
substituteInPlace tests/core.py \
|
substituteInPlace tests/core.py \
|
||||||
--replace "/bin/bash" "${stdenv.shell}"
|
--replace "/bin/bash" "${stdenv.shell}"
|
||||||
@ -176,6 +183,6 @@ buildPythonPackage rec {
|
|||||||
description = "Programmatically author, schedule and monitor data pipelines";
|
description = "Programmatically author, schedule and monitor data pipelines";
|
||||||
homepage = http://airflow.apache.org/;
|
homepage = http://airflow.apache.org/;
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = [ maintainers.costrouc ];
|
maintainers = [ maintainers.costrouc maintainers.ingenieroariel ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -4,18 +4,18 @@
|
|||||||
, pyyaml
|
, pyyaml
|
||||||
, prance
|
, prance
|
||||||
, marshmallow
|
, marshmallow
|
||||||
, pytest
|
, pytestCheckHook
|
||||||
, mock
|
, mock
|
||||||
, openapi-spec-validator
|
, openapi-spec-validator
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "apispec";
|
pname = "apispec";
|
||||||
version = "2.0.2";
|
version = "3.1.0";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "11d1aaf620a80f67ded7688fcaf14fa4fd975d566876b5db69b067ffbfe4d1d9";
|
sha256 = "0rr32z9hbf8w4w1fs5gj2v0ixcq2vq7a3wssrlxagi5ii7ygap7y";
|
||||||
};
|
};
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
@ -23,14 +23,10 @@ buildPythonPackage rec {
|
|||||||
prance
|
prance
|
||||||
openapi-spec-validator
|
openapi-spec-validator
|
||||||
marshmallow
|
marshmallow
|
||||||
pytest
|
|
||||||
mock
|
mock
|
||||||
|
pytestCheckHook
|
||||||
];
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
|
||||||
pytest
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification";
|
description = "A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification";
|
||||||
homepage = https://github.com/marshmallow-code/apispec;
|
homepage = https://github.com/marshmallow-code/apispec;
|
||||||
|
@ -53,12 +53,13 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
# disable tests that require mongodb, postresql
|
# disable tests that require mongodb, postresql
|
||||||
rm flask_admin/tests/mongoengine/test_basic.py
|
nosetests \
|
||||||
rm flask_admin/tests/pymongo/__init__.py
|
-e "mongoengine" \
|
||||||
rm flask_admin/tests/test_form_upload.py
|
-e "pymongo" \
|
||||||
rm flask_admin/tests/sqla/test_postgres.py
|
-e "test_form_upload" \
|
||||||
rm flask_admin/tests/geoa/test_basic.py
|
-e "test_postgres" \
|
||||||
nosetests flask_admin/tests
|
-e "geoa" \
|
||||||
|
flask_admin/tests
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -62,16 +62,12 @@ buildPythonPackage rec {
|
|||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace setup.py \
|
substituteInPlace setup.py \
|
||||||
--replace "jsonschema>=3.0.1<4" "jsonschema" \
|
--replace "jsonschema>=3.0.1<4" "jsonschema" \
|
||||||
|
--replace "marshmallow>=2.18.0,<2.20" "marshmallow" \
|
||||||
|
--replace "PyJWT>=1.7.1" "PyJWT" \
|
||||||
--replace "Flask-SQLAlchemy>=2.4,<3" "Flask-SQLAlchemy" \
|
--replace "Flask-SQLAlchemy>=2.4,<3" "Flask-SQLAlchemy" \
|
||||||
--replace "Flask-JWT-Extended>=3.18,<4" "Flask-JWT-Extended"
|
--replace "Flask-JWT-Extended>=3.18,<4" "Flask-JWT-Extended"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
|
||||||
# remove mockldap requirement
|
|
||||||
rm flask_appbuilder/tests/_test_ldapsearch.py
|
|
||||||
nosetests flask_appbuilder.api flask_appbuilder.tests.test_api
|
|
||||||
'';
|
|
||||||
|
|
||||||
# majority of tests require network access or mongo
|
# majority of tests require network access or mongo
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
@ -30,6 +30,9 @@ buildPythonPackage rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
|
# Disabled 3 tests failing due to string representations of dates:
|
||||||
|
# Like "12. April 2010 um 15:46:00 MESZ" != 12. "April 2010 15:46:00 MESZ"
|
||||||
|
|
||||||
pytest tests/tests.py -k "not test_init_app \
|
pytest tests/tests.py -k "not test_init_app \
|
||||||
and not test_custom_locale_selector \
|
and not test_custom_locale_selector \
|
||||||
and not test_basics"
|
and not test_basics"
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
, fetchPypi
|
, fetchPypi
|
||||||
, flask
|
, flask
|
||||||
, python3-openid
|
, python3-openid
|
||||||
, python-openid
|
, isPy3k
|
||||||
, isPy27
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "flask-openid";
|
pname = "flask-openid";
|
||||||
version = "1.2.5";
|
version = "1.2.5";
|
||||||
|
disable = !isPy3k;
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
pname = "Flask-OpenID";
|
pname = "Flask-OpenID";
|
||||||
@ -19,7 +19,8 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
flask
|
flask
|
||||||
] ++ (if isPy27 then [ python-openid ] else [ python3-openid ]);
|
python3-openid
|
||||||
|
];
|
||||||
|
|
||||||
# no tests for repo...
|
# no tests for repo...
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchPypi
|
||||||
|
, fetchpatch
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
@ -12,10 +13,15 @@ buildPythonPackage rec {
|
|||||||
sha256 = "09898b6d427c08754e2a97c709cf2dfd7e28bd10c5683a538914975eab778d39";
|
sha256 = "09898b6d427c08754e2a97c709cf2dfd7e28bd10c5683a538914975eab778d39";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
patches = [
|
||||||
substituteInPlace json_merge_patch/tests.py \
|
# This prevented tests from running (was using a relative import)
|
||||||
--replace "import lib as merge" "import json_merge_patch.lib as merge"
|
# https://github.com/OpenDataServices/json-merge-patch/pull/1
|
||||||
'';
|
(fetchpatch {
|
||||||
|
name = "fully-qualified-json-merge-patch-import-on-tests";
|
||||||
|
url = https://patch-diff.githubusercontent.com/raw/OpenDataServices/json-merge-patch/pull/1.patch;
|
||||||
|
sha256 = "1k6xsrxsmz03nwcqsf4gf0zsfnl2r20n83npic8z6bqlpl4lidl4";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "JSON Merge Patch library";
|
description = "JSON Merge Patch library";
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, marshmallow
|
, marshmallow
|
||||||
, pytest
|
, pytestCheckHook
|
||||||
, isPy27
|
, isPy27
|
||||||
, enum34
|
, enum34
|
||||||
, pytest-flake8
|
, pytest-flake8
|
||||||
@ -10,13 +10,13 @@
|
|||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "marshmallow-enum";
|
pname = "marshmallow-enum";
|
||||||
version = "1.4.1";
|
version = "1.5.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "justanr";
|
owner = "justanr";
|
||||||
repo = "marshmallow_enum";
|
repo = "marshmallow_enum";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0ll65y8p0np6ayy8h8g5psf9xm7s0nclarxsh21fdsm72zscx356";
|
sha256 = "1ihrcmyfjabivg6hc44i59hnw5ijlg1byv3zs1rqxfynp8xr7398";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
@ -24,13 +24,14 @@ buildPythonPackage rec {
|
|||||||
] ++ lib.optionals isPy27 [ enum34 ];
|
] ++ lib.optionals isPy27 [ enum34 ];
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
pytest
|
pytestCheckHook
|
||||||
pytest-flake8
|
pytest-flake8
|
||||||
];
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
disabledTests = [
|
||||||
pytest tests
|
"test_custom_error_in_deserialize_by_name"
|
||||||
'';
|
"test_custom_error_in_deserialize_by_value"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Enum field for Marshmallow";
|
description = "Enum field for Marshmallow";
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
{ lib
|
|
||||||
, buildPythonPackage
|
|
||||||
, fetchFromGitHub
|
|
||||||
, isPy27
|
|
||||||
, nose
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "python-openid";
|
|
||||||
version = "2.2.5";
|
|
||||||
disabled = !isPy27;
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "openid";
|
|
||||||
repo = pname;
|
|
||||||
rev = version;
|
|
||||||
sha256 = "198800ka2xyjz4yi2zm23l2a0knmqzxb4wj1nhqps70jz8mwg5mz";
|
|
||||||
};
|
|
||||||
|
|
||||||
checkInputs = [
|
|
||||||
nose
|
|
||||||
];
|
|
||||||
|
|
||||||
checkPhase = ''
|
|
||||||
nosetests
|
|
||||||
'';
|
|
||||||
|
|
||||||
# most tests require network access
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "OpenID support for servers and consumers";
|
|
||||||
homepage = https://github.com/openid/python-openid;
|
|
||||||
license = licenses.asl20;
|
|
||||||
maintainers = with maintainers; [ costrouc ];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -1151,8 +1151,6 @@ in {
|
|||||||
|
|
||||||
python3-openid = callPackage ../development/python-modules/python3-openid { };
|
python3-openid = callPackage ../development/python-modules/python3-openid { };
|
||||||
|
|
||||||
python-openid = callPackage ../development/python-modules/python-openid { };
|
|
||||||
|
|
||||||
python-packer = callPackage ../development/python-modules/python-packer { };
|
python-packer = callPackage ../development/python-modules/python-packer { };
|
||||||
|
|
||||||
python-periphery = callPackage ../development/python-modules/python-periphery { };
|
python-periphery = callPackage ../development/python-modules/python-periphery { };
|
||||||
@ -3245,8 +3243,6 @@ in {
|
|||||||
|
|
||||||
flask-mongoengine = callPackage ../development/python-modules/flask-mongoengine { };
|
flask-mongoengine = callPackage ../development/python-modules/flask-mongoengine { };
|
||||||
|
|
||||||
flask_oauthlib = callPackage ../development/python-modules/flask-oauthlib { };
|
|
||||||
|
|
||||||
flask-openid = callPackage ../development/python-modules/flask-openid { };
|
flask-openid = callPackage ../development/python-modules/flask-openid { };
|
||||||
|
|
||||||
flask-paginate = callPackage ../development/python-modules/flask-paginate { };
|
flask-paginate = callPackage ../development/python-modules/flask-paginate { };
|
||||||
|
Loading…
Reference in New Issue
Block a user