diff --git a/pyproject.toml b/pyproject.toml index cf2ac337..005e1170 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,8 +59,13 @@ dev = [ "mypy>=1.8.0; python_version >= '3.8'", "pre-commit>=2.6.0", ] +# This one is a bit special and cannot depend on other features, +# because if it depends on `g2p[api]` then we end up with +# `g2p==SOMEVERSION` in requirements.txt and we DO NOT want that to +# happen. +# See https://github.com/jazzband/pip-tools/issues/2002 +# See https://github.com/juftin/hatch-pip-compile/issues/78 prod = [ - "g2p[api]", "gunicorn>=21.1.0", ] docs = [ @@ -125,10 +130,11 @@ routes = "flask --app g2p.app routes" [tool.hatch.envs.prod] template = "api" +features = [ "api", "prod" ] type = "pip-compile" python = "3.10" lock-filename = "requirements.txt" -features = [ "prod" ] +pip-compile-verbose = false [tool.hatch.envs.prod.scripts] serve = "gunicorn --worker-class eventlet -w 1 g2p.app:APP --no-sendfile" diff --git a/requirements.txt b/requirements.txt index cf42bb17..f8360643 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,14 @@ # # - click>=8.0.4 # - coloredlogs>=15.0.1 +# - networkx>=2.6 +# - openpyxl +# - panphon>=0.19 +# - pydantic>=2.3 +# - pyyaml>=5.2 +# - regex +# - text-unidecode +# - tqdm # - eventlet!=0.36.0,>=0.33.0 # - flask-cors>=3.0.9 # - flask-restful>=0.3.9 @@ -10,16 +18,8 @@ # - flask-talisman>=0.7.0 # - flask; python_version >= "3.8" # - flask<2.3; python_version < "3.8" -# - networkx>=2.6 -# - openpyxl -# - panphon>=0.19 -# - pydantic>=2.3 # - python-engineio>=4.0.0 # - python-socketio>=5.0.0 -# - pyyaml>=5.2 -# - regex -# - text-unidecode -# - tqdm # - gunicorn>=21.1.0 # @@ -43,7 +43,7 @@ editdistance==0.8.1 # via panphon et-xmlfile==1.1.0 # via openpyxl -eventlet==0.35.2 +eventlet==0.36.1 # via hatch.envs.prod flask==3.0.2 ; python_version >= "3.8" # via