| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
include /usr/share/dpkg/pkg-info.mk |
| 7 |
|
| 8 |
PYTHON_GRIFFE_PACKAGES=\ |
| 9 |
griffecli \ |
| 10 |
griffelib \ |
| 11 |
|
| 12 |
export PYBUILD_TEST_ARGS=\ |
| 13 |
--ignore tests/test_api.py \ |
| 14 |
-k 'not test_load_git \ |
| 15 |
and not test_load_git_errors \ |
| 16 |
' |
| 17 |
|
| 18 |
export PDM_BUILD_SCM_VERSION = $(DEB_VERSION_UPSTREAM) |
| 19 |
export TMP_DIST-PACKAGES_FOLDER=$(CURDIR)/.pybuild/dist-packages/build |
| 20 |
|
| 21 |
%: |
| 22 |
dh $@ --buildsystem=pybuild |
| 23 |
|
| 24 |
override_dh_clean: |
| 25 |
dh_clean |
| 26 |
rm -rf .pdm-build |
| 27 |
|
| 28 |
override_dh_auto_build: |
| 29 |
for PYTHON_GRIFFE_PACKAGE in $(PYTHON_GRIFFE_PACKAGES); do \ |
| 30 |
echo "\n########\n# Building package $${PYTHON_GRIFFE_PACKAGE}\n########" ;\ |
| 31 |
PYBUILD_NAME=$${PYTHON_GRIFFE_PACKAGE} ;\ |
| 32 |
dh_auto_build --buildsystem=pybuild --sourcedirectory packages/$${PYTHON_GRIFFE_PACKAGE} -- --name=$${PYTHON_GRIFFE_PACKAGE} ;\ |
| 33 |
done |
| 34 |
|
| 35 |
|
| 36 |
mkdir .pybuild/dist-packages && \ |
| 37 |
for FOLDER in `find .pybuild/cpython3_3.*griffe*/ -maxdepth 1 -type d -name build`; do \ |
| 38 |
echo "Copy $${FOLDER} -> .pybuild/dist-packages" ;\ |
| 39 |
cp -a $${FOLDER} .pybuild/dist-packages ;\ |
| 40 |
done |
| 41 |
|
| 42 |
override_dh_auto_install: |
| 43 |
for PYTHON_GRIFFE_PACKAGE in $(PYTHON_GRIFFE_PACKAGES); do \ |
| 44 |
echo "\n########\n# Installing package $${PYTHON_GRIFFE_PACKAGE}\n########" ;\ |
| 45 |
PYBUILD_NAME=$${PYTHON_GRIFFE_PACKAGE} ;\ |
| 46 |
dh_auto_install --buildsystem=pybuild --sourcedirectory packages/$${PYTHON_GRIFFE_PACKAGE} -- --name=$${PYTHON_GRIFFE_PACKAGE} ;\ |
| 47 |
done |
| 48 |
|
| 49 |
override_dh_auto_test: |
| 50 |
for PYTHON_GRIFFE_PACKAGE in $(PYTHON_GRIFFE_PACKAGES); do \ |
| 51 |
cd $(CURDIR)/packages/$${PYTHON_GRIFFE_PACKAGE} ;\ |
| 52 |
PYTHONPATH=$(TMP_DIST-PACKAGES_FOLDER) python3 -m pytest $(PYBUILD_TEST_ARGS) ;\ |
| 53 |
done |