Skip to content

Commit

Permalink
Improved project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Jun 7, 2021
1 parent 82cc2cb commit 98c7ac2
Show file tree
Hide file tree
Showing 26 changed files with 50 additions and 63 deletions.
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
build-backend = "setuptools.build_meta"
39 changes: 39 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[metadata]
name = python-socketio
version = 5.3.1.dev0
author = Miguel Grinberg
author_email = miguel.grinberg@gmail.com
description = Socket.IO server and client for Python
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/miguelgrinberg/python-socketio
project_urls =
Bug Tracker = https://github.com/miguelgrinberg/python-socketio/issues
classifiers =
Environment :: Web Environment
Intended Audience :: Developers
Programming Language :: Python :: 3
License :: OSI Approved :: MIT License
Operating System :: OS Independent

[options]
zip_safe = False
include_package_data = True
package_dir =
= src
packages = find:
python_requires = >=3.6
install_requires =
bidict >= 0.21.0
python-engineio >= 4.1.0

[options.packages.find]
where = src

[options.extras_require]
client =
requests >= 2.21.0
websocket-client >= 0.54.0
asyncio_client =
aiohttp >= 3.4
websockets >= 7.0
61 changes: 2 additions & 59 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,60 +1,3 @@
"""
python-socketio
---------------
import setuptools

Socket.IO server.
"""
import re
import sys
from setuptools import setup

with open('socketio/__init__.py', 'r') as f:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
f.read(), re.MULTILINE).group(1)

with open('README.md', 'r') as f:
long_description = f.read()

setup(
name='python-socketio',
version=version,
url='http://github.com/miguelgrinberg/python-socketio/',
license='MIT',
author='Miguel Grinberg',
author_email='miguelgrinberg50@gmail.com',
description='Socket.IO server',
long_description=long_description,
long_description_content_type='text/markdown',
packages=['socketio'],
zip_safe=False,
include_package_data=True,
platforms='any',
install_requires=[
'bidict>=0.21.0',
'python-engineio>=4.1.0',
],
extras_require={
'client': [
'requests>=2.21.0',
'websocket-client>=0.54.0',
],
'asyncio_client': [
'aiohttp>=3.4',
'websockets>=7.0',
]
},
tests_require=[
'mock',
],
test_suite='tests' if sys.version_info >= (3, 0) else 'tests.common',
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)
setuptools.setup()
4 changes: 1 addition & 3 deletions socketio/__init__.py → src/socketio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
AsyncRedisManager = None
AsyncAioPikaManager = None

__version__ = '5.3.1dev'

__all__ = ['__version__', 'Client', 'Server', 'BaseManager', 'PubSubManager',
__all__ = ['Client', 'Server', 'BaseManager', 'PubSubManager',
'KombuManager', 'RedisManager', 'ZmqManager', 'KafkaManager',
'Namespace', 'ClientNamespace', 'WSGIApp', 'Middleware']
if AsyncServer is not None: # pragma: no cover
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ python =

[testenv]
commands=
pip install -e .
pytest -p no:logging --cov=socketio --cov-branch --cov-report=term-missing
deps=
pytest
Expand All @@ -21,7 +22,7 @@ deps=
deps=
flake8
commands=
flake8 --exclude=".*" --ignore=W503,E402,E722 socketio tests
flake8 --exclude=".*" --ignore=W503,E402,E722 src/socketio tests

[testenv:docs]
changedir=docs
Expand Down

0 comments on commit 98c7ac2

Please sign in to comment.