@@ -104,8 +104,13 @@ CUSTOM_DEPS = unzip wget python3-venv parallel git less # add more packages for
104104
105105DEFAULT_DISABLED_MODULES = cor-asv-fst opencv-python ocrd_ocropy
106106ifeq ($(PYTHON_VERSION ) ,3.10)
107- # Python 3.10.x does not work with current kraken.
107+ # Python 3.10 fails to build numpy==1.19.3 which is required in headless-tf1.
108+ # This restriction can be removed as soon as ocrd_cis no longer depends on calamari_ocr==0.3.5.
109+ DEFAULT_DISABLED_MODULES += ocrd_cis
110+ # Python 3.10 does not work with current kraken.
108111DEFAULT_DISABLED_MODULES += ocrd_kraken
112+ # Python 3.10 does not provide tensorflow<=2.5.0,>=2.0.0 (from ocr4all-pixel-classifier==0.6.6->-r requirements.in (line 2)).
113+ DEFAULT_DISABLED_MODULES += ocrd_pc_segmentation
109114endif
110115DISABLED_MODULES ?= $(DEFAULT_DISABLED_MODULES )
111116
@@ -247,10 +252,6 @@ $(SHARE)/opencv-python: opencv-python/setup.py | $(ACTIVATE_VENV) $(SHARE) $(SHA
247252$(BIN ) /ocrd : $(SHARE ) /opencv-python
248253endif
249254
250- ifeq ($(PYTHON_VERSION ) ,3.10)
251- # Python 3.10.x does not work with current kraken.
252- override OCRD_MODULES := $(filter-out ocrd_kraken, $(OCRD_MODULES ) )
253- endif
254255ifneq ($(findstring ocrd_kraken, $(OCRD_MODULES ) ) ,)
255256OCRD_EXECUTABLES += $(OCRD_KRAKEN )
256257install-models : install-models-kraken
@@ -535,6 +536,8 @@ OCRD_ANYBASEOCR += $(BIN)/ocrd-anybaseocr-textline
535536OCRD_ANYBASEOCR += $(BIN ) /ocrd-anybaseocr-layout-analysis
536537$(call multirule,$(OCRD_ANYBASEOCR ) ) : ocrd_anybaseocr
537538 cd $< ; $(MAKE ) patch-pix2pixhd
539+ # Hack for Python 3.10 which fails to install ocrd-fork-pylsd 0.0.4 from PyPI.
540+ . $(ACTIVATE_VENV ) && pip install git+https://github.com/kba/pylsd.git
538541 $(pip_install )
539542endif
540543
@@ -677,9 +680,10 @@ define pip_install_tf1nvidia =
677680 pushd $$name && for path in $$name*; do mv $$path $${path/$$name/$$newname}; done && popd && \
678681 $(PYTHON ) -m wheel pack $$name && \
679682 $(SEMPIP ) pip install $$newname*.whl && popd && rm -fr $$OLDPWD; fi
683+ # TODO: Remove the following hack. It was replaced by pip constraints.
680684# - preempt conflict over numpy between scikit-image and tensorflow
681685# - preempt conflict over numpy between tifffile and tensorflow (and allow py36)
682- . $(ACTIVATE_VENV ) && $(SEMPIP ) pip install imageio==2.14.1 "tifffile<2022"
686+ # . $(ACTIVATE_VENV) && $(SEMPIP) pip install imageio==2.14.1 "tifffile<2022"
683687endef
684688
685689# pattern for recursive make:
0 commit comments