diff --git a/microdot_asyncio.py b/microdot-asyncio/microdot_asyncio.py similarity index 100% rename from microdot_asyncio.py rename to microdot-asyncio/microdot_asyncio.py diff --git a/microdot-asyncio/setup.py b/microdot-asyncio/setup.py new file mode 100755 index 0000000..bdee4d4 --- /dev/null +++ b/microdot-asyncio/setup.py @@ -0,0 +1,36 @@ +""" +Microdot-AsyncIO +---------------- + +AsyncIO support for the Microdot web framework. +""" +from setuptools import setup + +setup( + name='microdot-asyncio', + version='0.1.0', + url='http://github.com/miguelgrinberg/microdot/', + license='MIT', + author='Miguel Grinberg', + author_email='miguel.grinberg@gmail.com', + description='AsyncIO support for the Microdot web framework', + long_description=__doc__, + py_modules=['microdot_asyncio'], + include_package_data=True, + platforms='any', + install_requires=[ + 'microdot', + 'micropython-uasyncio;implementation_name=="micropython"' + ], + classifiers=[ + 'Environment :: Web Environment', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: Implementation :: MicroPython', + 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', + 'Topic :: Software Development :: Libraries :: Python Modules' + ] +) diff --git a/microdot.py b/microdot/microdot.py similarity index 100% rename from microdot.py rename to microdot/microdot.py diff --git a/setup.py b/microdot/setup.py similarity index 100% rename from setup.py rename to microdot/setup.py diff --git a/run_tests.py b/run_tests.py index 4b12711..e676952 100644 --- a/run_tests.py +++ b/run_tests.py @@ -1,5 +1,8 @@ import sys -sys.path.append('tests/libs') + +sys.path.insert(0, 'microdot') +sys.path.insert(1, 'microdot-asyncio') +sys.path.insert(2, 'tests/libs') import unittest diff --git a/tests/__init__.py b/tests/__init__.py index 40eaf3e..d521b1d 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,8 +1,8 @@ -from tests.test_request import TestRequest -from tests.test_response import TestResponse -from tests.test_url_pattern import TestURLPattern -from tests.test_microdot import TestMicrodot +from tests.microdot.test_request import TestRequest +from tests.microdot.test_response import TestResponse +from tests.microdot.test_url_pattern import TestURLPattern +from tests.microdot.test_microdot import TestMicrodot -from tests.test_request_asyncio import TestRequestAsync -from tests.test_response_asyncio import TestResponseAsync -from tests.test_microdot_asyncio import TestMicrodotAsync +from tests.microdot_asyncio.test_request_asyncio import TestRequestAsync +from tests.microdot_asyncio.test_response_asyncio import TestResponseAsync +from tests.microdot_asyncio.test_microdot_asyncio import TestMicrodotAsync diff --git a/tests/microdot/__init__.py b/tests/microdot/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_microdot.py b/tests/microdot/test_microdot.py similarity index 100% rename from tests/test_microdot.py rename to tests/microdot/test_microdot.py diff --git a/tests/test_request.py b/tests/microdot/test_request.py similarity index 100% rename from tests/test_request.py rename to tests/microdot/test_request.py diff --git a/tests/test_response.py b/tests/microdot/test_response.py similarity index 100% rename from tests/test_response.py rename to tests/microdot/test_response.py diff --git a/tests/test_url_pattern.py b/tests/microdot/test_url_pattern.py similarity index 100% rename from tests/test_url_pattern.py rename to tests/microdot/test_url_pattern.py diff --git a/tests/microdot_asyncio/__init__.py b/tests/microdot_asyncio/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_microdot_asyncio.py b/tests/microdot_asyncio/test_microdot_asyncio.py similarity index 100% rename from tests/test_microdot_asyncio.py rename to tests/microdot_asyncio/test_microdot_asyncio.py diff --git a/tests/test_request_asyncio.py b/tests/microdot_asyncio/test_request_asyncio.py similarity index 100% rename from tests/test_request_asyncio.py rename to tests/microdot_asyncio/test_request_asyncio.py diff --git a/tests/test_response_asyncio.py b/tests/microdot_asyncio/test_response_asyncio.py similarity index 100% rename from tests/test_response_asyncio.py rename to tests/microdot_asyncio/test_response_asyncio.py diff --git a/tox.ini b/tox.ini index 21504c7..0e53f9c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,12 @@ [tox] envlist=flake8,py35,py36,py37,upy +skipsdist=True skip_missing_interpreters=True [testenv] commands= + pip install -e microdot + pip install -e microdot-asyncio coverage run --branch --include="microdot*.py" -m unittest tests coverage report --show-missing coverage erase @@ -19,7 +22,7 @@ basepython= deps= flake8 commands= - flake8 --exclude=tests/unittest.py --exclude tests/libs microdot.py tests + flake8 --exclude tests/libs microdot microdot-asyncio tests [testenv:upy] whitelist_externals=sh