diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..bf4c488 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: CI + +on: + push: + branches: [master] + tags: ["*.*.*"] + pull_request: + branches: [master] + +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.10", "3.14"] + steps: + - uses: actions/checkout@v6 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + - name: Install tox + run: pip install tox + - name: Run tests + run: tox -e py + + deploy: + if: startsWith(github.ref, 'refs/tags/') + needs: test + runs-on: ubuntu-latest + permissions: + contents: write + id-token: write + steps: + - uses: actions/checkout@v6 + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.12" + - name: Build package + run: pipx run build + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + files: dist/* + generate_release_notes: true + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b5042cc..0000000 --- a/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ -language: python - -env: - global: - - TWINE_USERNAME="anthrotype" - - secure: grrVsFD+NUzbNZEv9HXhFh48VKnOWatSh4HRvO/k+DFn8iQvj1mXYXyNM7STOgX3lAxryJHpfcie1UvlE6JLPGvM8TKuq4lqtWlHCaDiNOIiaEp4EGxxhLkSz/Zf7D6501OP1hs/8kFO46QHJteOS0/SXcnIC0Fvq2hDqMb6GUoYKWGyxKwvSfT4AdVPWHEe/p2PNyWAMmJwnx1AwggnsxzDg6zAANCEAiEk7iU+gpNTgXmp+DWo/Av9hglidRjSdq8Fn0x4L+PxMxshJhIbdOB5cFS/Lq1LLBF8yqceht+hAj/pzQnIqE6ALYtXgHUxp/W0BJdJWX16m7TXm4NPWgmgRrRLR/amD+Mp5l1M9UHgwSOdQBU22CkF/hfor0b6ED4Q+Ap6ayy+g6cOp29okGLCMIjXxJU/9rIFjYQ5TFfmD2RvVhUj44e7azGyHNa9goro78mcM9on7a377guODVivVNANPTqm2ZEvLprWmLcz/dlEHFb4ODLvvh4x9hYLPZBF1A9j+qhAGuAFtmOPsPBAJzaSEDAu3DWtwYeGh1+RqagoNhLovB/qfz4YbFygWTj7oQfvmnE0wkAFGqR5EbgLl6o4FKvXl5ZpDj8q/gZdCjwi4VLSTguk0xlIfObLhKq73issjB3Jaxi4Pnl5KcnnhhgtvY3WGx27jMP2yB0= - -matrix: - include: - - python: 3.6 - - python: 3.7 - # required to run python3.7 on Travis CI - # https://github.com/travis-ci/travis-ci/issues/9815 - dist: xenial - -install: - - pip install --upgrade pip setuptools wheel - - pip install tox-travis - # Travis by default only clones a 'shallow' repository with --depth=50. - # When building the distribution packages, we use git to determine the - # package version string (via setuptools_scm), hence we need to fetch - # the whole repo, and not just the last 50 commits. - - if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then git fetch --unshallow; fi - -script: tox - -after_success: - # if it's a tagged commit, upload distribution packages to PyPI - - | - if [ -n "$TRAVIS_TAG" ] && [ "$TRAVIS_REPO_SLUG" == "typemytype/booleanOperations" ] && [ "$TRAVIS_PYTHON_VERSION" == "3.6" ]; then - pip install --upgrade twine pip setuptools wheel - python setup.py sdist - pip wheel --no-deps --wheel-dir dist . - twine upload dist/*.whl dist/*.zip - fi - -deploy: - # deploy to Github Releases on tags - - provider: releases - api_key: - secure: H2rz0E/GjRrRmvf6EYWv7Fyu+y4qU+InGiYlQ6xoyrjmMFCTYiPNW0ysu8893JFILusfO48zzEix7HcumQXtJU16XYwqft9eiWIGzSlP1krusmpQ0yTnuy9wEQcd7fXLEQDfiVZpJxWpC1TtsuIdDqpSUFcHDg4hlvn1IIh+6HwRP6+M5Mprze087ydBCKkO4CvqR4olC7bkSPorRtqUsiUHlUxYFS+R75a8ghqVQbky7ew9/r90zljCBFwYTPEv9tQ7OxnAQiUaAYojceThsBrNP1lH83tOoqB2FkKr9I5dxi5gqNuUsJHh3QK0V59oQCxU+iVFYfrlIZHTBQ+2caxIeWm2k9RkMXXkbg1LyfpORt+5L+NcFNE4WT0DTlYrKnpW+jrak0LEWaI97+15uHahph3vOJgaZrTFvRQZUJTWCNcji2jGbZg+O3pS1Vtd1xEgJ1TcrkOYLYBMrVOywbuQL4sXofLxH3I5RwAenkgm5TwxtuiNxpUkqlEhzJ+GYwWtfb7/qtcLIK7Xn6cDdsQG6XYQMVt+HpCKgRLlrQC8si6l+jZBEtJ7o4IKeYbtybFCe5H3V0jnRFRyncPPdpBavqJ093Pr7fGLvmZuHl551WRtyPlBN4aMGsqvqUSjwr/TxsX5zZ1tQ4QTN2YTmCdeUO6P/fwTBf5p0F3QFo8= - file_glob: true - file: "dist/*" - skip_cleanup: true - on: - repo: typemytype/booleanOperations - tags: true - all_branches: true - python: 3.6 diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index fb3f259..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,34 +0,0 @@ -environment: - matrix: - - PYTHON: "C:\\Python36-x64" - PYTHON_VERSION: "3.6.x" - PYTHON_ARCH: "64" - - - PYTHON: "C:\\Python37-x64" - PYTHON_VERSION: "3.7.0" - PYTHON_ARCH: "64" - -init: - - "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%" - -install: - # prepend newly installed Python to the PATH - - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" - - # check that we have the expected version and architecture for Python - - "python --version" - - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" - - # upgrade pip to avoid out-of-date warnings - - "python -m pip install --disable-pip-version-check --upgrade pip" - - # install/upgrade setuptools and wheel to build packages - - "pip install --upgrade setuptools wheel" - - # install tox to run test suite in a virtual environment - - "pip install -U tox" - -build: false - -test_script: - - "tox -e py" diff --git a/requirements.txt b/requirements.txt index c34c8fe..484f6b3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # fontTools.ufoLib is not imported directly by booleanOperations, but # the test suite needs defcon, which in turns requires fonttools installed # with [ufo] support -fonttools[ufo]==4.0.2 -pyclipper==1.1.0.post1 +fonttools[ufo]==4.61.1 +pyclipper==1.4.0 diff --git a/setup.cfg b/setup.cfg index 0c92629..614ae85 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,21 +14,31 @@ classifiers = Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 + Programming Language :: Python :: 3.14 Topic :: Multimedia :: Graphics :: Editors :: Vector-Based Topic :: Software Development :: Libraries :: Python Modules [options] package_dir = =Lib packages = find: -python_requires = >=3.6 +python_requires = >=3.9 setup_requires = setuptools_scm install_requires = pyclipper >= 1.1.0.post1 fonttools >= 4.0.2 +[options.extras_require] +test = + pytest + defcon + fontPens + [options.packages.find] where = Lib diff --git a/tox.ini b/tox.ini index 09cbb1d..84e7f96 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,10 @@ [tox] -envlist = py{36,37} +envlist = py{310,311,312,313,314} [testenv] +extras = test deps = - defcon - fontPens - pytest -rrequirements.txt -download = True commands = # pass to pytest any extra positional arguments after `tox -- ...` pytest {posargs}