From 5966cf330a89ec282008d0395cab47e4261b7e89 Mon Sep 17 00:00:00 2001 From: zStupan Date: Wed, 25 Oct 2023 10:57:24 +0200 Subject: [PATCH 1/2] fix pypi workflow --- .github/workflows/publish_pypi.yml | 41 ++++++++++++++++-------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index 07e8e4d8..2fdeaf25 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -5,27 +5,30 @@ on: types: [published] jobs: - build: + release: + name: Release runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python 3.10 + uses: actions/setup-python@v4 with: - python-version: 3.8 - - name: Install pipenv - run: | - python -m pip install --upgrade pip - pip install pipenv - - name: Install dependencies - run: | - pipenv install --skip-lock --dev - - name: Build package + python-version: "3.10" + + - name: Install Poetry run: | - make build - - name: Publish package + curl -sSL https://install.python-poetry.org | python - -y + + - name: Update PATH + run: echo "$HOME/.local/bin" >> $GITHUB_PATH + + - name: Build project for distribution + run: poetry build + + - name: Publish to PyPI env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: - make upload + POETRY_HTTP_BASIC_PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} + POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: poetry publish \ No newline at end of file From 396b006e5724f7739708108c40790d556ffe4969 Mon Sep 17 00:00:00 2001 From: zStupan Date: Wed, 25 Oct 2023 11:49:58 +0200 Subject: [PATCH 2/2] update conda recipe --- conda/conda_build_config.yaml | 8 ++++---- conda/meta.yaml | 36 ++++++++++++++++------------------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/conda/conda_build_config.yaml b/conda/conda_build_config.yaml index db6520c3..1224e579 100644 --- a/conda/conda_build_config.yaml +++ b/conda/conda_build_config.yaml @@ -1,5 +1,5 @@ python: - - 3.6 - - 3.7 - - 3.8 - - 3.9 \ No newline at end of file + - 3.9 + - 3.10 + - 3.11 + - 3.12 \ No newline at end of file diff --git a/conda/meta.yaml b/conda/meta.yaml index ef500da7..0a665866 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -1,35 +1,31 @@ -{% set data = load_setup_py_data() %} +{% set pyproject = load_file_data('pyproject.toml') %} +{% set poetry = pyproject.get('tool', {}).get('poetry') %} package: - name: niapy - version: {{ data['version'] }} + name: {{ poetry.get('name') }} + version: {{ poetry.get('version') }} source: path: .. build: number: 0 - script: python setup.py install --single-version-externally-managed --record=record.txt + script: {{ PYTHON }} -m pip install . -vv requirements: - build: + host: - python - - numpy>=1.17.0 - - matplotlib - - pandas - - openpyxl + - pip + - setuptools + - wheel run: - python - - numpy>=1.17.0 - - matplotlib - - pandas - - openpyxl - -test: - imports: - - niapy about: - home: {{ data['url'] }} - license: {{ data['license'] }} -summary: {{ data['description'] }} \ No newline at end of file + home: {{ poetry.get('homepage') }} + license: {{ poetry.get('license') }} + license_file: LICENSE + license_url: https://github.com/NiaOrg/NiaPy/blob/master/LICENSE + summary: {{ poetry.get('description') }} + doc_url: {{ poetry.get('documentation') }} + dev_url: {{ poetry.get('repository') }} \ No newline at end of file