From a673be281a621188b273cd110bf1631da7e66345 Mon Sep 17 00:00:00 2001 From: Prasanth Date: Wed, 7 Aug 2024 09:52:30 +0000 Subject: [PATCH] fix build errors --- .github/workflows/python-publish.yml | 2 ++ Dockerfile | 11 ++++++----- dothttp/__version__.py | 2 +- poetry.lock | 16 +++++++++++++++- pyproject.toml | 3 ++- 5 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 552202c..6931a59 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -22,6 +22,8 @@ jobs: uses: actions/setup-python@v2 with: python-version: '3.11' + + - uses: Gr1N/setup-poetry@v8 - name: Install dependencies run: | poetry config virtualenvs.create false diff --git a/Dockerfile b/Dockerfile index 877f191..d7b44ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,14 @@ FROM python:3.11 LABEL io.whalebrew.config.networks '["host"]' -ADD requirements.txt /app/ +ADD pyproject.toml /app/ WORKDIR /app -RUN pip install -r requirements.txt +RUN pip install poetry +RUN poetry config virtualenvs.create false +RUN poetry install --all-extras --no-root COPY dothttp /app/dothttp COPY dotextensions /app/dotextensions -COPY setup.py README.md /app/ -RUN ls && python setup.py install -RUN pip install flask flask-cors waitress +COPY README.md /app/ +RUN poetry install ENTRYPOINT ["python"] CMD ["-m", "waitress", "--port", "5000", "dotextensions.server.agent:app"] EXPOSE 5000 diff --git a/dothttp/__version__.py b/dothttp/__version__.py index 86b73fc..516474d 100644 --- a/dothttp/__version__.py +++ b/dothttp/__version__.py @@ -1 +1 @@ -__version__ = "0.0.43a18" +__version__ = "0.0.43a19" diff --git a/poetry.lock b/poetry.lock index fd20655..f8cd409 100644 --- a/poetry.lock +++ b/poetry.lock @@ -373,6 +373,20 @@ Werkzeug = ">=3.0.0" async = ["asgiref (>=3.2)"] dotenv = ["python-dotenv"] +[[package]] +name = "flask-cors" +version = "4.0.1" +description = "A Flask extension adding a decorator for CORS support" +optional = false +python-versions = "*" +files = [ + {file = "Flask_Cors-4.0.1-py2.py3-none-any.whl", hash = "sha256:f2a704e4458665580c074b714c4627dd5a306b333deb9074d0b1794dfa2fb677"}, + {file = "flask_cors-4.0.1.tar.gz", hash = "sha256:eeb69b342142fdbf4766ad99357a7f3876a2ceb77689dc10ff912aac06c389e4"}, +] + +[package.dependencies] +Flask = ">=0.9" + [[package]] name = "idna" version = "3.7" @@ -1196,4 +1210,4 @@ js = [] [metadata] lock-version = "2.0" python-versions = ">=3.8, <3.13" -content-hash = "774065c429b733a6334a67f4e925973e4ea88b134b0e6f93d4ea9e354b13053c" +content-hash = "9b59600d157588148c1e60aca1a1082948dc61fdd023227acdc6eed7bc7dc042" diff --git a/pyproject.toml b/pyproject.toml index 27166fd..3fbbdd8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dothttp-req" -version = "0.0.43a18" +version = "0.0.43a19" description = "Dothttp is Simple http client for testing and development" authors = ["Prasanth "] license = "MIT" @@ -42,6 +42,7 @@ waitress = "3.0.0" flask = "3.0.2" python-magic = "^0.4.27" js2py = "0.74" +flask-cors = "^4.0.1" [tool.poetry.extras] js = ["js2py"]