Skip to content

Commit

Permalink
Initial commit (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
aalexfvk authored Nov 3, 2023
1 parent d08c6f6 commit 25728d2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export LANG = en_US.UTF-8
PROJECT_NAME ?= clickhouse-tools
PROJECT_NAME_UNDERSCORE ?= $(subst -,_,$(PROJECT_NAME))

PYTHON ?= python3
export PYTHON ?= python3

# The latest version supporting Python 3.6
POETRY_VERSION ?= 1.1.15
Expand Down
1 change: 1 addition & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ X-Python3-Version: >= 3.6
Package: clickhouse-tools
Architecture: any
Description: A set of tools for administration and diagnostics of ClickHouse DBMS.
Depends: ${python:Depends}
Replaces: mdb-ch-tools, ch-tools
Conflicts: mdb-ch-tools, ch-tools
17 changes: 17 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,30 @@ export POETRY_INSTALLER_PARALLEL=false
# TODO: use POETRY_INSTALLER_MAX_WORKERS to control count of parallel workers
# after upgrading to poetry >=1.2


PYTHON_MAJOR := $(shell $(PYTHON) -c 'import sys; print(sys.version_info[0])')
PYTHON_MINOR := $(shell $(PYTHON) -c 'import sys; print(sys.version_info[1])')

PYTHON_FROM := $(PYTHON_MAJOR).$(PYTHON_MINOR)
PYTHON_TO := $(PYTHON_MAJOR).$(shell echo $$(( $(PYTHON_MINOR) + 1 )))

# Use conditional python3 dependency because package for Bionic requires python3.6,
# but package for Jammy requires python3.10.
#
# All this is due to the fact that we put the entire virtual environment in a deb package
# and that venv links to the system python
SUBSTVARS := -Vpython:Depends="python3 (>= $(PYTHON_FROM)), python3 (<< $(PYTHON_TO))"

%:
dh $@

override_dh_auto_build:
$(MAKE) install-poetry
dh_auto_build

override_dh_gencontrol:
dh_gencontrol -- $(SUBSTVARS)

override_dh_auto_clean: ;

override_dh_strip: ;
Expand Down

0 comments on commit 25728d2

Please sign in to comment.