Skip to content

Commit 21b48cd

Browse files
authored
Merge pull request opentracing-contrib#12 from ocadotechnology/packaging
Packaging improvements
2 parents 57fdc86 + 6b1766f commit 21b48cd

File tree

10 files changed

+2383
-24
lines changed

10 files changed

+2383
-24
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
django_opentracing/_version.py export-subst

.travis.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
language: python
3+
git:
4+
depth: 50 # Need old commits for determining version of untagged builds
5+
matrix:
6+
include:
7+
- python: 2.7
8+
env: DJANGO=1.11.9
9+
install:
10+
- pip install Django==$DJANGO
11+
- pip install -e .
12+
script:
13+
- make test
14+
deploy:
15+
provider: pypi
16+
user: opentracing-contrib
17+
distributions: bdist_wheel sdist
18+
on:
19+
all_branches: true
20+
repo: opentracing-contrib/python-django
21+
tags: true
22+
password:
23+
secure: GIpAnuIDYwVIi+I93Ap2ePy8JNCaxvzyyixQP5iVySD8QP6qXdJOODKrB/Ut3ME79Q0t4m9PVbiSvNpL3t2GA0ZuQOGKUHhIowdTpCWJthszGhrYCs8t2b01B7/a3Bq1WyggYlNdW1no1BC+UqlAAbNl2UxWmUgIJz9H5bK4qYdnKyUG9OdoJR++bokynqs4L6d9Bf8xOJDj4HxWcrqENXVWkYXwD55M4i6ytQ0CfBfSmJJ47QsafKHRr1KVr/yeP4bhqfhn0trGxf80XluyPlsYNkpMTBedZe2ftSmH9GAu8unL3JxRUL0xyDgTLG3HOySC1fIqSU6E6px8N2VhiKHOWn0YCVBANwFiflVlhyUGTmsInDYwS15du0GDYUv10tAivXNVIG3vFjyHCLnPPrO7M1kmB2zgUfcI4bhsxwdqWK0tPXGXG3lITQ4O7d8Tghy1Agh5WdSxcwyPXp3iNhJEL0s8ODAmVM9/1obem7tee6bpXKo8RKQD/VCxeAVZeFL7hqKDEPM1ULrCdD7Yi3KiJgdA8kzI82RX1KL//yLj9RvfwUlJlp6hTLfiIJjSa5O0p8/EmC0FuJ5GHIjhgdzW2GjBBQs+yNhblTk5nTbVP+XhXXIAcGyd7TMSkfOjA/D4X0jSHZeda7LKnC+DYV5pzpfqaCTBh5IJbM+ivH8=

MANIFEST.in

+3-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
include VERSION LICENSE
1+
include LICENSE
2+
include versioneer.py
3+
include django_opentracing/_version.py

Makefile

+1-20
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: test publish install clean clean-build clean-pyc clean-test build upload-docs
1+
.PHONY: test publish install clean clean-build clean-pyc clean-test build
22

33
install:
44
python setup.py install
@@ -30,22 +30,3 @@ test:
3030

3131
build:
3232
python setup.py build
33-
34-
upload-docs:
35-
python setup.py build_sphinx
36-
python setup.py upload_docs
37-
38-
publish: clean test build
39-
@git diff-index --quiet HEAD || (echo "git has uncommitted changes. Refusing to publish." && false)
40-
awk 'BEGIN { FS = "." }; { printf("%d.%d.%d", $$1, $$2, $$3+1) }' VERSION > VERSION.incr
41-
mv VERSION.incr VERSION
42-
git add VERSION
43-
git commit -m "Update VERSION"
44-
git tag `cat VERSION`
45-
git push
46-
git push --tags
47-
python setup.py register -r pypi || (echo "Was unable to register to pypi, aborting publish." && false)
48-
python setup.py sdist upload -r pypi || (echo "Was unable to upload to pypi, publish failed." && false)
49-
@echo
50-
@echo "\033[92mSUCCESS: published v`cat VERSION` \033[0m"
51-
@echo

VERSION

-1
This file was deleted.

django_opentracing/__init__.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
from .middleware import OpenTracingMiddleware
2-
from .tracer import DjangoTracer
2+
from .tracer import DjangoTracer
3+
from ._version import get_versions
4+
__version__ = get_versions()['version']
5+
del get_versions

0 commit comments

Comments
 (0)