python3Packages.related: unbreak and pep517 build
Removes dependency on future package.
This commit is contained in:
@@ -3,17 +3,17 @@
|
||||
attrs,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
future,
|
||||
pytestCheckHook,
|
||||
python-dateutil,
|
||||
pythonOlder,
|
||||
pyyaml,
|
||||
setuptools,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "related";
|
||||
version = "0.7.3";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
@@ -22,22 +22,40 @@ buildPythonPackage rec {
|
||||
hash = "sha256-IqmbqAW6PubN9GBXrMs5Je4u1XkgLl9camSGNrlrFJA=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
postPatch = ''
|
||||
# Remove outdated setup.cfg
|
||||
rm setup.cfg
|
||||
substituteInPlace setup.py \
|
||||
--replace-fail "'pytest-runner'," ""
|
||||
|
||||
# remove dependency on future
|
||||
substituteInPlace \
|
||||
src/related/dispatchers.py \
|
||||
src/related/fields.py \
|
||||
tests/ex03_company/test_company.py \
|
||||
--replace-fail \
|
||||
"from future.moves.urllib.parse import ParseResult" \
|
||||
"from urllib.parse import ParseResult"
|
||||
|
||||
substituteInPlace \
|
||||
src/related/converters.py \
|
||||
--replace-fail \
|
||||
"from future.moves.urllib.parse import urlparse" \
|
||||
"from urllib.parse import urlparse"
|
||||
'';
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
pythonRemoveDeps = [ "future" ];
|
||||
|
||||
dependencies = [
|
||||
attrs
|
||||
future
|
||||
python-dateutil
|
||||
pyyaml
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
postPatch = ''
|
||||
# Remove outdated setup.cfg
|
||||
rm setup.cfg
|
||||
substituteInPlace setup.py \
|
||||
--replace "'pytest-runner'," ""
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
# Source tarball doesn't contains all needed files
|
||||
"test_compose_from_yml"
|
||||
|
||||
Reference in New Issue
Block a user