From ff80d50f9c27f730b98667d71561dbcccbfbfdca Mon Sep 17 00:00:00 2001 From: Yurii Puchkov Date: Wed, 27 Dec 2023 19:21:39 -0700 Subject: [PATCH] fix: add resource to the PIP package --- .github/workflows/build.yaml | 2 +- Dockerfile | 2 +- pyproject.toml | 7 +++++-- requirements-dev.txt | 2 -- {scripts => src/pygitver/scripts}/git/hooks/commit-msg | 0 {scripts => src/pygitver/scripts}/install.sh | 0 6 files changed, 7 insertions(+), 6 deletions(-) rename {scripts => src/pygitver/scripts}/git/hooks/commit-msg (100%) rename {scripts => src/pygitver/scripts}/install.sh (100%) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 475be23..3eae78d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -99,8 +99,8 @@ jobs: shell: bash run: | set -x + sudo apt-get -y install twine pip install -r requirements-build.txt python -m build - sudo apt-get -y install twine twine check dist/* twine upload --skip-existing -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} dist/* --verbose diff --git a/Dockerfile b/Dockerfile index c9b862a..fa55a6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,7 @@ RUN apk add --no-cache git openssh # Copy application code and COPY ./src/pygitver/templates /pygitver/templates -COPY ./scripts /pygitver/scripts +COPY ./src/pygitver/scripts /pygitver/scripts COPY --from=build /opt/venv /opt/venv WORKDIR /app diff --git a/pyproject.toml b/pyproject.toml index e4befdf..34daa56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "pygitver" -version = "0.0.3-dev" +version = "0.0.4-dev" authors = [ { name="Yurii Puchkov", email="panpuchkov@gmail.com" }, ] @@ -34,5 +34,8 @@ pygitver = "pygitver.pygitver:main" url = "https://github.com/panpuchkov/pygitver" +[tool.setuptools.packages.find] +where = ["src"] + [tool.setuptools.package-data] -pygitver = ["*.py", "*.tmpl"] +"*" = ["*"] diff --git a/requirements-dev.txt b/requirements-dev.txt index abc5b38..869b660 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,5 +1,3 @@ -Jinja2 - tox pytest black diff --git a/scripts/git/hooks/commit-msg b/src/pygitver/scripts/git/hooks/commit-msg similarity index 100% rename from scripts/git/hooks/commit-msg rename to src/pygitver/scripts/git/hooks/commit-msg diff --git a/scripts/install.sh b/src/pygitver/scripts/install.sh similarity index 100% rename from scripts/install.sh rename to src/pygitver/scripts/install.sh