From 38d6a7c811929784d7f53e72382631d29ef47725 Mon Sep 17 00:00:00 2001 From: jonathanzopes Date: Mon, 15 Aug 2022 09:14:08 +0200 Subject: [PATCH 1/4] Add publish step to private pypi. --- .github/workflows/ci_cd.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 9772daff3..8e809026e 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -90,7 +90,7 @@ jobs: build: - name: Build library + name: Build and publish library runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -104,3 +104,10 @@ jobs: python -m pip install -r requirements/requirements_build.txt python -m build python -m twine check dist/* + - name: Upload to private PyPi + run: | + python -m twine upload --verbose --skip-existing dist/**/*.whl + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }} + TWINE_REPOSITORY_URL: https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/upload From e90bd58854b24861545cad5063ad824e7836770c Mon Sep 17 00:00:00 2001 From: jonathanzopes Date: Mon, 15 Aug 2022 13:11:32 +0200 Subject: [PATCH 2/4] Do not run tests and only build wheel. --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 8e809026e..21653c13b 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -102,7 +102,7 @@ jobs: run: | python -m pip install --upgrade pip setuptools python -m pip install -r requirements/requirements_build.txt - python -m build + python -m build wheel python -m twine check dist/* - name: Upload to private PyPi run: | From 966fcf7398f16ae1e2c9aa73c94a48b24582575f Mon Sep 17 00:00:00 2001 From: jonathanzopes Date: Mon, 15 Aug 2022 13:12:37 +0200 Subject: [PATCH 3/4] Add venv. --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 21653c13b..b1efd7b0e 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -102,7 +102,7 @@ jobs: run: | python -m pip install --upgrade pip setuptools python -m pip install -r requirements/requirements_build.txt - python -m build wheel + python -m build venv wheel python -m twine check dist/* - name: Upload to private PyPi run: | From 956831dbebc178cf2d52792070633cedaef9fb6c Mon Sep 17 00:00:00 2001 From: jonathanzopes Date: Mon, 15 Aug 2022 13:18:38 +0200 Subject: [PATCH 4/4] Add long dec content type. --- .github/workflows/ci_cd.yml | 2 +- setup.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index b1efd7b0e..3033812a5 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -106,7 +106,7 @@ jobs: python -m twine check dist/* - name: Upload to private PyPi run: | - python -m twine upload --verbose --skip-existing dist/**/*.whl + python -m twine upload --verbose --skip-existing dist/*.whl env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }} diff --git a/setup.py b/setup.py index 821979494..e6e225491 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,8 @@ from setuptools import find_namespace_packages, setup -# We follow option 3 suggested by PyPA https://packaging.python.org/guides/single-sourcing-package-version/ +# We follow option 3 suggested by PyPA +# https://packaging.python.org/guides/single-sourcing-package-version/ # to get the package version. root = os.path.abspath(os.path.dirname(__file__)) about = {} @@ -27,6 +28,7 @@ license_file="LICENSE", description="A python client for Ansys REP - Remote Execution Platform", long_description=open("README.rst").read(), + long_description_content_type="text/x-rst", install_requires=[ "requests>=2.21.0", "marshmallow>=3.0.0",