Skip to content

Commit 4ef75fd

Browse files
authored
Merge pull request #8 from getslash/ayalas/updates
Updates
2 parents 8ea1742 + d9f4fba commit 4ef75fd

10 files changed

Lines changed: 59 additions & 54 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ flycheck-*
77
dist
88
.env
99
.cache
10+
.eggs

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ addons:
55
before_script:
66
- psql -c 'create database mailboxer;' -U postgres
77
python:
8-
- '2.7'
9-
- '3.3'
10-
- '3.4'
11-
- '3.5'
8+
- '3.6'
9+
- '3.7'
10+
- '3.8'
11+
- '3.9'
1212
script:
1313
- make travis_test
1414
deploy:

Makefile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
default: test
22

33
test: env
4-
.env/bin/py.test -x tests
4+
.env/bin/pytest -x tests
55

66
travis_test: env
7-
PYTHONPATH=.env/mailboxer .env/bin/py.test
7+
PYTHONPATH=.env/mailboxer .env/bin/pytest
88

99
env: .env/.up-to-date
1010

1111

1212
.env/.up-to-date: setup.py Makefile
13-
virtualenv --no-site-packages .env
14-
.env/bin/pip install -e .
15-
.env/bin/pip install -r ./mailboxer_python.egg-info/requires.txt
16-
.env/bin/pip install pytest Flask-Loopback
17-
test -d .env/mailboxer || git clone https://github.com/vmalloc/mailboxer .env/mailboxer
18-
.env/bin/pip install -r .env/mailboxer/deps/base.txt -r .env/mailboxer/deps/develop.txt -r .env/mailboxer/deps/app.txt
13+
python -m virtualenv .env
14+
.env/bin/pip install -e ".[testing]"
1915
touch $@
2016

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11

2-
![Build Status] (https://secure.travis-ci.org/getslash/mailboxer-python.png )
3-
4-
![Version] (https://img.shields.io/pypi/v/mailboxer-python.svg )
2+
|-----------------------|-----------------------------------------------------------------------------------------|
3+
| Build Status | ![Build Status](https://secure.travis-ci.org/getslash/mailboxer-python.png) |
4+
| Supported Versions | ![Supported Versions](https://img.shields.io/pypi/pyversions/mailboxer-python.svg) |
5+
| Latest Version | ![Latest Version](https://img.shields.io/pypi/v/mailboxer-python.svg) |
56

67
Overview
78
========
@@ -31,7 +32,7 @@ Documentation
3132
=============
3233

3334
** Coming Soon **
34-
35+
3536

3637
Licence
3738
=======

mailboxer/__version__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
__version__ = "1.3.2"
1+
import pkg_resources
2+
3+
__version__ = pkg_resources.get_distribution('mailboxer-python').version

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
requests
2+
URLObject

setup.cfg

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[metadata]
2+
name = mailboxer-python
3+
classifiers =
4+
Programming Language :: Python :: 3.6
5+
Programming Language :: Python :: 3.7
6+
Programming Language :: Python :: 3.8
7+
Programming Language :: Python :: 3.9
8+
summary = Client library for Mailboxer
9+
description-file =
10+
README.md
11+
description-content-type = text/markdown
12+
license = BSD
13+
author = Rotem Yaari
14+
author_email = vmalloc@gmail.com
15+
url = https://github.com/getslash/mailboxer-python
16+
17+
18+
[extras]
19+
testing =
20+
pylint
21+
flask-loopback
22+
pytest

setup.py

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,9 @@
1-
import os
2-
import sys
3-
from setuptools import setup, find_packages
4-
5-
with open(os.path.join(os.path.dirname(__file__), "mailboxer", "__version__.py")) as version_file:
6-
exec(version_file.read()) # pylint: disable=W0122
7-
8-
_INSTALL_REQUIRES = [
9-
"requests",
10-
"URLObject",
11-
]
12-
13-
setup(name="mailboxer-python",
14-
classifiers = [
15-
"Programming Language :: Python :: 2.6",
16-
"Programming Language :: Python :: 2.7",
17-
"Programming Language :: Python :: 3.3",
18-
],
19-
description="Client library for Mailboxer",
20-
license="BSD3",
21-
author="Rotem Yaari",
22-
author_email="vmalloc@gmail.com",
23-
version=__version__, # pylint: disable=E0602
24-
packages=find_packages(exclude=["tests"]),
25-
26-
url="https://github.com/vmalloc/mailboxer-python",
27-
28-
install_requires=_INSTALL_REQUIRES,
29-
scripts=[],
30-
namespace_packages=[]
31-
)
1+
#!/usr/bin/env python
2+
from setuptools import setup
3+
4+
setup(
5+
setup_requires=['pbr>=3.0', 'setuptools>=17.1'],
6+
pbr=True,
7+
python_requires=">=3.6.*",
8+
long_description_content_type='text/markdown; charset=UTF-8',
9+
)

tests/test_mailboxer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from itertools import izip_longest
1+
from itertools import zip_longest
22

33

44
def test_get_mailboxes_empty(mailboxer):
@@ -10,7 +10,7 @@ def test_delete_mailbox(mailboxer, mailbox):
1010
assert len(mailboxer.get_mailboxes()) == 0
1111

1212
def test_get_mailboxes_single_page(mailboxer, mailboxes):
13-
query = mailboxer.get_mailboxes(page_size=len(mailboxes) / 2)
14-
for mailbox, expected in izip_longest(query, mailboxes, fillvalue=None):
13+
query = mailboxer.get_mailboxes(page_size=len(mailboxes) // 2)
14+
for mailbox, expected in zip_longest(query, mailboxes, fillvalue=None):
1515
assert mailbox.address == expected.address
1616
assert len(query) == len(mailboxes)

tox.ini

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
[tox]
2-
envlist = py26,py27,py33
2+
envlist = py36,py37,py38,py39
33

44
[testenv]
5-
commands=python {toxinidir}/_test_build.py
6-
changedir = {toxinidir}
5+
commands =
6+
python tests
7+
extras =
8+
testing
9+
changedir = {toxinidir}

0 commit comments

Comments
 (0)