From 72cdc318f2b28a20f21d3b6f6c024ace2b0d4697 Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Thu, 18 Jun 2020 19:16:21 +0200 Subject: [PATCH 1/8] Last changes broke the setup(). --- .gitignore | 2 +- Makefile | 2 +- Pipfile | 2 ++ mocket/__init__.py | 2 +- setup.py | 16 ++++------------ 5 files changed, 9 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index beb8128a..b2811d3c 100644 --- a/.gitignore +++ b/.gitignore @@ -27,5 +27,5 @@ doc/build .coverage shippable .pytest_cache/ -Pipfile.lock .vscode/ +requirements.txt diff --git a/Makefile b/Makefile index 70fda1e1..c175a1f4 100644 --- a/Makefile +++ b/Makefile @@ -25,8 +25,8 @@ safetest: export SKIP_TRUE_REDIS=1; export SKIP_TRUE_HTTP=1; make test publish: + pipenv lock -r > requirements.txt python setup.py sdist - pipenv install --dev twine twine upload dist/mocket-$(shell python -c 'import mocket; print(mocket.__version__)')*.* pipenv install --dev anaconda-client anaconda upload dist/mocket-$(shell python -c 'import mocket; print(mocket.__version__)').tar.gz diff --git a/Pipfile b/Pipfile index f66291f2..88241c55 100644 --- a/Pipfile +++ b/Pipfile @@ -22,6 +22,8 @@ gevent = "*" sure = "*" pook = "*" flake8 = "*" +twine = "*" +anaconda-client = "*" [requires] python_version = "3.8" diff --git a/mocket/__init__.py b/mocket/__init__.py index 10526f08..c32d142b 100644 --- a/mocket/__init__.py +++ b/mocket/__init__.py @@ -7,4 +7,4 @@ __all__ = ("mocketize", "Mocket", "MocketEntry", "Mocketizer") -__version__ = "3.8.5" +__version__ = "3.8.6" diff --git a/setup.py b/setup.py index cb3367b5..eb91a03e 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,5 @@ import io import os -import subprocess import sys from setuptools import find_packages, setup @@ -9,15 +8,9 @@ major, minor = sys.version_info[:2] - -def list_requirements(dev=False): - command = "pipenv lock -r" - if dev: - command += " --dev" - return ( - subprocess.check_output(command, shell=True).decode("ascii").split("\n")[1:-1] - ) - +install_requires = io.open( + os.path.join(os.path.dirname(__file__), "requirements.txt") +).readlines() pook_requires = ("pook>=0.2.1",) exclude_packages = ("tests", "tests.*") @@ -41,14 +34,13 @@ def read_version(package): with gevent/asyncio/SSL support", long_description=io.open("README.rst", encoding="utf-8").read(), packages=find_packages(exclude=exclude_packages), - install_requires=list_requirements(), + install_requires=install_requires, setup_requires=["pipenv"], extras_require={ "speedups": [ 'xxhash;platform_python_implementation=="CPython"', 'xxhash-cffi;platform_python_implementation=="PyPy"', ], - "tests": list_requirements(dev=True), "dev": [], "pook": pook_requires, # plugins version supporting mocket.plugins.pook.MocketEngine }, From b3448443ace28bf633ffa8e78e9d9829540609d5 Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Thu, 18 Jun 2020 19:18:43 +0200 Subject: [PATCH 2/8] Last changes broke the setup(). Reverting line. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b2811d3c..c1979df9 100644 --- a/.gitignore +++ b/.gitignore @@ -28,4 +28,5 @@ doc/build shippable .pytest_cache/ .vscode/ +Pipfile.lock requirements.txt From 44a93686a598d217ac2962250e13c696eca254ac Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Thu, 18 Jun 2020 19:20:00 +0200 Subject: [PATCH 3/8] Last changes broke the setup(). Removing line. --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index c175a1f4..160c1ac3 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,6 @@ publish: pipenv lock -r > requirements.txt python setup.py sdist twine upload dist/mocket-$(shell python -c 'import mocket; print(mocket.__version__)')*.* - pipenv install --dev anaconda-client anaconda upload dist/mocket-$(shell python -c 'import mocket; print(mocket.__version__)').tar.gz clean: From 5d48cde06bdb94dc21e23cce599e2f14c5dcd669 Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Thu, 18 Jun 2020 19:30:17 +0200 Subject: [PATCH 4/8] Last changes broke the setup(). --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 160c1ac3..3eaf2ebe 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,8 @@ install-dev-requirements: pip install pipenv==2020.6.2 - pipenv lock + pipenv lock --dev + pipenv lock -r > requirements.txt install-test-requirements: pipenv install --dev @@ -25,7 +26,6 @@ safetest: export SKIP_TRUE_REDIS=1; export SKIP_TRUE_HTTP=1; make test publish: - pipenv lock -r > requirements.txt python setup.py sdist twine upload dist/mocket-$(shell python -c 'import mocket; print(mocket.__version__)')*.* anaconda upload dist/mocket-$(shell python -c 'import mocket; print(mocket.__version__)').tar.gz From 9143ad86535ad0f1294964772f3698711a0c72a0 Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Thu, 18 Jun 2020 19:53:01 +0200 Subject: [PATCH 5/8] Last changes broke the setup(). --- Makefile | 2 +- runtests.py | 4 ++-- setup.py | 10 +++++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 3eaf2ebe..d5955955 100644 --- a/Makefile +++ b/Makefile @@ -3,9 +3,9 @@ install-dev-requirements: pip install pipenv==2020.6.2 pipenv lock --dev - pipenv lock -r > requirements.txt install-test-requirements: + pipenv lock -r > requirements.txt pipenv install --dev test-python: diff --git a/runtests.py b/runtests.py index 6e794976..aec7ee89 100644 --- a/runtests.py +++ b/runtests.py @@ -21,7 +21,7 @@ def runtests(args=None): extras += ["aiohttp", "async_timeout"] - os.system("pipenv install --dev {}".format(" ".join(extras))) + os.system("pipenv run pip install --dev {}".format(" ".join(extras))) if not any(a for a in args[1:] if not a.startswith("-")): args.append("tests/main") @@ -31,7 +31,7 @@ def runtests(args=None): args.append("tests/tests35") if major == 3 and minor >= 8: - args.append('tests/tests38') + args.append("tests/tests38") sys.exit(pytest.main(args)) diff --git a/setup.py b/setup.py index eb91a03e..458d3336 100644 --- a/setup.py +++ b/setup.py @@ -8,9 +8,13 @@ major, minor = sys.version_info[:2] -install_requires = io.open( - os.path.join(os.path.dirname(__file__), "requirements.txt") -).readlines() +install_requires = [ + line + for line in io.open( + os.path.join(os.path.dirname(__file__), "requirements.txt") + ).readlines() + if not line.startswith("-i") +] pook_requires = ("pook>=0.2.1",) exclude_packages = ("tests", "tests.*") From 80670b8632e359670875e8d9860750712007c4dd Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Thu, 18 Jun 2020 20:04:48 +0200 Subject: [PATCH 6/8] Last changes broke the setup(). --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index d5955955..d9958449 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,6 @@ install-dev-requirements: pip install pipenv==2020.6.2 - pipenv lock --dev install-test-requirements: pipenv lock -r > requirements.txt From cae5dc99c4bc8ce50d461df2853f4dda333ea453 Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Thu, 18 Jun 2020 20:06:24 +0200 Subject: [PATCH 7/8] Last changes broke the setup(). --- runtests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtests.py b/runtests.py index aec7ee89..d8a4cb0b 100644 --- a/runtests.py +++ b/runtests.py @@ -21,7 +21,7 @@ def runtests(args=None): extras += ["aiohttp", "async_timeout"] - os.system("pipenv run pip install --dev {}".format(" ".join(extras))) + os.system("pipenv run pip install {}".format(" ".join(extras))) if not any(a for a in args[1:] if not a.startswith("-")): args.append("tests/main") From bf1d613b45e7cc4b8d7c6b69ec60a7613d50aaf5 Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Thu, 18 Jun 2020 20:32:16 +0200 Subject: [PATCH 8/8] Last changes broke the setup(). --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d9958449..b43f1dc5 100644 --- a/Makefile +++ b/Makefile @@ -17,14 +17,14 @@ lint-python: flake8 --ignore=E501,E731,W503 --exclude=.git,compat.py --per-file-ignores='mocket/async_mocket.py:E999' mocket @echo "" -develop: install-dev-requirements install-test-requirements +develop: install-dev-requirements install-test-requirements test: lint-python test-python safetest: export SKIP_TRUE_REDIS=1; export SKIP_TRUE_HTTP=1; make test -publish: +publish: install-test-requirements python setup.py sdist twine upload dist/mocket-$(shell python -c 'import mocket; print(mocket.__version__)')*.* anaconda upload dist/mocket-$(shell python -c 'import mocket; print(mocket.__version__)').tar.gz