Commit Graph

39 Commits

Author SHA1 Message Date
Hood Chatham dc33b25a6f
MAINT Tidy up numpy patches (#2701) 2022-06-12 15:19:09 -07:00
Hood Chatham b9c90fe813
Remove another numpy patch (#2699) 2022-06-12 12:18:45 -07:00
Hood Chatham a47e9085b8
Drop Numpy use local blas lapack patch (#2696) 2022-06-12 13:07:00 +02:00
Hood Chatham d3544a06a8
Drop numpy init alloc cache patch (#2698) 2022-06-12 11:44:34 +09:00
Hood Chatham 105e1bffa3
Drop numpy execinfo patch (#2691) 2022-06-12 11:43:55 +09:00
Hood Chatham 1fc1d6ce8a
Remove numpy disable maybe uninitialized patch (#2694) 2022-06-12 00:32:11 +02:00
Hood Chatham 91c56911f6
Drop numpy fix-longdouble patch (#2693) 2022-06-12 00:31:34 +02:00
Hood Chatham ed5953ceaf
Remove fix-invalid-asm-instruction patch (#2697) 2022-06-12 00:29:36 +02:00
Hood Chatham e732cb9dd7
meta.yaml keys for cross-build environment (#2536)
This moves unisolation into a package key. `cross-build-env: true` means the package
is part of the cross build environment and should be unisolated. `cross-build-files`
gives a list of files that should be copied from the built copy of the package into the host
copy of the package.

This will allow us to construct a cross build environment automatically as part of building
packages. If we have these files and the Python include directory, this is sufficient for 
cross-building binary packages.
2022-05-11 20:31:16 -07:00
Hood Chatham 66fe7ede18
Update scipy to v1.8.0 (#2361) 2022-04-08 18:43:30 -07:00
Hood Chatham a54b1b4bd8
Update numpy to v1.22.3 (#2337) 2022-04-01 22:00:47 +02:00
Hood Chatham eabfa8101e
Use pypa/build (#2272)
This resolves #2189.

> build isolation would be a bit difficult to use in our case, as for instance
> when building scipy we need the patched numpy on the host and not the numpy
> version specified in pyproject.toml (which would be unpatched)

This is indeed the case, certain packages cannot be isolated. My strategy is to
make a list of packages that shouldn't be isolated and add symlinks from the
isolated build environment into the `.artifacts` directory to "unisolate" them.
Then we remove the unisolated package requirements from the list of packages to
install, in case pesky constraints aren't satisfied. In particular, packages
that expect to be used with `pypa/build` often feel free to put very specific
constraints on their build dependencies (often asking them to be == to a
particular version). Specific version constraints is good for build
reproducibility and with build isolation doesn't cost anything. So we just
ignore the constraints. Hopefully nothing goes wrong.

In particular, any package that does stuff both at build time and at runtime and
requires synchronization between the build time and run time environments needs
the unisolation. This includes cffi with `_cffi_backend.so`, and of course numpy
and scipy. pycparser needs to be unisolated because it is a dependency of cffi.

Currently I have also unisolated pythran and cython, though these are build time
only tools and do not really need to be unisolated. Cython I unisolated
specifically because numcodecs needs it but it isn't in the numcodecs build
dependencies. Pythran I unisolated because of a problem with the scipy build
which I don't fully understand (some problem with long double feature
detection).
2022-03-21 22:05:30 -07:00
Hood Chatham f7b0f8c5cb
No replay (#2256)
Our package build process currently has a significant flaw: we first run setup.py, recording all compilation commands, then we rewrite these compilation commands to invoke emcc and replay them, and then we pray that the cross compiled executables ended up in the right place to go into the wheel. This is not a good strategy because the build script is allowed to implement arbitrary logic, and if it moves, renames, etc any of the output files then we lose track of them. This has repeatedly caused difficulty for us.

However, we also make no particularly significant use of the two pass approach. We can just do the simpler thing: capture the compiler commands as they occur, modify them as needed, and then run the fixed command.

I also added a patch to fix the numpy feature detection for wasm so that we don't have to include _npyconfig.h and config.h, numpy can generate them in the way it would for a native build. I opened a numpy PR that would fix the detection for us upstream:
numpy/numpy#21154

This clears the way for us to switch to using pypa/build (as @henryiii has suggested) by removing our dependence on specific setuptools behavior.

This is on top of #2238.
2022-03-13 11:39:06 -07:00
Hood Chatham c01ab547f0
Better package cross compilation (#2238)
Co-authored-by: Gyeongjae Choi <def6488@gmail.com>
2022-03-09 20:34:25 -08:00
Hood Chatham dd70b565f5
Remove numpy decorators patch (#2259) 2022-03-07 21:44:35 -08:00
Hood Chatham 9feb50bb48
Remove numpy patches work around for chrome 89 bug (#2171) 2022-03-04 16:09:51 -08:00
Hood Chatham 6bdd96c964
Fix numpy fatal error: incorrect random_float_fill return type (#2137)
Upstream PR numpy/numpy#20911
2022-01-27 00:13:32 -08:00
Hood Chatham 8323987b39
Use wheels instead of file_packager (#2027) 2022-01-23 17:47:04 -08:00
Hood Chatham a206386564
Fix numpy comparator functions (#2110) 2022-01-16 15:52:34 -08:00
Hood Chatham 19261f394c
Remove function pointer cast emulation (#2019) 2021-12-09 10:31:21 -08:00
LeoPsidom 4662024b56
Upgrade numpy to 1.21.4 (#1934) 2021-11-14 15:03:56 +01:00
Hood Chatham 70e9e19dde
Patches from joemarshall/fpcast (#1708)
Co-authored-by: joemarshall <joe.marshall@nottingham.ac.uk>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2021-11-13 12:31:11 +01:00
Bart Broere 9563057ba9
Add specification for compiling logbook (#1920) 2021-11-04 08:03:22 -07:00
Hood Chatham 653891b045
ENH Add Ctypes support (#1656) 2021-06-26 10:34:31 +02:00
Hood Chatham b4f4bcffdc
Update to Python 3.9.5 (#1637)
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2021-06-19 15:49:25 -07:00
Hood Chatham da019813a5
Package updates from Python 3.9 branch (#1639) 2021-06-16 23:57:56 +02:00
Hood Chatham 1485732211
Fix memory access out of bounds in numpy + chrome 89 (#1474) 2021-04-17 23:17:19 +02:00
Hood Chatham 8f3f6bda20
Fix numpy in chromium v89 (#1449) 2021-04-12 09:10:27 +02:00
Roman Yurchak d175636851
Update to numpy 1.17.5 (#887) 2021-03-23 22:49:38 +01:00
joemarshall 1bd8380c01
Emscripten 2.0.12 Upstream backend (#1102)
Co-authored-by: Dexter Chua <dalcde@users.noreply.github.com>
Co-authored-by: Roman Yurchak <rth.yurchak@gmail.com>
2021-02-06 08:58:12 +01:00
joemarshall 6cc7f9c46d
Make f2c functions return int
This patch makes everything in numpy, scipy and CLAPACK that began life as a fortran subroutine return int, whereas before they were a smattering of void plus lots of int, with a bunch of conflicts where the same function was defined as int in some and void in others. This matters because on upstream emscripten, these packages will not build due to linker conflicts, as the wasm linker can't link a function returning int to a function returning void.

Annoyingly, this has to be int return not void, because whereas a normal fortran subroutine doesn't return anything, there's an obscure feature of fortran 77 called alternative returns which allows subroutines to say they want to return by jumping to some other place in the code. f2c handles this with integer return values.
2021-01-09 17:44:41 +08:00
Roman Yurchak 3e4cc07b6d
Update to numpy 1.15.4 and pandas 1.0.5 (#697) 2020-06-27 17:14:39 +02:00
Roman Yurchak d9b590f518 Define build/skip_host meta.yaml option 2018-10-29 12:52:13 +01:00
Michael Droettboom 01b27b37b9 Update to Numpy 1.15.1 2018-09-10 12:55:37 -04:00
Michael Droettboom 56562257ef Fix #71: Upgrade to Python 3.7 2018-09-06 10:56:33 -04:00
Michael Droettboom b66d698414 Install to a directory, and use that, instead of just the build/lib... 2018-08-23 11:59:33 -04:00
Michael Droettboom 14f5e9b39d Fix #115: Forcibly use the local copy of blas and lapack 2018-08-20 22:44:26 -04:00
Roman Yurchak 076e9bb083 Address review comments 2018-08-07 08:24:22 +03:00
Michael Droettboom 17e1562ded MVP of a proper packaging system 2018-06-20 14:54:47 -04:00