File: rules

package info (click to toggle)
cbor2 5.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 684 kB
  • sloc: ansic: 5,667; python: 3,995; makefile: 19; sh: 8
file content (42 lines) | stat: -rwxr-xr-x 1,918 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export PYBUILD_NAME=cbor2

# cbor2 version 5.6.3 does not build properly the C extension:
##########################################################################
# source/decoder.c:1346:41: error: ‘_CBOR2_date_ordinal_offset’ undeclared (first use in this function)
# 1346 |             ordinal = PyNumber_Add(num, _CBOR2_date_ordinal_offset);
#      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
# source/decoder.c:1346:41: note: each undeclared identifier is reported only once for each function it appears in
# source/decoder.c:1348:50: error: expected expression before ‘PyDateTime_Date’
#  1348 |                 ret = PyObject_CallMethodObjArgs(PyDateTime_Date, _CBOR2_str_fromordinal, ordinal, NULL);
#       |                                                  ^~~~~~~~~~~~~~~
# source/decoder.c:1348:23: error: too few arguments to function ‘PyObject_CallMethodObjArgs’
#  1348 |                 ret = PyObject_CallMethodObjArgs(PyDateTime_Date, _CBOR2_str_fromordinal, ordinal, NULL);
#       |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~# 
##########################################################################
# export CBOR2_BUILD_C_EXTENSION=1
export CBOR2_BUILD_C_EXTENSION=0

# tests do not pass with debian packages, on 2023-11-23
export DEB_BUILD_OPTIONS = nocheck

%:
	dh $@ --with python3,sphinxdoc --buildsystem=pybuild


override_dh_auto_build: export http_proxy=127.0.0.1:9
override_dh_auto_build: export https_proxy=127.0.0.1:9
override_dh_auto_build:
	dh_auto_build
	LANGUAGE='en_US:en' LC_ALL=C PYTHONPATH=. python3 -m sphinx -N -bhtml \
	docs/ build/html

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test -- --test-pytest
	find -name .coverage -delete
else
	echo "dh_auto_test was disabled on 2023-11-23; it should be re-enabled shortly"
endif