From e82982550a9dc064899c217ec35d24515b6df138 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Sun, 10 Apr 2022 18:08:45 +0000 Subject: [PATCH 1/2] Updated files with 'repo_helper'. --- .github/actions_build_conda.sh | 22 -------------- .github/actions_deploy_conda.sh | 23 -------------- .github/workflows/conda_ci.yml | 1 + .github/workflows/python_ci.yml | 4 +-- .github/workflows/python_ci_linux.yml | 44 +++++++++++++++++++++------ .github/workflows/python_ci_macos.yml | 4 +-- pyproject.toml | 26 +++++++++++++++- tox.ini | 2 +- 8 files changed, 65 insertions(+), 61 deletions(-) delete mode 100755 .github/actions_build_conda.sh delete mode 100755 .github/actions_deploy_conda.sh diff --git a/.github/actions_build_conda.sh b/.github/actions_build_conda.sh deleted file mode 100755 index 1c8409e..0000000 --- a/.github/actions_build_conda.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -# This file is managed by 'repo_helper'. Don't edit it directly. - -set -e -x - -python -m mkrecipe --type wheel || exit 1 - -# Switch to miniconda -source "/home/runner/miniconda/etc/profile.d/conda.sh" -hash -r -conda activate base -conda config --set always_yes yes --set changeps1 no -conda install conda=4.8.5 conda-build=3.18.11 -conda info -a - -conda config --add channels conda-forge || exit 1 -conda config --add channels domdfcoding || exit 1 -conda config --remove channels defaults - -conda build conda -c conda-forge -c domdfcoding --output-folder conda/dist --skip-existing - -exit 0 diff --git a/.github/actions_deploy_conda.sh b/.github/actions_deploy_conda.sh deleted file mode 100755 index a7ac222..0000000 --- a/.github/actions_deploy_conda.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# This file is managed by 'repo_helper'. Don't edit it directly. - -set -e -x - -# Switch to miniconda -source "/home/runner/miniconda/etc/profile.d/conda.sh" -hash -r -conda activate base -conda config --set always_yes yes --set changeps1 no -conda install conda=4.8.5 anaconda-client -conda info -a - -for f in conda/dist/noarch/pyproject-parser-*.tar.bz2; do - [ -e "$f" ] || continue - echo "$f" - conda install "$f" || exit 1 - echo "Deploying to Anaconda.org..." - anaconda -t "$ANACONDA_TOKEN" upload "$f" || exit 1 - echo "Successfully deployed to Anaconda.org." -done - -exit 0 diff --git a/.github/workflows/conda_ci.yml b/.github/workflows/conda_ci.yml index 946ada9..e9424f2 100644 --- a/.github/workflows/conda_ci.yml +++ b/.github/workflows/conda_ci.yml @@ -39,6 +39,7 @@ jobs: python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade "whey-conda" "setuptools>=40.6.0" "wheel>=0.34.2" # $CONDA is an environment variable pointing to the root of the miniconda directory + $CONDA/bin/conda update -n base conda $CONDA/bin/conda config --add channels conda-forge $CONDA/bin/conda config --add channels domdfcoding diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index bb2372c..6c6265a 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -22,7 +22,7 @@ jobs: runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.5,pypy-3.6,pypy-3.7,pypy-3.8' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.6,pypy-3.6,pypy-3.7,pypy-3.8' strategy: fail-fast: False @@ -33,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - {python-version: "3.10", testenvs: "py310,build", experimental: False} - - {python-version: "3.11.0-alpha.5", testenvs: "py311-dev,build", experimental: True} + - {python-version: "3.11.0-alpha.6", testenvs: "py311-dev,build", experimental: True} - {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True} - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True} diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index abc6bb7..53e3e3b 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -23,7 +23,7 @@ jobs: runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.5,pypy-3.6,pypy-3.7,pypy-3.8' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.6,pypy-3.6,pypy-3.7,pypy-3.8' strategy: fail-fast: False @@ -34,7 +34,7 @@ jobs: - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - {python-version: "3.10", testenvs: "py310,build", experimental: False} - - {python-version: "3.11.0-alpha.5", testenvs: "py311-dev,build", experimental: True} + - {python-version: "3.11.0-alpha.6", testenvs: "py311-dev,build", experimental: True} - {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True} - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True} @@ -187,22 +187,46 @@ jobs: with: python-version: 3.8 + - name: Setup Conda + uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: env + conda-build-version: 3.21.0 + - name: Install dependencies 🔧 run: | + python -VV + python -m site python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade "mkrecipe" "setuptools>=40.6.0" "wheel>=0.34.2" + # $CONDA is an environment variable pointing to the root of the miniconda directory + $CONDA/bin/conda config --set always_yes yes --set changeps1 no + $CONDA/bin/conda update -n base conda + $CONDA/bin/conda info -a + $CONDA/bin/conda config --add channels conda-forge + $CONDA/bin/conda config --add channels domdfcoding - wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh -O miniconda.sh - bash miniconda.sh -b -p $HOME/miniconda + $CONDA/bin/conda config --remove channels defaults - - name: Build Conda 📦 + - name: Build Conda Package 📦 run: | - chmod +x .github/actions_build_conda.sh - bash .github/actions_build_conda.sh + python -m mkrecipe --type wheel || exit 1 + $CONDA/bin/conda build conda -c conda-forge -c domdfcoding --output-folder conda/dist - - name: Deploy Conda 🚀 + - name: Deploy Conda Package 🚀 + if: startsWith(github.ref, 'refs/tags/') run: | - chmod +x .github/actions_deploy_conda.sh - bash .github/actions_deploy_conda.sh + $CONDA/bin/conda config --set always_yes yes --set changeps1 no + $CONDA/bin/conda install anaconda-client + $CONDA/bin/conda info -a + + for f in conda/dist/noarch/pyproject-parser-*.tar.bz2; do + [ -e "$f" ] || continue + echo "$f" + conda install "$f" || exit 1 + echo "Deploying to Anaconda.org..." + $CONDA/bin/anaconda -t "$ANACONDA_TOKEN" upload "$f" || exit 1 + echo "Successfully deployed to Anaconda.org." + done env: ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index c72ebe9..eaab17c 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -22,7 +22,7 @@ jobs: runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.5,pypy-3.7,pypy-3.8' + USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.6,pypy-3.7,pypy-3.8' strategy: fail-fast: False @@ -33,7 +33,7 @@ jobs: - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - {python-version: "3.10", testenvs: "py310,build", experimental: False} - - {python-version: "3.11.0-alpha.5", testenvs: "py311-dev,build", experimental: True} + - {python-version: "3.11.0-alpha.6", testenvs: "py311-dev,build", experimental: True} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True} - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True} diff --git a/pyproject.toml b/pyproject.toml index 71d88a1..ee7d852 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,26 @@ version = "0.4.3" description = "Parser for 'pyproject.toml'" readme = "README.rst" keywords = [ "metadata", "packaging", "pep518", "pep621", "pyproject", "toml",] -dynamic = [ "requires-python", "classifiers", "dependencies",] +dynamic = [] +requires-python = ">=3.6.1" +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "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 :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: System :: Archiving :: Packaging", + "Typing :: Typed", +] [[project.authors]] name = "Dominic Davis-Foster" @@ -155,6 +174,11 @@ show_error_codes = true [tool.snippet-fmt] directives = [ "code-block",] +[tool.setuptools] +zip-safe = false +include-package-data = true +platforms = [ "Windows", "macOS", "Linux",] + [tool.dep_checker.name_mapping] attrs = "attr" diff --git a/tox.ini b/tox.ini index ae8b4f3..d971d74 100644 --- a/tox.ini +++ b/tox.ini @@ -104,7 +104,7 @@ ignore_errors = True changedir = {toxinidir} extras = readme deps = - mypy==0.931 + mypy==0.942 -r{toxinidir}/tests/requirements.txt -r{toxinidir}/stubs.txt commands = mypy pyproject_parser tests {posargs} From 6b3a34d9db5b5eab83177e334d4e247f98d90983 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 10 Apr 2022 18:09:00 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ee7d852..4ef3535 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,9 +7,8 @@ name = "pyproject-parser" version = "0.4.3" description = "Parser for 'pyproject.toml'" readme = "README.rst" -keywords = [ "metadata", "packaging", "pep518", "pep621", "pyproject", "toml",] -dynamic = [] requires-python = ">=3.6.1" +keywords = [ "metadata", "packaging", "pep518", "pep621", "pyproject", "toml",] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", @@ -28,6 +27,7 @@ classifiers = [ "Topic :: System :: Archiving :: Packaging", "Typing :: Typed", ] +dynamic = [] [[project.authors]] name = "Dominic Davis-Foster"