Skip to content

Commit

Permalink
Finished release 0.42.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpeacock-zenoss committed May 8, 2024
2 parents 0c21d8f + 895e1c0 commit 71f45c8
Show file tree
Hide file tree
Showing 18 changed files with 1,275 additions and 672 deletions.
52 changes: 29 additions & 23 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
# Define the image name, version and tag name for the docker build image
IMAGENAME = build-tools
VERSION = 0.0.5
TAG = zenoss/$(IMAGENAME):$(VERSION)
IMAGENAME = zenoss/build-tools
VERSION = 0.0.14
TAG = $(IMAGENAME):$(VERSION)

UID := $(shell id -u)
GID := $(shell id -g)

build-bdist:
@echo "Building a binary distribution of pynetsnmp"
docker run --rm \
-v $(PWD):/mnt \
--user $(UID):$(GID) \
$(TAG) \
/bin/bash -c "cd /mnt && python setup.py bdist_wheel"

build-sdist:
@echo "Building a source distribution of pynetsnmp"
docker run --rm \
-v $(PWD):/mnt \
--user $(UID):$(GID) \
$(TAG) \
/bin/bash -c "cd /mnt && python setup.py sdist"

# Default to building a binary distribution
build: build-bdist
DOCKER_COMMAND = docker run --rm -v $(PWD):/mnt -w /mnt -u $(UID):$(GID) $(TAG)

.DEFAULT_GOAL := build

.PHONY: bdist
bdist:
@$(DOCKER_COMMAND) bash -c "python setup.py bdist_wheel"

.PHONY: sdist
sdist:
@$(DOCKER_COMMAND) bash -c "python setup.py sdist"

.PHONY: build
build: bdist

.PHONY: clean
clean:
rm -rf *.pyc MANIFEST dist build pynetsnmp.egg-info
rm -rf *.pyc dist build pynetsnmp.egg-info

.PHONY: test
HOST ?= 127.0.0.1
test:
docker run --rm -v $(PWD):/mnt -w /mnt --user 0 $(TAG) \
bash -c "python setup.py bdist_wheel \
&& pip install dist/pynetsnmp*py2-none-any.whl ipaddr Twisted==20.3.0 \
&& cd test \
&& python test_runner.py --host $(HOST) \
&& chown -R $(UID):$(GID) /mnt" ;
Loading

0 comments on commit 71f45c8

Please sign in to comment.