| 1 |
#!/usr/bin/make -f |
| 2 |
export PYBUILD_NAME=ml_dtypes |
| 3 |
export DEB_CXXFLAGS_MAINT_APPEND = -I$(CURDIR)/debian/eigen |
| 4 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 5 |
|
| 6 |
%: |
| 7 |
dh $@ --with python3,numpy3 --buildsystem=pybuild --test-pytest |
| 8 |
|
| 9 |
override_dh_auto_test: |
| 10 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 11 |
PYTHONPATH=".pybuild/cpython3_$(shell py3versions -dv)_ml_dtypes/build/" pytest -v |
| 12 |
endif |
| 13 |
|
| 14 |
override_dh_install: |
| 15 |
install -d debian/ml-dtypes-dev/usr/include/ml_dtypes |
| 16 |
cp -rv debian/eigen/Eigen debian/ml-dtypes-dev/usr/include/ml_dtypes |
| 17 |
cp ml_dtypes/include/* debian/ml-dtypes-dev/usr/include/ml_dtypes |
| 18 |
sed -i 's|#include "Eigen/Core"|#include <ml_dtypes/Eigen/Core>|' debian/ml-dtypes-dev/usr/include/ml_dtypes/*.h |
| 19 |
sed -i 's|#include "include/float8.h"|#include <ml_dtypes/float8.h>|' debian/ml-dtypes-dev/usr/include/ml_dtypes/*.h |
| 20 |
dh_install |