Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3.9']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy3.10']

steps:
- uses: actions/checkout@v3
Expand All @@ -28,8 +28,7 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
Pipfile
setup.py
pyproject.toml
- uses: isbang/compose-action@v1.4.1
with:
compose-file: "./docker-compose.yml"
Expand Down
5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

19 changes: 8 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
#!/usr/bin/make -f

install-dev-requirements:
pip install -U pip
pip install pipenv
pip install -U pip hatch

install-test-requirements:
pipenv install --dev
pipenv run python -c "import pipfile; pf = pipfile.load('Pipfile'); print('\n'.join(package+version if version != '*' else package for package, version in pf.data['default'].items()))" > requirements.txt
pip install .[test]

services-up:
pipenv run docker-compose up -d
docker-compose up -d

services-down:
pipenv run docker-compose down --remove-orphans
docker-compose down --remove-orphans

test-python:
@echo "Running Python tests"
pipenv run wait-for-it --service httpbin.local:443 --service localhost:6379 --timeout 5 -- pipenv run python run_tests.py || exit 1
wait-for-it --service httpbin.local:443 --service localhost:6379 --timeout 5 -- python run_tests.py || exit 1
@echo ""

lint-python:
@echo "Linting Python files"
pipenv run flake8 --ignore=E501,E731,W503 --exclude=.git,compat.py --per-file-ignores='mocket/async_mocket.py:E999' mocket
flake8 --ignore=E501,E731,W503 --exclude=.git,compat.py --per-file-ignores='mocket/async_mocket.py:E999' mocket
@echo ""

setup: develop
Expand All @@ -35,9 +33,8 @@ safetest:
export SKIP_TRUE_REDIS=1; export SKIP_TRUE_HTTP=1; make test

publish: install-test-requirements
pipenv run python -m build --sdist .
pipenv run twine upload --repository mocket dist/mocket-$(shell python -c 'import mocket; print(mocket.__version__)').tar.gz
pipenv run anaconda upload dist/mocket-$(shell python -c 'import mocket; print(mocket.__version__)').tar.gz
python -m build --sdist .
twine upload --repository mocket dist/mocket-$(shell python -c 'import mocket; print(mocket.__version__)').tar.gz

clean:
rm -rf *.egg-info dist/ requirements.txt Pipfile.lock
Expand Down
37 changes: 0 additions & 37 deletions Pipfile

This file was deleted.

80 changes: 80 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
requires-python = ">=3.5"
name = "mocket"
description = "Socket Mock Framework - for all kinds of socket animals, web-clients included - with gevent/asyncio/SSL support"
readme = { file = "README.rst", content-type = "text/x-rst" }
license = { file = "LICENSE" }
authors = [{ name = "Giorgio Salluzzo", email = "giorgio.salluzzo@gmail.com" }]
urls = { github = "https://github.com/mindflayer/python-mocket" }
classifiers = [
"Development Status :: 6 - Mature",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development",
"Topic :: Software Development :: Testing",
"License :: OSI Approved :: BSD License",
]
dependencies = [
"python-magic>=0.4.5",
"decorator>=4.0.0",
"urllib3>=1.25.3",
"httptools",
]
dynamic = ["version"]

[project.optional-dependencies]
test = [
"pre-commit",
"pytest",
"pytest-cov",
"pytest-asyncio",
"asgiref",
"requests",
"redis",
"gevent",
"sure",
"pook",
"flake8",
"xxhash",
"aiohttp",
"httpx",
"pipfile",
"build",
"twine",
"fastapi",
"wait-for-it",
]
speedups = [
'xxhash;platform_python_implementation=="CPython"',
'xxhash-cffi;platform_python_implementation=="PyPy"',
]
pook = [
"pook>=0.2.1",
]

[tool.hatch.version]
path = "mocket/__init__.py"

[tool.hatch.build]
ignore-vcs = true

[tool.hatch.build.targets.sdist]
include = [
"run_tests.py",
"README.rst",
"LICENSE",
"pyproject.toml",
"mocket/",
"tests/",
]
67 changes: 0 additions & 67 deletions setup.py

This file was deleted.