diff --git a/Dockerfile b/Dockerfile index a66579e1..162373c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,34 +1,18 @@ -FROM python:3.8.6-slim-buster as deps -# Set work directory -WORKDIR /home/speedtest +FROM python:3.11-buster as builder -# Copy files -COPY Pipfile . -COPY Pipfile.lock . +RUN pip install poetry==1.8.3 -# Install pipenv -RUN pip install pipenv +ENV POETRY_NO_INTERACTION=1 \ + POETRY_VIRTUALENVS_IN_PROJECT=1 \ + POETRY_VIRTUALENVS_CREATE=1 \ + POETRY_CACHE_DIR=/tmp/poetry_cache -FROM deps as installer -# Set work directory -WORKDIR /home/speedtest +WORKDIR /frameio -# Install deps -RUN pipenv install --system --deploy --ignore-pipfile - -# Copy over the other pieces +COPY README.md README.md +COPY pyproject.toml poetry.lock ./ COPY frameioclient frameioclient -COPY setup.py . -COPY README.md . - -# Install the local frameioclient -RUN pipenv install -e . --skip-lock - -# Copy over scripts and tests -COPY scripts scripts -COPY tests tests -ENV SEGMENT_WRITE_KEY= +RUN --mount=type=cache,target=$POETRY_CACHE_DIR poetry install --without dev -FROM installer as runtime -ENTRYPOINT [ "pipenv", "run", "python", "scripts/benchmark/download.py" ] +ENTRYPOINT [ "poetry", "run", "fiocli" ] diff --git a/poetry.toml b/poetry.toml new file mode 100644 index 00000000..53b35d37 --- /dev/null +++ b/poetry.toml @@ -0,0 +1,3 @@ +[virtualenvs] +create = true +in-project = true diff --git a/pyproject.toml b/pyproject.toml index b0471b7f..714fa857 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,68 @@ +[tool.poetry] +name = "frameioclient" +version = "2.0.1a5" +description='Client library for the Frame.io API' +readme = "README.md" +license='MIT' +homepage = "https://github.com/Frameio/python-frameio-client" +authors = ["Frame.io DevRel "] + +classifiers = [ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'Topic :: Multimedia :: Video', + 'Topic :: Software Development :: Libraries', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', +] + +[tool.poetry.dependencies] +python = "^3.6" +analytics-python = "^1.4.0" +enlighten = "^1.10.2" +importlib-metadata = "^4.11.3" +requests = "^2.27.1" +token-bucket = "^0.3.0" +urllib3 = "^1.26.9" +xxhash = "^3.0.0" +furl = "^2.1.3" +tqdm = "^4.66.2" + +[tool.poetry.dev-dependencies] +bump2version = "^1.0.1" + +# Optional dependencies +Sphinx = { version = "^4.4.0", optional = true } +sphinx-jekyll-builder = { version = "^0.3.0", optional = true } +sphinxcontrib-restbuilder = { version = "^0.3", optional = true } +sphinx-autobuild = { version = "^2021.3.14", optional = true } +contentful_management = { version = "^2.11.0", optional = true } +python-frontmatter = { version = "^1.0.0", optional = true } +sphinx-autodoc-typehints = { version = "^1.17.0", optional = true } +furo = { version = "^2022.3.4", optional = true } +python-dotenv = "^0.19.2" + +[tool.poetry.extras] +docs = [ + "sphinx", + "sphinx-jekyll-builder", + "sphinxcontrib-restbuilder", + "sphinx-autobuild", + "contentful_management", + "python-frontmatter", + "sphinx-autodoc-typehints", + "furo" +] + +[tool.poetry.scripts] +fiocli = 'frameioclient.fiocli:main' + [build-system] requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta:__legacy__" \ No newline at end of file