diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b1f2d34 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,60 @@ +name: "build" + +on: + pull_request: + push: + branches: master + +jobs: + build: + name: Python ${{ matrix.python-version }} | Flask ${{ matrix.flask-version }} | Ubuntu + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - python-version: 2.7 + flask-version: "0.10.*" + - python-version: 2.7 + flask-version: "0.11.*" + + - python-version: 3.6 + flask-version: "0.12.*" + - python-version: 3.6 + flask-version: "1.0.*" + - python-version: 3.6 + flask-version: "1.1.*" + + - python-version: 3.7 + flask-version: "1.0.*" + - python-version: 3.7 + flask-version: "1.1.*" + + - python-version: 3.8 + flask-version: "1.0.*" + - python-version: 3.8 + flask-version: "1.1.*" + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Flask ${{ matrix.flask-version }} + run: | + pip install Flask==${{ matrix.flask-version }} + pip install pillow + pip install codecov + pip install mock + + - name: Run tests + run: | + PYTHONPATH=".:tests:$PYTHONPATH" coverage run --omit='setup.py' --omit='tests/*' --source='.' setup.py test + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..d2e8fb2 --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,32 @@ +name: PyPI Release + +on: + push: + tags: + - 'v*' + +jobs: + publish: + name: PyPI Release + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Python 3.9 + uses: actions/setup-python@v1 + with: + python-version: 3.9 + + - name: Upgrade Setuptools + run: pip install --upgrade setuptools wheel + + - name: Build Distribution + run: python setup.py sdist bdist_wheel --universal + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.pypi_password }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fd5f1ec..0000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: python - -python: - - 2.7 - - 3.4 - - 3.5 - - 3.6 - -env: - - FLASK="Flask==0.12" - - FLASK="Flask==0.11" - - FLASK="Flask==0.10" - - FLASK="Flask==1.0" - -install: - - pip install $FLASK - - pip install pillow - - pip install codecov - - pip install mock - -branches: - only: - - master - -script: - - coverage run --omit='setup.py' --omit='tests/*' --source='.' setup.py test - -after_success: - - codecov diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..db6d0fa --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,36 @@ +## [Unreleased] + +## [1.0.7] - 2020-12-07 +### Added +- Flask 1.1 compatibility + +## [1.0.6] - 2018-07-07 +### Added +- Flask 1.0 compatibility + +## [1.0.4] - 2018-04-15 +### Fix +- Update setup.py + +## [1.0.2] - 2017-06-07 +### Fix +- Fix "mkdirs" py2/py3 compatibility + +## [1.0.1] - 2017-05-07 +### Add +- Support for single integer size values for square thumbnails +- Fix the event someone uses the Thumbnail constructor without passing in the app + +## [1.0.0] - 2017-04-07 +### Add +- Add custom thumbnail storage +- Support python 3.4+ +- Test code + +[Unreleased]: https://github.com/silentsokolov/flask-thumbnails/compare/v0.1.7...HEAD +[0.1.7]: https://github.com/silentsokolov/flask-thumbnails/compare/v0.1.6...v0.1.7 +[0.1.6]: https://github.com/silentsokolov/flask-thumbnails/compare/v0.1.5...v0.1.6 +[0.1.4]: https://github.com/silentsokolov/flask-thumbnails/compare/v0.1.3...v0.1.4 +[0.1.2]: https://github.com/silentsokolov/flask-thumbnails/compare/v0.1.1...v0.1.2 +[0.1.1]: https://github.com/silentsokolov/flask-thumbnails/compare/v0.1.0...v0.1.1 +[0.1.0]: https://github.com/silentsokolov/flask-thumbnails/compare/v0.1.0...v0.1.0 diff --git a/Makefile b/Makefile index ac4507f..100a065 100644 --- a/Makefile +++ b/Makefile @@ -16,8 +16,7 @@ pre-release: sdist wheel twine upload --repository-url https://test.pypi.org/legacy/ dist/* clean: - find . -name '*.pyc' -exec rm -f {} + - find . -name '*.pyo' -exec rm -f {} + + find . | grep -E '(__pycache__|\.pyc|\.pyo$)' | xargs rm -rf rm -rf build rm -rf dist - rm -rf *.egg-info + rm -rf *.egg-info \ No newline at end of file diff --git a/README.rst b/README.rst index 7d4ab3a..68e3cee 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ -.. image:: https://travis-ci.org/silentsokolov/flask-thumbnails.svg?branch=master - :target: https://travis-ci.org/silentsokolov/flask-thumbnails +.. image:: https://github.com/silentsokolov/flask-thumbnails/workflows/build/badge.svg?branch=master + :target: https://github.com/silentsokolov/flask-thumbnails/actions?query=workflow%3Abuild+branch%3Amaster .. image:: https://codecov.io/gh/silentsokolov/flask-thumbnails/branch/master/graph/badge.svg :target: https://codecov.io/gh/silentsokolov/flask-thumbnails diff --git a/setup.py b/setup.py index 098eec9..6c88779 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ def get_packages(package): packages=get_packages('flask_thumbnails'), include_package_data=True, install_requires=[], - python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", + python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", zip_safe=False, platforms='any', test_suite='tests', @@ -44,9 +44,10 @@ def get_packages(package): 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'Topic :: Utilities', ] )