Skip to content

Commit c0ff37c

Browse files
authored
Last changes broke the setup() (#118)
1 parent 1081996 commit c0ff37c

6 files changed

Lines changed: 18 additions & 21 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ doc/build
2727
.coverage
2828
shippable
2929
.pytest_cache/
30-
Pipfile.lock
3130
.vscode/
31+
Pipfile.lock
32+
requirements.txt

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
install-dev-requirements:
44
pip install pipenv==2020.6.2
5-
pipenv lock
65

76
install-test-requirements:
7+
pipenv lock -r > requirements.txt
88
pipenv install --dev
99

1010
test-python:
@@ -17,18 +17,16 @@ lint-python:
1717
flake8 --ignore=E501,E731,W503 --exclude=.git,compat.py --per-file-ignores='mocket/async_mocket.py:E999' mocket
1818
@echo ""
1919

20-
develop: install-dev-requirements install-test-requirements
20+
develop: install-dev-requirements install-test-requirements
2121

2222
test: lint-python test-python
2323

2424
safetest:
2525
export SKIP_TRUE_REDIS=1; export SKIP_TRUE_HTTP=1; make test
2626

27-
publish:
27+
publish: install-test-requirements
2828
python setup.py sdist
29-
pipenv install --dev twine
3029
twine upload dist/mocket-$(shell python -c 'import mocket; print(mocket.__version__)')*.*
31-
pipenv install --dev anaconda-client
3230
anaconda upload dist/mocket-$(shell python -c 'import mocket; print(mocket.__version__)').tar.gz
3331

3432
clean:

Pipfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ gevent = "*"
2222
sure = "*"
2323
pook = "*"
2424
flake8 = "*"
25+
twine = "*"
26+
anaconda-client = "*"
2527

2628
[requires]
2729
python_version = "3.8"

mocket/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77

88
__all__ = ("mocketize", "Mocket", "MocketEntry", "Mocketizer")
99

10-
__version__ = "3.8.5"
10+
__version__ = "3.8.6"

runtests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def runtests(args=None):
2121

2222
extras += ["aiohttp", "async_timeout"]
2323

24-
os.system("pipenv install --dev {}".format(" ".join(extras)))
24+
os.system("pipenv run pip install {}".format(" ".join(extras)))
2525

2626
if not any(a for a in args[1:] if not a.startswith("-")):
2727
args.append("tests/main")
@@ -31,7 +31,7 @@ def runtests(args=None):
3131
args.append("tests/tests35")
3232

3333
if major == 3 and minor >= 8:
34-
args.append('tests/tests38')
34+
args.append("tests/tests38")
3535

3636
sys.exit(pytest.main(args))
3737

setup.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import io
22
import os
3-
import subprocess
43
import sys
54

65
from setuptools import find_packages, setup
@@ -9,15 +8,13 @@
98

109
major, minor = sys.version_info[:2]
1110

12-
13-
def list_requirements(dev=False):
14-
command = "pipenv lock -r"
15-
if dev:
16-
command += " --dev"
17-
return (
18-
subprocess.check_output(command, shell=True).decode("ascii").split("\n")[1:-1]
19-
)
20-
11+
install_requires = [
12+
line
13+
for line in io.open(
14+
os.path.join(os.path.dirname(__file__), "requirements.txt")
15+
).readlines()
16+
if not line.startswith("-i")
17+
]
2118

2219
pook_requires = ("pook>=0.2.1",)
2320
exclude_packages = ("tests", "tests.*")
@@ -41,14 +38,13 @@ def read_version(package):
4138
with gevent/asyncio/SSL support",
4239
long_description=io.open("README.rst", encoding="utf-8").read(),
4340
packages=find_packages(exclude=exclude_packages),
44-
install_requires=list_requirements(),
41+
install_requires=install_requires,
4542
setup_requires=["pipenv"],
4643
extras_require={
4744
"speedups": [
4845
'xxhash;platform_python_implementation=="CPython"',
4946
'xxhash-cffi;platform_python_implementation=="PyPy"',
5047
],
51-
"tests": list_requirements(dev=True),
5248
"dev": [],
5349
"pook": pook_requires, # plugins version supporting mocket.plugins.pook.MocketEngine
5450
},

0 commit comments

Comments
 (0)