Commit d787835f authored by Andreas Tille's avatar Andreas Tille
Browse files

More default d/rules

parent c90e8609
Loading
Loading
Loading
Loading
Loading

debian/bin/_build.py

deleted120000 → 0
+0 −1
Original line number Diff line number Diff line
../../skimage/_build.py
 No newline at end of file

debian/bin/process_pyx.py

deleted100644 → 0
+0 −28
Original line number Diff line number Diff line
import sys
import glob
from distutils.version import LooseVersion

CYTHON_VERSION = '0.23.4'

from Cython import __version__
if LooseVersion(__version__) < CYTHON_VERSION:
    raise RuntimeError('Cython >= %s needed to build scikit-image' % CYTHON_VERSION)

from Cython.Build import cythonize

from _build import _changed, process_tempita_pyx


pyx_files = []

for pyxfile in glob.glob('**/*.pyx', recursive=True) + glob.glob('**/*.pyx.in', recursive=True):
    if not _changed(pyxfile):
        continue

    if pyxfile.endswith('.pyx.in'):
        process_tempita_pyx(pyxfile)
        pyxfile = pyxfile.replace('.pyx.in', '.pyx')

    pyx_files.append(pyxfile)

cythonize(pyx_files, nthreads=int(sys.argv[1]))
+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ skimage (0.16.2-1) UNRELEASED; urgency=medium
  * Team upload.
  * New upstream version
  * Standards-Version: 4.4.1
  * More default d/rules

 -- Andreas Tille <tille@debian.org>  Mon, 02 Dec 2019 10:07:39 +0100

+2 −27
Original line number Diff line number Diff line
@@ -15,12 +15,6 @@ export DEB_BUILD_MAINT_OPTIONS := hardening=+all
export DEB_CFLAGS_MAINT_APPEND := -fsigned-char
export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
  JOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
else
  JOBS := 1
endif

# Assure Agg backend for matplotlib to avoid any possible complication
export MPLBACKEND := Agg

@@ -36,20 +30,6 @@ export PYBUILD_TEST_PYTEST := 1
clean:
	dh $@ --with python3 --buildsystem pybuild

# silly distutils does not support parallelism! waste hours of time
.PHONY: build
build build-arch build-indep:
	$(MAKE) -j $(JOBS) -f debian/rules _$@

_build-arch: $(addprefix debian/build-stamp-python,$(PY3VERS))
	:
_build _build-indep: _build-arch doc/build/html
	:

debian/build-stamp-python%: debian/build-stamp-pyx
	PYBUILD_INTERPRETERS=python{version} PYBUILD_VERSIONS=$* dh build-arch --with python$(basename $*) --buildsystem pybuild
	touch $@

override_dh_clean:
	dh_clean
	rm -rf .pytest_cache build scikit_image.egg-info
@@ -67,11 +47,7 @@ ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
endif
endif

debian/build-stamp-pyx: debian/bin/process_pyx.py
	python$(PY3VER) $< $(JOBS)
	touch $@

doc/build/html: debian/build-stamp-python$(PY3VER)
override_dh_installdocs:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	# hotfix SPHINXBUILD -- remove in next release
	+\
@@ -81,6 +57,7 @@ ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
		SPHINXOPTS="-j $(JOBS) -D mathjax_path=MathJax.js" \
		$(MAKE) -C doc html
endif
	dh_installdocs -A CONTRIBUTORS.txt README.md CONTRIBUTING.txt

# Test data and plugin ini not copied to .pybuild -- manually link for them
override_dh_auto_test-arch:
@@ -119,5 +96,3 @@ ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	dh_sphinxdoc -XMathJax.js
endif
override_dh_installdocs:
	dh_installdocs -A CONTRIBUTORS.txt README.md CONTRIBUTING.txt