From d483e089ff058373071e4ae06cfb7e474964aa02 Mon Sep 17 00:00:00 2001 From: daniel watson Date: Tue, 16 Jun 2026 11:38:47 -0700 Subject: [PATCH 1/3] fix commit abbrev on merge commits Signed-off-by: daniel watson --- Makefile | 2 +- docs/build-uploads.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9f0012b9..de346fde 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ # Warning: VERSION, ABBREV and TARGZ are used in docs/build-uploads.sh. VERSION=$(shell ./offlineimap.py --version) -ABBREV=$(shell git log --format='%h' HEAD~1..) +ABBREV=$(shell git rev-parse --short HEAD) TARGZ=offlineimap-v$(VERSION)-$(ABBREV) SHELL=/bin/bash RST2HTML=`type rst2html >/dev/null 2>&1 && echo rst2html || echo rst2html.py` diff --git a/docs/build-uploads.sh b/docs/build-uploads.sh index 3bef5418..45d15a82 100755 --- a/docs/build-uploads.sh +++ b/docs/build-uploads.sh @@ -19,7 +19,7 @@ make targz >/dev/null # Defined in the root Makefile. version="$(./offlineimap.py --version)" -abbrev="$(git log --format='%h' HEAD~1..)" +abbrev="$(git rev-parse --short HEAD)" targz="../offlineimap-v${version}-${abbrev}.tar.gz" filename="offlineimap-v${version}.tar.gz" From bd87b5e9907c595b2f34b2cf06cb934801d699e3 Mon Sep 17 00:00:00 2001 From: daniel watson Date: Tue, 16 Jun 2026 11:40:14 -0700 Subject: [PATCH 2/3] silence warning about running pip as root in docker build Signed-off-by: daniel watson --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 5b4ee1f7..91a3be5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,6 +14,7 @@ WORKDIR /app-src #RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y krb5-user -y && rm -rf /var/lib/apt/lists/* # Get latest pip and dependencies +ENV PIP_ROOT_USER_ACTION=ignore RUN /usr/local/bin/python3 -m pip install --upgrade pip && pip install -r requirements.txt # Copy in rest of the code after deps are in place From 9386f840fdff4b2d233a125a36ca39dff698a404 Mon Sep 17 00:00:00 2001 From: daniel watson Date: Tue, 16 Jun 2026 11:41:19 -0700 Subject: [PATCH 3/3] use pip install since setup.py is gone also grab directory name at runtime instead of hard coding "offlineimap". the directory is named "offlineimap3" now, so build succeeds with this change. Signed-off-by: daniel watson --- Dockerfile | 2 +- Makefile | 12 +++++++----- contrib/release.sh | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 91a3be5b..b6afcf27 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ RUN /usr/local/bin/python3 -m pip install --upgrade pip && pip install -r requir COPY . /app-src # Install the app -RUN /usr/local/bin/python3 setup.py install +RUN /usr/local/bin/python3 -m pip install . ############## # Run tests in a throwaway stage diff --git a/Makefile b/Makefile index de346fde..987c9b24 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ # Warning: VERSION, ABBREV and TARGZ are used in docs/build-uploads.sh. VERSION=$(shell ./offlineimap.py --version) ABBREV=$(shell git rev-parse --short HEAD) +DIRNAME=$(shell basename $(CURDIR)) TARGZ=offlineimap-v$(VERSION)-$(ABBREV) SHELL=/bin/bash RST2HTML=`type rst2html >/dev/null 2>&1 && echo rst2html || echo rst2html.py` @@ -24,13 +25,14 @@ RST2HTML=`type rst2html >/dev/null 2>&1 && echo rst2html || echo rst2html.py` all: build build: - python setup.py build + python -m build @echo - @echo "Build process finished, run 'python setup.py install' to install" \ - "or 'python setup.py --help' for more information". + @echo "Build process finished, run 'pip install .' to install" \ + "or 'pip install dist/*.whl' for a specific wheel." \ + "Use 'uv pip install .' if using uv." clean: - -python setup.py clean --all + -rm -rf build dist *.egg-info -rm -f bin/offlineimapc 2>/dev/null -find . -name '*.pyc' -exec rm -f {} \; -find . -name '*.pygc' -exec rm -f {} \; @@ -50,7 +52,7 @@ websitedoc: targz: ../$(TARGZ) ../$(TARGZ): - cd .. && tar -zhcv --transform s,^offlineimap,offlineimap-v$(VERSION), -f $(TARGZ).tar.gz --exclude '.*.swp' --exclude '.*.swo' --exclude '*.pyc' --exclude '__pycache__' offlineimap/{bin,Changelog.md,Changelog.maint.md,contrib,CONTRIBUTING.rst,COPYING,docs,MAINTAINERS.rst,Makefile,MANIFEST.in,offlineimap,offlineimap.conf,offlineimap.conf.minimal,offlineimap.py,README.md,requirements.txt,scripts,setup.cfg,setup.py,snapcraft.yaml,test,tests,TODO.rst} + cd .. && tar -zhcv --transform s,^$(DIRNAME),offlineimap-v$(VERSION), -f $(TARGZ).tar.gz --exclude '.*.swp' --exclude '.*.swo' --exclude '*.pyc' --exclude '__pycache__' $(DIRNAME)/{bin,Changelog.md,Changelog.maint.md,contrib,CONTRIBUTING.rst,COPYING,docs,MAINTAINERS.rst,Makefile,MANIFEST.in,offlineimap,offlineimap.conf,offlineimap.conf.minimal,offlineimap.py,pyproject.toml,README.md,requirements.txt,scripts,setup.cfg,snapcraft.yaml,test,tests,TODO.rst} rpm: targz cd .. && sudo rpmbuild -ta $(TARGZ) diff --git a/contrib/release.sh b/contrib/release.sh index 22af2799..c915c3a9 100755 --- a/contrib/release.sh +++ b/contrib/release.sh @@ -472,7 +472,7 @@ Make your checks and push the changes for both offlineimap and the website. Announce template stands in '$TMP_ANNOUNCE'. Command samples to do manually: - git push master next $new_version -- python setup.py sdist && twine upload dist/* && rm -rf dist MANIFEST +- python -m build && twine upload dist/* && rm -rf dist - cd website - git checkout master - git merge $branch_name