From 1bd673a9dbfd758a9eea8977023889c246f83849 Mon Sep 17 00:00:00 2001 From: chfw Date: Sat, 9 Nov 2024 13:55:21 +0000 Subject: [PATCH] add chardet as dependency, related to https://github.com/pyexcel/pyexcel/issues/272 --- .github/workflows/moban-update.yml | 1 + .github/workflows/pythonpublish.yml | 19 ++++++++++++------- .github/workflows/tests.yml | 24 ++++++++++++------------ pyexcel-io.yml | 1 + requirements.txt | 1 + setup.py | 4 +++- 6 files changed, 30 insertions(+), 20 deletions(-) diff --git a/.github/workflows/moban-update.yml b/.github/workflows/moban-update.yml index 73a3aed..4038e3d 100644 --- a/.github/workflows/moban-update.yml +++ b/.github/workflows/moban-update.yml @@ -15,6 +15,7 @@ jobs: python-version: '3.7' - name: check changes run: | + pip install markupsafe==2.0.1 pip install moban gitfs2 pypifs moban-jinja2-github moban-ansible moban git status diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 9e7ec42..4ccaa8d 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -5,9 +5,16 @@ on: types: [created] jobs: - deploy: + pypi-publish: + name: upload release to PyPI runs-on: ubuntu-latest + # Specifying a GitHub environment is optional, but strongly encouraged + environment: pypi + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write steps: + # retrieve your distributions here - uses: actions/checkout@v1 - name: Set up Python uses: actions/setup-python@v1 @@ -16,11 +23,9 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + pip install setuptools wheel + - name: Build run: | python setup.py sdist bdist_wheel - twine upload dist/* + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 801d2cd..8e2f2b3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,26 +1,26 @@ -name: Run unit tests on Windows and Mac +name: Run unit tests on Windows, Ubuntu and Mac on: [push, pull_request] jobs: + test: + name: ${{ matrix.os }} / ${{ matrix.python_version }} + runs-on: ${{ matrix.os }}-latest strategy: - fail-fast: false - matrix: - python-version: [3.6, 3.7, 3.8, 3.9] - os: [macOs-latest, ubuntu-latest, windows-latest] - exclude: - - os: macOs-latest - python-version: 3.6 + fail-fast: false + matrix: + os: [Ubuntu] + python_version: ["3.9.16"] - runs-on: ${{ matrix.os }} - name: run tests steps: - uses: actions/checkout@v2 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python_version }} + architecture: x64 + - name: install run: | pip --use-deprecated=legacy-resolver install -r requirements.txt diff --git a/pyexcel-io.yml b/pyexcel-io.yml index 7dad5e1..339c1c9 100644 --- a/pyexcel-io.yml +++ b/pyexcel-io.yml @@ -9,6 +9,7 @@ copyright_year: 2015-2022 moban_command: false is_on_conda: true dependencies: + - chardet - lml>=0.0.4 test_dependencies: - pyexcel diff --git a/requirements.txt b/requirements.txt index 8539e81..6b8c762 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ +chardet lml>=0.0.4 diff --git a/setup.py b/setup.py index 90e27da..65de74b 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ ) URL = "https://github.com/pyexcel/pyexcel-io" DOWNLOAD_URL = "%s/archive/0.6.6.tar.gz" % URL -FILES = ["README.rst", "CHANGELOG.rst"] +FILES = ["README.rst", "CONTRIBUTORS.rst", "CHANGELOG.rst"] KEYWORDS = [ "python", "API", @@ -68,11 +68,13 @@ 'License :: OSI Approved :: BSD License', 'Programming Language :: Python :: Implementation :: PyPy' + ] PYTHON_REQUIRES = ">=3.6" INSTALL_REQUIRES = [ + "chardet", "lml>=0.0.4", ] SETUP_COMMANDS = {}