Skip to content

Commit 48e60f3

Browse files
committed
Update setup configuration and tox
1 parent 8f36f53 commit 48e60f3

File tree

5 files changed

+75
-126
lines changed

5 files changed

+75
-126
lines changed

graphql_ws/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@
77
__version__ = '0.3.1'
88

99

10-
from .base import BaseConnectionContext, BaseSubscriptionServer
11-
12-
__all__ = ['BaseConnectionContext', 'BaseSubscriptionServer']
10+
from .base import BaseConnectionContext, BaseSubscriptionServer # noqa: F401

requirements_dev.txt

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

setup.cfg

Lines changed: 65 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,79 @@
1+
2+
[metadata]
3+
name = graphql-ws
4+
version = 0.3.1
5+
description = Websocket server for GraphQL subscriptions
6+
long_description = file: README.rst, CHANGES.rst
7+
author = Syrus Akbary
8+
author_email = me@syrusakbary.com
9+
url = https://github.com/graphql-python/graphql-ws
10+
keywords = graphql, subscriptions, graphene, websockets
11+
license = MIT
12+
classifiers =
13+
Development Status :: 2 - Pre-Alpha
14+
Intended Audience :: Developers
15+
License :: OSI Approved :: MIT License
16+
Natural Language :: English
17+
Programming Language :: Python :: 2
18+
Programming Language :: Python :: 2.6
19+
Programming Language :: Python :: 2.7
20+
Programming Language :: Python :: 3
21+
Programming Language :: Python :: 3.3
22+
Programming Language :: Python :: 3.4
23+
Programming Language :: Python :: 3.5
24+
Programming Language :: Python :: 3.6
25+
Programming Language :: Python :: 3.7
26+
Programming Language :: Python :: 3.8
27+
28+
[options]
29+
zip_safe = False
30+
include_package_data = True
31+
packages = find:
32+
install_requires =
33+
graphql-core==2.*
34+
35+
[options.packages.find]
36+
include =
37+
graphql_ws
38+
39+
[options.extras_require]
40+
maintainer =
41+
bumpversion>=0.5.3
42+
wheel>=0.33.6
43+
PyYAML>=5.3,<6
44+
dev =
45+
flake8>=3.7,<4
46+
tox>=3,<4
47+
pytest>=3.2.5,<4
48+
Sphinx>=1.8,<2
49+
coverage>=5.0,<6
50+
test =
51+
pytest>=3.2.5,<4
52+
graphene>=2.0,<3
53+
54+
55+
[bdist_wheel]
56+
universal = 1
57+
158
[bumpversion]
259
current_version = 0.3.1
360
commit = True
461
tag = True
562

6-
[bump2version:file:setup.py]
63+
[bump2version:file:setup.cfg]
764
search = version="{current_version}"
865
replace = version="{new_version}"
966

1067
[bump2version:file:graphql_ws/__init__.py]
1168
search = __version__ = '{current_version}'
1269
replace = __version__ = '{new_version}'
1370

14-
[bdist_wheel]
15-
universal = 1
16-
1771
[flake8]
18-
exclude = docs
72+
exclude =
73+
.tox
74+
.git
75+
.eggs
76+
__pycache__
77+
docs
1978
max-line-length = 88
20-
21-
[aliases]
22-
test = pytest
23-
# Define setup.py command aliases here
79+
ignore = W503

setup.py

Lines changed: 2 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,4 @@
11
#!/usr/bin/env python
2-
# -*- coding: utf-8 -*-
2+
from setuptools import setup
33

4-
"""The setup script."""
5-
6-
from setuptools import setup, find_packages
7-
8-
with open("README.rst") as readme_file:
9-
readme = readme_file.read()
10-
11-
readme = ""
12-
13-
with open("HISTORY.rst") as history_file:
14-
history = history_file.read()
15-
16-
requirements = [
17-
"graphql-core>=2.0,<3",
18-
# TODO: put package requirements here
19-
]
20-
21-
setup_requirements = [
22-
"pytest-runner",
23-
# TODO(graphql-python): put setup requirements (distutils extensions,
24-
# etc.) here
25-
]
26-
27-
test_requirements = [
28-
"pytest",
29-
# TODO: put package test requirements here
30-
]
31-
32-
setup(
33-
name="graphql-ws",
34-
version="0.3.1",
35-
description="Websocket server for GraphQL subscriptions",
36-
long_description=readme + "\n\n" + history,
37-
author="Syrus Akbary",
38-
author_email="me@syrusakbary.com",
39-
url="https://github.com/graphql-python/graphql-ws",
40-
packages=find_packages(include=["graphql_ws"]),
41-
include_package_data=True,
42-
install_requires=requirements,
43-
license="MIT license",
44-
zip_safe=False,
45-
keywords=["graphql", "subscriptions", "graphene", "websockets"],
46-
classifiers=[
47-
"Development Status :: 2 - Pre-Alpha",
48-
"Intended Audience :: Developers",
49-
"License :: OSI Approved :: MIT License",
50-
"Natural Language :: English",
51-
"Programming Language :: Python :: 2",
52-
"Programming Language :: Python :: 2.6",
53-
"Programming Language :: Python :: 2.7",
54-
"Programming Language :: Python :: 3",
55-
"Programming Language :: Python :: 3.3",
56-
"Programming Language :: Python :: 3.4",
57-
"Programming Language :: Python :: 3.5",
58-
"Programming Language :: Python :: 3.6",
59-
"Programming Language :: Python :: 3.7",
60-
"Programming Language :: Python :: 3.8"
61-
],
62-
test_suite="tests",
63-
tests_require=test_requirements,
64-
setup_requires=setup_requirements,
65-
)
4+
setup()

tox.ini

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,17 @@ envlist = py27, py35, py36, py37, py38, flake8
33

44
[travis]
55
python =
6-
3.8: py38
6+
3.8: py38, flake8
77
3.7: py37
88
3.6: py36
99
3.5: py35
1010
2.7: py27
1111

12-
[testenv:flake8]
13-
basepython=python
14-
deps=flake8>=3.7,<4
15-
commands=flake8 graphql_ws
16-
1712
[testenv]
18-
setenv =
19-
PYTHONPATH = {toxinidir}
20-
deps =
21-
-r{toxinidir}/requirements_dev.txt
22-
commands =
23-
pip install -U pip
24-
pytest --basetemp={envtmpdir}
25-
26-
[testenv:py35]
27-
deps =
28-
-r{toxinidir}/requirements_dev.txt
29-
aiohttp>=3.6,<4
30-
31-
[testenv:py36]
32-
deps =
33-
-r{toxinidir}/requirements_dev.txt
34-
aiohttp>=3.6,<4
13+
extras = test
14+
commands = pytest
3515

36-
[testenv:py37]
37-
deps =
38-
-r{toxinidir}/requirements_dev.txt
39-
aiohttp>=3.6,<4
40-
41-
[testenv:py38]
42-
deps =
43-
-r{toxinidir}/requirements_dev.txt
44-
aiohttp>=3.6,<4
45-
46-
; If you want to make tox run the tests with the same versions, create a
47-
; requirements.txt with the pinned versions and uncomment the following lines:
48-
; deps =
49-
; -r{toxinidir}/requirements.txt
16+
[testenv:flake8]
17+
skip_install = true
18+
deps = flake8
19+
commands = flake8 graphql_ws

0 commit comments

Comments
 (0)