debian swirl logo

Back to the packages list python-rply

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/rules/upstream-tarball.mk
include /usr/share/cdbs/1/class/python-distutils.mk
include /usr/share/cdbs/1/rules/debhelper.mk

# pypy binary package
pypy_package = pypy-rply

# Suppress unneeded build-dependencies
CDBS_BUILD_DEPENDS_class_python-distutils_python = 

# Additional build-depends on pypy for building pypy-rply
# TODO: remove this once dh_pypy is integrated into CDBS
CDBS_BUILD_DEPENDS += , pypy, dh-python

# generates get-orig-source target
DEB_UPSTREAM_PACKAGE = rply
DEB_UPSTREAM_URL = https://pypi.python.org/packages/source/r/rply
DEB_UPSTREAM_TARBALL_MD5 = 7a67a9ba6aa86eda094cfb2c13eaecea

# hook pypy-rply into existing cdbs build stage
build/$(pypy_package):: build/%: debian/python-module-stampdir/%
debian/python-module-stampdir/$(pypy_package):
		cd $(cdbs_python_distutils_srcdir) && \
			pypy $(cdbs_python_setup_cmd) build \
			$(cdbs_python_build_args)
		touch $@

# hook pypy-rply into existing cdbs install stage
install/$(pypy_package)::
		cd $(cdbs_python_distutils_srcdir) && \
			pypy $(cdbs_python_setup_cmd) install \
			--root="$(cdbs_python_destdir)" \
			--install-purelib=$(call cdbs_expand_python_distutils_installdir,pypy) \
			$(cdbs_python_install_args)

# hook in binary-post-install to invoke dh_pypy to calculate
# dependencies, add maintainer script and byte compile files.
binary-post-install/$(pypy_package):: binary-post-install/%: binary-install-python/%
binary-install-python/$(pypy_package):: binary-install-python/%: binary-install/%
		dh_pypy -p$(cdbs_curpkg) $(call cdbs_expand_curvar,DEB_DH_PYTHONHELPER_ARGS) $(call cdbs_expand_curvar, DEB_PYTHON_PRIVATE_MODULE_DIRS)

python-module-clean/$(pypy_package)::
		-cd $(cdbs_python_distutils_srcdir) && \
			pypy $(cdbs_python_setup_cmd) clean \
			$(cdbs_python_clean_args)

Builds:

pypy-rply
pure python based parser that also works with rpython (pypy)
python3-rply
pure python based parser that also works with rpython (python 3)
python-rply
pure python based parser that also works with rpython (python 2)