11import io
22import os
3- import subprocess
43import sys
54
65from setuptools import find_packages , setup
98
109major , 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
2219pook_requires = ("pook>=0.2.1" ,)
2320exclude_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