From fd3bf73a0dec5b67aec7d484509b788cbe0d237e Mon Sep 17 00:00:00 2001 From: changliao1025 Date: Wed, 10 May 2023 17:54:30 -0700 Subject: [PATCH] check wheel --- .github/workflows/python-publish.yml | 30 ++++++---------------------- meta.yaml | 6 ++---- setup.cfg | 2 +- setup.py | 5 ++--- 4 files changed, 11 insertions(+), 32 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index c32e580..cdae135 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -12,30 +12,10 @@ on: release: types: [published] -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - - name: Install build dependencies - run: | - python -m pip install --upgrade pip - pip install build - - - name: Build package - run: python setup.py build_external +jobs: deploy: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v2 @@ -47,13 +27,15 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install build + python -m pip install setuptools wheel twine - - name: Build package + - name: Build external package run: python setup.py build_external - name: Build source distribution - run: python setup.py sdist + run: | + python setup.py sdist bdist_wheel + python -m twine upload dist/* - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/meta.yaml b/meta.yaml index fb0db99..cd97395 100644 --- a/meta.yaml +++ b/meta.yaml @@ -1,9 +1,9 @@ package: name: "hexwatershed" - version: "0.2.20" + version: "0.2.21" source: - git_rev: v0.2.20 + git_rev: v0.2.21 git_url: https://github.com/changliao1025/pyhexwatershed build: @@ -32,11 +32,9 @@ requirements: - cmake - make - python - - packaging - setuptool run: - python - - packaging - numpy - matplotlib - gdal diff --git a/setup.cfg b/setup.cfg index 1aa92bb..043e996 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.2.20 +current_version = 0.2.21 commit = True tag = True diff --git a/setup.py b/setup.py index 526cf3d..3c8fadd 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ import os import subprocess import shutil -from setuptools import setup, find_packages, Command +from setuptools import setup, Command NAME = "hexwatershed" DESCRIPTION = \ @@ -11,7 +11,7 @@ AUTHOR = "Chang Liao" AUTHOR_EMAIL = "chang.liao@pnnl.gov" URL = "https://github.com/changliao1025/pyhexwatershed" -VERSION = "0.2.20" +VERSION = "0.2.21" REQUIRES_PYTHON = ">=3.8.0" KEYWORDS = "hexwatershed hexagon" @@ -46,7 +46,6 @@ ( "external/hexwatershed/src/json/" , ["external/hexwatershed/src/json/*.h", "external/hexwatershed/src/json/*.cpp"] ) ] - HERE = os.path.abspath(os.path.dirname(__file__)) HERE = os.path.expandvars(HERE) # Check if the expanded path exists