uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -0,0 +1,53 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, findutils
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, setuptools-scm
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "extension-helpers";
|
||||
version = "1.0.0";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "ca1bfac67c79cf4a7a0c09286ce2a24eec31bf17715818d0726318dd0e5050e6";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
patches = [ ./permissions.patch ];
|
||||
|
||||
checkInputs = [
|
||||
findutils
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
# avoid import mismatch errors, as conftest.py is copied to build dir
|
||||
pytestFlagsArray = [
|
||||
"extension_helpers"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# https://github.com/astropy/extension-helpers/issues/43
|
||||
"test_write_if_different"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"extension_helpers"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Utilities for building and installing packages in the Astropy ecosystem";
|
||||
homepage = "https://github.com/astropy/extension-helpers";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ rmcgibbo ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
diff --git a/extension_helpers/_setup_helpers.py b/extension_helpers/_setup_helpers.py
|
||||
index ec3e547..e2419f7 100644
|
||||
--- a/extension_helpers/_setup_helpers.py
|
||||
+++ b/extension_helpers/_setup_helpers.py
|
||||
@@ -79,8 +79,13 @@ def get_extensions(srcdir='.'):
|
||||
if len(ext_modules) > 0:
|
||||
main_package_dir = min(packages, key=len)
|
||||
src_path = os.path.join(os.path.dirname(__file__), 'src')
|
||||
- shutil.copy(os.path.join(src_path, 'compiler.c'),
|
||||
- os.path.join(srcdir, main_package_dir, '_compiler.c'))
|
||||
+ a = os.path.join(src_path, 'compiler.c')
|
||||
+ b = os.path.join(srcdir, main_package_dir, '_compiler.c')
|
||||
+ try:
|
||||
+ os.unlink(b)
|
||||
+ except OSError:
|
||||
+ pass
|
||||
+ shutil.copy(a, b)
|
||||
ext = Extension(main_package_dir + '.compiler_version',
|
||||
[os.path.join(main_package_dir, '_compiler.c')])
|
||||
ext_modules.append(ext)
|
||||
Loading…
Add table
Add a link
Reference in a new issue