Skip to content

Commit

Permalink
Merge pull request #12 from ocadotechnology/packaging
Browse files Browse the repository at this point in the history
Packaging improvements
  • Loading branch information
mikebryant authored Jan 6, 2018
2 parents 57fdc86 + 6b1766f commit 21b48cd
Show file tree
Hide file tree
Showing 10 changed files with 2,383 additions and 24 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
django_opentracing/_version.py export-subst
23 changes: 23 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
language: python
git:
depth: 50 # Need old commits for determining version of untagged builds
matrix:
include:
- python: 2.7
env: DJANGO=1.11.9
install:
- pip install Django==$DJANGO
- pip install -e .
script:
- make test
deploy:
provider: pypi
user: opentracing-contrib
distributions: bdist_wheel sdist
on:
all_branches: true
repo: opentracing-contrib/python-django
tags: true
password:
secure: GIpAnuIDYwVIi+I93Ap2ePy8JNCaxvzyyixQP5iVySD8QP6qXdJOODKrB/Ut3ME79Q0t4m9PVbiSvNpL3t2GA0ZuQOGKUHhIowdTpCWJthszGhrYCs8t2b01B7/a3Bq1WyggYlNdW1no1BC+UqlAAbNl2UxWmUgIJz9H5bK4qYdnKyUG9OdoJR++bokynqs4L6d9Bf8xOJDj4HxWcrqENXVWkYXwD55M4i6ytQ0CfBfSmJJ47QsafKHRr1KVr/yeP4bhqfhn0trGxf80XluyPlsYNkpMTBedZe2ftSmH9GAu8unL3JxRUL0xyDgTLG3HOySC1fIqSU6E6px8N2VhiKHOWn0YCVBANwFiflVlhyUGTmsInDYwS15du0GDYUv10tAivXNVIG3vFjyHCLnPPrO7M1kmB2zgUfcI4bhsxwdqWK0tPXGXG3lITQ4O7d8Tghy1Agh5WdSxcwyPXp3iNhJEL0s8ODAmVM9/1obem7tee6bpXKo8RKQD/VCxeAVZeFL7hqKDEPM1ULrCdD7Yi3KiJgdA8kzI82RX1KL//yLj9RvfwUlJlp6hTLfiIJjSa5O0p8/EmC0FuJ5GHIjhgdzW2GjBBQs+yNhblTk5nTbVP+XhXXIAcGyd7TMSkfOjA/D4X0jSHZeda7LKnC+DYV5pzpfqaCTBh5IJbM+ivH8=
4 changes: 3 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
include VERSION LICENSE
include LICENSE
include versioneer.py
include django_opentracing/_version.py
21 changes: 1 addition & 20 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: test publish install clean clean-build clean-pyc clean-test build upload-docs
.PHONY: test publish install clean clean-build clean-pyc clean-test build

install:
python setup.py install
Expand Down Expand Up @@ -30,22 +30,3 @@ test:

build:
python setup.py build

upload-docs:
python setup.py build_sphinx
python setup.py upload_docs

publish: clean test build
@git diff-index --quiet HEAD || (echo "git has uncommitted changes. Refusing to publish." && false)
awk 'BEGIN { FS = "." }; { printf("%d.%d.%d", $$1, $$2, $$3+1) }' VERSION > VERSION.incr
mv VERSION.incr VERSION
git add VERSION
git commit -m "Update VERSION"
git tag `cat VERSION`
git push
git push --tags
python setup.py register -r pypi || (echo "Was unable to register to pypi, aborting publish." && false)
python setup.py sdist upload -r pypi || (echo "Was unable to upload to pypi, publish failed." && false)
@echo
@echo "\033[92mSUCCESS: published v`cat VERSION` \033[0m"
@echo
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

5 changes: 4 additions & 1 deletion django_opentracing/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
from .middleware import OpenTracingMiddleware
from .tracer import DjangoTracer
from .tracer import DjangoTracer
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
Loading

0 comments on commit 21b48cd

Please sign in to comment.