-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
49 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[run] | ||
source = stripe | ||
omit = | ||
stripe/six.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[flake8] | ||
exclude = | ||
six.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
include CHANGELOG.md LICENSE LONG_DESCRIPTION.rst README.md VERSION tox.ini | ||
include .coveragerc .flake8 CHANGELOG.md LICENSE LONG_DESCRIPTION.rst README.md VERSION pytest.ini tox.ini | ||
recursive-include tests *.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[pytest] | ||
addopts = -p no:warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[aliases] | ||
test=pytest | ||
|
||
[bdist_wheel] | ||
universal = 1 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
import os | ||
import sys | ||
from codecs import open | ||
from os import path | ||
from setuptools import setup, find_packages | ||
from setuptools.command.test import test as TestCommand | ||
|
||
try: | ||
from setuptools import setup | ||
except ImportError: | ||
from distutils.core import setup | ||
|
||
class PyTest(TestCommand): | ||
user_options = [('pytest-args=', 'a', "Arguments to pass into py.test")] | ||
|
||
path, script = os.path.split(sys.argv[0]) | ||
os.chdir(os.path.abspath(path)) | ||
def initialize_options(self): | ||
TestCommand.initialize_options(self) | ||
self.pytest_args = '-n auto' | ||
|
||
with open('LONG_DESCRIPTION.rst') as f: | ||
def run_tests(self): | ||
import shlex | ||
import pytest | ||
errno = pytest.main(shlex.split(self.pytest_args)) | ||
sys.exit(errno) | ||
|
||
|
||
here = path.abspath(path.dirname(__file__)) | ||
|
||
with open(path.join(here, 'LONG_DESCRIPTION.rst'), encoding='utf-8') as f: | ||
long_description = f.read() | ||
|
||
version_contents = {} | ||
with open(os.path.join('stripe', 'version.py')) as f: | ||
with open(path.join(here, 'stripe', 'version.py'), encoding='utf-8') as f: | ||
exec(f.read(), version_contents) | ||
|
||
setup( | ||
|
@@ -26,18 +37,27 @@ | |
author_email='[email protected]', | ||
url='https://github.com/stripe/stripe-python', | ||
license='MIT', | ||
packages=['stripe', 'stripe.api_resources', | ||
'stripe.api_resources.abstract'], | ||
keywords='stripe api payments', | ||
packages=find_packages(exclude=['tests', 'tests.*']), | ||
package_data={'stripe': ['data/ca-certificates.crt']}, | ||
zip_safe=False, | ||
install_requires=[ | ||
'requests >= 0.8.8', | ||
'requests >= 2', | ||
'requests[security] >= 2; python_version < "3.0"', | ||
], | ||
setup_requires=['pytest-runner'], | ||
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", | ||
tests_require=[ | ||
'pytest >= 3.4', | ||
'pytest-mock >= 1.7', | ||
'pytest-xdist >= 1.22', | ||
'pytest-cov >= 2.5', | ||
], | ||
cmdclass={'test': PyTest}, | ||
project_urls={ | ||
'Bug Tracker': 'https://github.com/stripe/stripe-python/issues', | ||
'Documentation': 'https://stripe.com/docs/api/python', | ||
'Source Code': 'https://github.com/stripe/stripe-python', | ||
}, | ||
classifiers=[ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
|
@@ -52,4 +72,5 @@ | |
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
]) | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters