Skip to content

Commit 8135b71

Browse files
committed
Switch to PBR
1 parent d51b94b commit 8135b71

6 files changed

Lines changed: 40 additions & 38 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

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
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
1313
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
14+
.env/bin/pip install -e ".[testing]"
1715
test -d .env/mailboxer || git clone https://github.com/vmalloc/mailboxer .env/mailboxer
1816
.env/bin/pip install -r .env/mailboxer/deps/base.txt -r .env/mailboxer/deps/develop.txt -r .env/mailboxer/deps/app.txt
1917
touch $@

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 & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +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 :: 3.6",
16-
"Programming Language :: Python :: 3.7",
17-
"Programming Language :: Python :: 3.8",
18-
"Programming Language :: Python :: 3.9",
19-
],
20-
description="Client library for Mailboxer",
21-
license="BSD3",
22-
author="Rotem Yaari",
23-
author_email="vmalloc@gmail.com",
24-
version=__version__, # pylint: disable=E0602
25-
packages=find_packages(exclude=["tests"]),
26-
27-
url="https://github.com/vmalloc/mailboxer-python",
28-
29-
install_requires=_INSTALL_REQUIRES,
30-
scripts=[],
31-
namespace_packages=[]
32-
)
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+
)

0 commit comments

Comments
 (0)