Skip to content

Commit 0f66428

Browse files
Merge branch 'cleanup'
2 parents d9aee0c + 36cb300 commit 0f66428

File tree

11 files changed

+80
-28
lines changed

11 files changed

+80
-28
lines changed

.coveragerc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[run]
2+
branch = True
3+
source = telesign
4+
5+
[report]
6+
exclude_lines =
7+
if self.debug:
8+
pragma: no cover
9+
raise NotImplementedError
10+
if __name__ == .__main__.:
11+
ignore_errors = True
12+
omit =
13+
docs/*
14+
examples/*
15+
tests/*

.gitignore

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
*.egg-info/
2-
*.pyc
3-
*.zip
4-
dist/*
5-
_build
1+
# general things to ignore
2+
.eggs/
3+
.tox/
64
.coverage
7-
*.swp
5+
build/
6+
dist/
7+
*.egg-info/
8+
*.egg
9+
*.py[cod]
10+
__pycache__/
11+
*.so
12+
*~
813

9-
# PyCharm IDE
10-
.idea
14+
# intelliJ IDE
15+
.idea/
1116

1217
# Other
1318
.DS_Store

.travis.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1+
---
12
language: python
3+
sudo: false
4+
cache: pip
5+
matrix:
6+
allow_failures:
7+
- python: nightly
28
python:
39
- "2.6"
410
- "2.7"
511
- "3.3"
612
- "3.4"
713
- "3.5"
814
- "3.6"
9-
install:
10-
- pip install .
11-
script: nosetests --with-coverage --cover-package=telesign --cover-inclusive
15+
- "nightly"
1216
before_install:
13-
- pip install nose mock pytz coverage codecov
17+
- pip install --quiet codecov
18+
install:
19+
# Install deps with pip so they are cached
20+
- pip install --quiet nose pytz requests
21+
- python setup.py -q install
22+
script:
23+
- coverage run setup.py -v test
1424
after_success:
1525
- codecov
File renamed without changes.

MANIFEST.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include *.py
2-
include *.txt
3-
include *.rst
4-
include MANIFEST.in
1+
include LICENSE.txt
2+
include README.rst
3+
graft examples
4+
graft tests

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[wheel]
2+
universal = 1

setup.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
1+
import sys
2+
from codecs import open
3+
from os import path
4+
15
from setuptools import setup, find_packages
26

7+
EXCLUDE_FROM_PACKAGES = ['tests']
8+
9+
needs_mock = sys.version_info < (3, 3)
10+
mock = ['mock'] if needs_mock else []
11+
12+
here = path.abspath(path.dirname(__file__))
13+
314
version = "2.2.1"
415

5-
try:
6-
with open("README") as f:
7-
readme_content = f.read()
8-
except (IOError, Exception):
9-
readme_content = ""
16+
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
17+
long_description = f.read()
1018

1119
setup(name='telesign',
1220
version=version,
13-
description="Telesign SDK",
14-
license="MIT License",
21+
description="TeleSign SDK",
22+
license="MIT",
1523
classifiers=[
1624
"Development Status :: 5 - Production/Stable",
1725
"Intended Audience :: Developers",
1826
"License :: OSI Approved :: MIT License",
1927
"Natural Language :: English",
2028
"Programming Language :: Python",
29+
"Programming Language :: Python :: 2",
2130
"Programming Language :: Python :: 2.6",
2231
"Programming Language :: Python :: 2.7",
2332
"Programming Language :: Python :: 3",
@@ -26,12 +35,13 @@
2635
"Programming Language :: Python :: 3.5",
2736
"Programming Language :: Python :: 3.6",
2837
],
29-
long_description=readme_content,
38+
long_description=long_description,
3039
keywords='telesign, sms, voice, mobile, authentication, identity, messaging',
3140
author='TeleSign Corp.',
3241
author_email='support@telesign.com',
3342
url="https://github.com/telesign/python_telesign",
3443
install_requires=['requests'],
35-
tests_require=['nose', 'mock', 'pytz', 'coverage', 'codecov'],
36-
packages=find_packages(exclude=['test', 'test.*', 'examples', 'examples.*']),
44+
test_suite='nose.collector',
45+
tests_require=['nose', 'pytz'] + mock,
46+
packages=find_packages(exclude=EXCLUDE_FROM_PACKAGES),
3747
)

tests/__init__.py

Whitespace-only changes.
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
from __future__ import unicode_literals
22

3-
from unittest import TestCase
3+
import sys
44
from email.utils import parsedate_tz
5+
from unittest import TestCase
56
from uuid import UUID
6-
from mock import Mock, patch
77

88
from telesign.rest import RestClient
99

10+
if sys.version_info < (3, 3):
11+
from mock import Mock, patch
12+
else:
13+
from unittest.mock import Mock, patch
14+
1015

1116
class TestRest(TestCase):
1217
def setUp(self):
File renamed without changes.

0 commit comments

Comments
 (0)