diff --git a/.travis/script b/.travis/script index 8e04d56ba..d6fd9c414 100755 --- a/.travis/script +++ b/.travis/script @@ -3,10 +3,10 @@ set -e if [ "$BUILD" = "lint" ]; then - flake8 aioquic examples tests - isort -c -df -rc aioquic examples tests - black --check --diff aioquic examples tests - mypy aioquic examples + flake8 examples src tests + isort -c -df -rc examples src tests + black --check --diff examples src tests + mypy examples src elif [ "$BUILD" = "sdist" ]; then python3 setup.py sdist if [ -n "$TRAVIS_TAG" ]; then diff --git a/setup.py b/setup.py index 2d55167cd..ec37fd364 100644 --- a/setup.py +++ b/setup.py @@ -31,12 +31,13 @@ "Topic :: Internet :: WWW/HTTP", ], ext_modules=[ - setuptools.Extension("aioquic._buffer", sources=["src/_buffer.c"]), + setuptools.Extension("aioquic._buffer", sources=["src/aioquic/_buffer.c"]), setuptools.Extension( - "aioquic._crypto", libraries=["crypto"], sources=["src/_crypto.c"] + "aioquic._crypto", libraries=["crypto"], sources=["src/aioquic/_crypto.c"] ), ], - package_data={"aioquic": ["py.typed"]}, + package_dir={"": "src"}, + package_data={"aioquic": ["py.typed", "_buffer.pyi", "_crypto.pyi"]}, packages=["aioquic", "aioquic.asyncio", "aioquic.h0", "aioquic.h3", "aioquic.quic"], install_requires=[ "cryptography >= 2.5", diff --git a/aioquic/__init__.py b/src/aioquic/__init__.py similarity index 100% rename from aioquic/__init__.py rename to src/aioquic/__init__.py diff --git a/src/_buffer.c b/src/aioquic/_buffer.c similarity index 100% rename from src/_buffer.c rename to src/aioquic/_buffer.c diff --git a/aioquic/_buffer.pyi b/src/aioquic/_buffer.pyi similarity index 100% rename from aioquic/_buffer.pyi rename to src/aioquic/_buffer.pyi diff --git a/src/_crypto.c b/src/aioquic/_crypto.c similarity index 100% rename from src/_crypto.c rename to src/aioquic/_crypto.c diff --git a/aioquic/_crypto.pyi b/src/aioquic/_crypto.pyi similarity index 100% rename from aioquic/_crypto.pyi rename to src/aioquic/_crypto.pyi diff --git a/aioquic/asyncio/__init__.py b/src/aioquic/asyncio/__init__.py similarity index 100% rename from aioquic/asyncio/__init__.py rename to src/aioquic/asyncio/__init__.py diff --git a/aioquic/asyncio/client.py b/src/aioquic/asyncio/client.py similarity index 100% rename from aioquic/asyncio/client.py rename to src/aioquic/asyncio/client.py diff --git a/aioquic/asyncio/compat.py b/src/aioquic/asyncio/compat.py similarity index 100% rename from aioquic/asyncio/compat.py rename to src/aioquic/asyncio/compat.py diff --git a/aioquic/asyncio/protocol.py b/src/aioquic/asyncio/protocol.py similarity index 100% rename from aioquic/asyncio/protocol.py rename to src/aioquic/asyncio/protocol.py diff --git a/aioquic/asyncio/server.py b/src/aioquic/asyncio/server.py similarity index 100% rename from aioquic/asyncio/server.py rename to src/aioquic/asyncio/server.py diff --git a/aioquic/buffer.py b/src/aioquic/buffer.py similarity index 100% rename from aioquic/buffer.py rename to src/aioquic/buffer.py diff --git a/aioquic/h0/__init__.py b/src/aioquic/h0/__init__.py similarity index 100% rename from aioquic/h0/__init__.py rename to src/aioquic/h0/__init__.py diff --git a/aioquic/h0/connection.py b/src/aioquic/h0/connection.py similarity index 100% rename from aioquic/h0/connection.py rename to src/aioquic/h0/connection.py diff --git a/aioquic/h3/__init__.py b/src/aioquic/h3/__init__.py similarity index 100% rename from aioquic/h3/__init__.py rename to src/aioquic/h3/__init__.py diff --git a/aioquic/h3/connection.py b/src/aioquic/h3/connection.py similarity index 100% rename from aioquic/h3/connection.py rename to src/aioquic/h3/connection.py diff --git a/aioquic/h3/events.py b/src/aioquic/h3/events.py similarity index 100% rename from aioquic/h3/events.py rename to src/aioquic/h3/events.py diff --git a/aioquic/h3/exceptions.py b/src/aioquic/h3/exceptions.py similarity index 100% rename from aioquic/h3/exceptions.py rename to src/aioquic/h3/exceptions.py diff --git a/aioquic/py.typed b/src/aioquic/py.typed similarity index 100% rename from aioquic/py.typed rename to src/aioquic/py.typed diff --git a/aioquic/quic/__init__.py b/src/aioquic/quic/__init__.py similarity index 100% rename from aioquic/quic/__init__.py rename to src/aioquic/quic/__init__.py diff --git a/aioquic/quic/configuration.py b/src/aioquic/quic/configuration.py similarity index 100% rename from aioquic/quic/configuration.py rename to src/aioquic/quic/configuration.py diff --git a/aioquic/quic/connection.py b/src/aioquic/quic/connection.py similarity index 100% rename from aioquic/quic/connection.py rename to src/aioquic/quic/connection.py diff --git a/aioquic/quic/crypto.py b/src/aioquic/quic/crypto.py similarity index 100% rename from aioquic/quic/crypto.py rename to src/aioquic/quic/crypto.py diff --git a/aioquic/quic/events.py b/src/aioquic/quic/events.py similarity index 100% rename from aioquic/quic/events.py rename to src/aioquic/quic/events.py diff --git a/aioquic/quic/logger.py b/src/aioquic/quic/logger.py similarity index 100% rename from aioquic/quic/logger.py rename to src/aioquic/quic/logger.py diff --git a/aioquic/quic/packet.py b/src/aioquic/quic/packet.py similarity index 100% rename from aioquic/quic/packet.py rename to src/aioquic/quic/packet.py diff --git a/aioquic/quic/packet_builder.py b/src/aioquic/quic/packet_builder.py similarity index 100% rename from aioquic/quic/packet_builder.py rename to src/aioquic/quic/packet_builder.py diff --git a/aioquic/quic/rangeset.py b/src/aioquic/quic/rangeset.py similarity index 100% rename from aioquic/quic/rangeset.py rename to src/aioquic/quic/rangeset.py diff --git a/aioquic/quic/recovery.py b/src/aioquic/quic/recovery.py similarity index 100% rename from aioquic/quic/recovery.py rename to src/aioquic/quic/recovery.py diff --git a/aioquic/quic/retry.py b/src/aioquic/quic/retry.py similarity index 100% rename from aioquic/quic/retry.py rename to src/aioquic/quic/retry.py diff --git a/aioquic/quic/stream.py b/src/aioquic/quic/stream.py similarity index 100% rename from aioquic/quic/stream.py rename to src/aioquic/quic/stream.py diff --git a/aioquic/tls.py b/src/aioquic/tls.py similarity index 100% rename from aioquic/tls.py rename to src/aioquic/tls.py