Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ 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
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
Expand Down
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,23 @@

# 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)
DIRNAME=$(shell basename $(CURDIR))
TARGZ=offlineimap-v$(VERSION)-$(ABBREV)
SHELL=/bin/bash
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 {} \;
Expand All @@ -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)
2 changes: 1 addition & 1 deletion contrib/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <remote> 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
Expand Down
2 changes: 1 addition & 1 deletion docs/build-uploads.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down