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
|
#!/usr/bin/make -f
export PYBUILD_DESTDIR_python2=debian/python-pycparser
export PYBUILD_DESTDIR_python3=debian/python3-pycparser
export PYBUILD_TEST_ARGS={dir}/tests
export PYBUILD_AFTER_TEST=rm -f {build_dir}/parser.out {build_dir}/lextab.py {build_dir}/yacctab.py
%:
dh $@ --with python2,python3 --buildsystem pybuild
override_dh_auto_build: clean-generated-code
cd pycparser && python _build_tables.py
dh_auto_build
override_dh_auto_clean: clean-generated-code
dh_auto_clean
override_dh_python2:
dh_python2
dh_python-ply $$(find $(PYBUILD_DESTDIR_python2) -name '*tab.py')
override_dh_python3:
dh_python3
# I blame jwilk for this temporary hack: (waiting for #714099)
sed -e 's/python-/python3-/g' /usr/bin/dh_python-ply | \
perl - $$(find $(PYBUILD_DESTDIR_python3) -name '*tab.py')
clean-generated-code:
cd pycparser && rm -f lextab.py yacctab.py c_ast.py
get-packaged-orig-source:
uscan --noconf --rename --repack --download-current-version --destdir=.
|