Skip to content

Commit

Permalink
Merge pull request #5 from epidemicsound/wheel-distribution
Browse files Browse the repository at this point in the history
Create versioned wheels
  • Loading branch information
alvinlindstam authored Jun 13, 2019
2 parents a52b09c + d4ecca0 commit 1fc3387
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build-release:
python3 setup.py bdist_wheel
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ This module exposes the necessary API to create a worker which starts polling me
We can install the library through github by writing the dependency in `requirements.txt` as:

```
git+https://github.com/epidemicsound/aws-sqs-worker.git#egg=aws-sqs-worker
https://github.com/epidemicsound/aws-sqs-worker/releases/download/v0.0.1/aws_sqs_worker-0.0.1-py3-none-any.whl
```

Replace 0.0.1 with the desired version, on both places in the url!

If using pipenv, you can also run `pipenv install https://github.com/epidemicsound/aws-sqs-worker/releases/download/v0.0.1/aws_sqs_worker-0.0.1-py3-none-any.whl`.

## Steps necessary to create a worker for the process:

1. Create a worker class with a method to handle the payload from the queue that the worker is created for. An example is as follows:
Expand Down Expand Up @@ -45,3 +49,18 @@ queue_worker.start()
```

This will then start the queue polling mechanism by the `queue_worker`. As soon as message appears on the `queue_name`, it invokes the `handle_payload` function of `myworker` instance.

## Release

Use semantic versioning for this library. When bumping the version, please update the version in:

* setup.py
* this readme

Merge into master.

Generate a new wheel (after bumping the version and being on the new master) by running `make build-release`.

Make sure that there is a new wheel named `aws_sqs_worker-<version>-py3-none-any.whl` and is in the `dist` folder.

Create a github release and upload the wheel file to the release.

0 comments on commit 1fc3387

Please sign in to comment.