Skip to content

Commit ed5236e

Browse files
committed
Refactored packaging to use pbr
Signed-off-by: Sorin Sbarnea <[email protected]>
1 parent 0bb6b43 commit ed5236e

14 files changed

+166
-336
lines changed

.gitignore

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1-
/build
2-
/dist
3-
/.tox
4-
*.egg-info
1+
.idea/
2+
*.bak
3+
*.egg
4+
*.egg-info/
5+
*.pyc
6+
.cache/
7+
.coverage
8+
.coverage.*
9+
.eggs/
10+
.tox/
11+
amps-standalone
12+
build
13+
coverage.xml
14+
**/*.log
15+
/.python-version
16+
/CHANGELOG
17+
/ChangeLog
18+
/AUTHORS
19+
/tests/build

.travis.yml

Lines changed: 33 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,75 +8,65 @@ python:
88
- '2.7'
99
- '3.4'
1010
- '3.5'
11+
- '3.6'
12+
install:
13+
- pip -q --log dist/pip.log install --upgrade pip setuptools tox-travis py wheel
14+
- python setup.py sdist bdist_wheel install
15+
- pip install ./dist/*.whl
16+
- pip --version
1117
script:
12-
- travis_wait python setup.py test
13-
- export PACKAGE_VERSION=$(python -c "from jira import __version__; print(__version__)")
18+
- export PACKAGE_NAME=$(python setup.py --name)
19+
- export PACKAGE_VERSION=$(python setup.py --version)
20+
- python setup.py --version
21+
- tox --installpkg ./dist/*.whl --travis-after
22+
# validates that the build source distribution is installable using the old easy_install
23+
- pip uninstall -y $PACKAGE_NAME && easy_install ./dist/$PACKAGE_NAME-*.tar.gz
1424
after_success:
15-
- python travis_after_all.py
16-
- export $(cat .to_export_back)
17-
- |
18-
if [ "$BUILD_LEADER" = "YES" ]; then
19-
if [ "$BUILD_AGGREGATE_STATUS" = "others_succeeded" ]; then
20-
echo "All jobs succeeded! PUBLISHING..."
21-
else
22-
echo "Some jobs failed"
23-
fi
24-
fi
2525
- coveralls
26-
- travis_wait python setup.py prerelease
26+
- bash <(curl -s https://codecov.io/bash)
2727
- requires.io update-site -t ac3bbcca32ae03237a6aae2b02eb9411045489bb -r
28-
- make test
29-
after_failure:
30-
- python travis_after_all.py
31-
- export $(cat .to_export_back)
32-
- |
33-
if [ "$BUILD_LEADER" = "YES" ]; then
34-
if [ "$BUILD_AGGREGATE_STATUS" = "others_failed" ]; then
35-
echo "All jobs failed"
36-
else
37-
echo "Some jobs failed"
38-
fi
39-
fi
40-
after_script:
41-
- echo leader=$BUILD_LEADER status=$BUILD_AGGREGATE_STATUS
42-
branches:
43-
only:
44-
- master
45-
- develop
4628
notifications:
4729
email:
4830
4931
50-
before_deploy:
51-
- echo "before deploy..."
5232
deploy:
5333
- provider: releases
5434
api_key:
55-
secure: gr9iOcQjdoAyUAim6FWKzJI9MBaJo9XKfGQGu7wdPXUFhg80Rp6GLJsowP+aU94NjXM1UQlVHDAy627WtjBlLH2SvmVEIIr7+UKBopBYuXG5jJ1m3wOZE+4f1Pqe9bqFc1DxgucqE8qF0sC24fIbNM2ToeyYrxrS6RoL2gRrX2I=
56-
file: dist/confluence-$PACKAGE_VERSION.tar.gz
35+
secure: G19YtkGAX0aJ1oyd/7eRj1KYdsmAkjkfU2UISvsjh/68ec1+9qtPpN7BbkFYZYMjSx0BtS0SEEA7Vdl4F9DI9Zzqahbj7WzDLFe9/4aZKM/ztfKWR6CNAYaMazAKS5W7r9pPkBBDIIJ9zCqvV7FRzjewEpfTwFzwUdY+IpxEsAM=
36+
file:
37+
- dist/$PACKAGE_NAME-$PACKAGE_VERSION.tar.gz
38+
- dist/$PACKAGE_NAME-$PACKAGE_VERSION-py2.py3-none-any.whl
39+
- ChangeLog
5740
skip_cleanup: true
5841
on:
59-
condition: "$BUILD_LEADER = YES"
42+
repo: pycontribs/jira
43+
tags: true
44+
python: 2.7
45+
condition: $TOXENV != docs
6046
- provider: pypi
6147
user: sorin
6248
password:
6349
secure: E0cjANF7SLBdYrsnWLK8X/xWznqkF0JrP/DVfDazPzUYH6ynFeneyofzNJQPLTLsqe1eKXhuUJ/Sbl+RHFB0ySo/j/7NfYd/9pm8hpUkGCvR09IwtvMLgWKp3k10NWab03o2GOkSJSrLvZofyZBGR40wwu2O9uXPCb2rvucCGbw=
6450
distributions: sdist bdist_wheel
51+
skip_cleanup: true
6552
on:
66-
condition: "$BUILD_LEADER = YES"
53+
tags: true
54+
python: 2.7
55+
condition: $TOXENV != docs
6756
branch: master
6857
- provider: pypi
6958
server: https://testpypi.python.org/pypi
7059
user: sorins
7160
password:
7261
secure: E0cjANF7SLBdYrsnWLK8X/xWznqkF0JrP/DVfDazPzUYH6ynFeneyofzNJQPLTLsqe1eKXhuUJ/Sbl+RHFB0ySo/j/7NfYd/9pm8hpUkGCvR09IwtvMLgWKp3k10NWab03o2GOkSJSrLvZofyZBGR40wwu2O9uXPCb2rvucCGbw=
7362
distributions: sdist bdist_wheel
63+
skip_cleanup: true
7464
on:
75-
condition: "$BUILD_LEADER = YES"
65+
tags: false
66+
python: 2.7
67+
condition: $TOXENV != docs
7668
branch: develop
77-
after_deploy:
78-
- echo "Now we only have to increase the version number, tag the changset and push..."
79-
- "./release.sh"
8069
env:
81-
matrix:
82-
secure: fuXwQL+KHQ96XkAFl2uQc8eK8dAjrgkup46tck/UGjVpdv1PT/yHmBKrvpFjDa50ueGbtBwTdKAwhyAmYuiZCk2IYHzdvBylCZBBji2FSpaTM59CVwgkVT6tx3HHO83X0mEX6ih9TJvZD5XhX+YUjopnseRXRq3ey3JZJXWN4RM=
70+
global:
71+
- secure: fuXwQL+KHQ96XkAFl2uQc8eK8dAjrgkup46tck/UGjVpdv1PT/yHmBKrvpFjDa50ueGbtBwTdKAwhyAmYuiZCk2IYHzdvBylCZBBji2FSpaTM59CVwgkVT6tx3HHO83X0mEX6ih9TJvZD5XhX+YUjopnseRXRq3ey3JZJXWN4RM=
72+
- secure: "pGQGM5YmHvOgaKihOyzb3k6bdqLQnZQ2OXO9QrfXlXwtop3zvZQi80Q+01l230x2psDWlwvqWTknAjAt1w463fYXPwpoSvKVCsLSSbjrf2l56nrDqnoir+n0CBy288+eIdaGEfzcxDiuULeKjlg08zrqjcjLjW0bDbBrlTXsb5U="

MANIFEST.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
include README.md
1+
include LICENSE README.rst
2+
include requirements.txt
3+
include requirements-dev.txt
4+
prune tests

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
.PHONY: build test
22

3-
all: build
3+
all: test
44

55
test:
6-
@python3 -m pip install -q -r requirements-dev.txt
7-
@python3 -m pytest
6+
@python -m pip install -q -r requirements.txt -r requirements-dev.txt
7+
@python -m pytest
88

99
build: test
1010
@python setup.py build
11-
@python -m pytest

README.md renamed to README.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
Confluence Python API
22
=====================
33

4+
5+
.. image:: https://img.shields.io/pypi/v/confluence.svg
6+
:target: https://pypi.python.org/pypi/confluence/
7+
8+
.. image:: https://img.shields.io/pypi/l/confluence.svg
9+
:target: https://pypi.python.org/pypi/confluence/
10+
11+
.. image:: https://img.shields.io/pypi/dm/confluence.svg
12+
:target: https://pypi.python.org/pypi/confluence/
13+
14+
.. image:: https://img.shields.io/pypi/wheel/confluence.svg
15+
:target: https://pypi.python.org/pypi/confluence/
16+
17+
------------
418
If you want to interfere with Confluence from Python, this is what you are looking for.
519

620
While this library is quite new it has the basic functionality for retrieving and storing pages in Confluence 3.x-5.x, hiding most API differences between these versions.

confluence/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#!/usr/bin/env python
2-
# Licensed to PSF under a Contributor Agreement.
3-
# See http://www.python.org/psf/license for licensing details.
4-
from .package_meta import __version__, __date__, __author__, __copyright__, __email__, __status__
2+
from pbr.version import VersionInfo
53
from .confluence import Confluence
64
import sys
75

6+
_v = VersionInfo('jira').semantic_version()
7+
__version__ = _v.release_string()
8+
version_info = _v.version_tuple()
9+
810
__all__ = ('Confluence', '__version__', '__author__', '__copyright__', '__email__', '__status__', '__date__')
911

1012
if sys.hexversion < 0x02070000:

confluence/package_meta.py

Lines changed: 0 additions & 108 deletions
This file was deleted.

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[pytest]
55
norecursedirs = . .svn _build tmp* lib/third lib *.egg bin distutils build docs demo
66
python_files = *.py
7-
addopts = -p no:xdist --ignore=setup.py --tb=long -rxX -v --color=yes --maxfail=1 --pep8 --junitxml=build/results.xml --cov-report=xml
7+
addopts = -s -p no:xdist --ignore=setup.py --tb=long -rxX -v --color=yes --maxfail=1 --pep8 --junitxml=build/results.xml --cov-report=xml
88
testpaths = tests
99
# --maxfail=2 -n4
1010
# -n4 runs up to 4 parallel procs

release.sh

Lines changed: 0 additions & 55 deletions
This file was deleted.

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# The order of packages is significant, because pip processes them in the order
2+
# of appearance. Changing the order has an impact on the overall integration
3+
# process, which may cause wedges in the gate later.
4+
pbr

0 commit comments

Comments
 (0)