From c45397332c5ee19ebed1506321cdd01acca157e0 Mon Sep 17 00:00:00 2001 From: Chris Griffith Date: Fri, 21 Jan 2022 14:23:21 -0600 Subject: [PATCH] Use manylinux for whl deployment on linux --- .github/workflows/pythonpublish.yml | 27 +++++++++++++++++++++ .github/workflows/tests.yml | 37 +++++++++++++++++++++++++++++ LICENSE | 2 +- README.rst | 6 ++--- box/__init__.py | 2 +- box/box.py | 2 +- box/box_list.py | 2 +- 7 files changed, 71 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 9f868a9..23fb6fd 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -54,3 +54,30 @@ jobs: run: | python setup.py bdist_wheel twine upload dist/* + + deploy-cython-manylinux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.10 + uses: actions/setup-python@v1 + with: + python-version: 3.10 + + - uses: RalfG/python-wheels-manylinux-build@v0.4.2-manylinux2014_x86_64 + with: + python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310' + build-requirements: 'cython' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine --upgrade + + - name: Build and publish + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + python setup.py bdist_wheel + twine upload dist/*-manylinux*.whl diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6993ee0..5ebd907 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -63,6 +63,43 @@ jobs: name: python_box path: dist/*.whl + package-manylinux-checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.10 + uses: actions/setup-python@v1 + with: + python-version: "3.10" + + - uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: package-manylinux-check-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-test.txt') }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -r requirements-test.txt + pip install coveralls flake8 flake8-print mypy setuptools wheel twine Cython + + - uses: RalfG/python-wheels-manylinux-build@v0.4.2-manylinux2014_x86_64 + with: + python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310' + build-requirements: 'cython' + + - name: Test packaged wheel on linux + run: | + pip install dist/*cp310-manylinux*.whl + rm -rf box + python -m pytest + + - name: Upload wheel artifact + uses: actions/upload-artifact@v2 + with: + name: python_box + path: dist/*-manylinux*.whl + test: strategy: matrix: diff --git a/LICENSE b/LICENSE index f0c1a42..2d55592 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017-2020 Chris Griffith +Copyright (c) 2017-2022 Chris Griffith Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.rst b/README.rst index f7652b5..c479fa5 100644 --- a/README.rst +++ b/README.rst @@ -38,13 +38,13 @@ But you can also sub out "ruamel.yaml" for "PyYAML". Check out `more details `_ on installation details. -Box 5 is tested on python 3.7+, if you are upgrading from previous versions, please look through +Box 6 is tested on python 3.7+, if you are upgrading from previous versions, please look through `any breaking changes and new features `_. Optimized Version ----------------- -Box 5.5 is introducing Cython optimizations for major platforms by default. +Box 6 is introducing Cython optimizations for major platforms by default. Loading large data sets can be up to 10x faster! If you are **not** on a x86_64 supported system you will need to do some extra work to install the optimized version. @@ -115,7 +115,7 @@ Also special shout-out to PythonBytes_, who featured Box on their podcast. License ======= -MIT License, Copyright (c) 2017-2020 Chris Griffith. See LICENSE_ file. +MIT License, Copyright (c) 2017-2022 Chris Griffith. See LICENSE_ file. .. |BoxImage| image:: https://raw.githubusercontent.com/cdgriffith/Box/master/box_logo.png diff --git a/box/__init__.py b/box/__init__.py index c1d721c..ac1108f 100644 --- a/box/__init__.py +++ b/box/__init__.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- __author__ = "Chris Griffith" -__version__ = "6.0.0rc1" +__version__ = "6.0.0rc2" from box.box import Box from box.box_list import BoxList diff --git a/box/box.py b/box/box.py index f740055..485ad9e 100644 --- a/box/box.py +++ b/box/box.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # -# Copyright (c) 2017-2020 - Chris Griffith - MIT License +# Copyright (c) 2017-2022 - Chris Griffith - MIT License """ Improved dictionary access through dot notation with additional tools. """ diff --git a/box/box_list.py b/box/box_list.py index fa92f20..06da4b4 100644 --- a/box/box_list.py +++ b/box/box_list.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # -# Copyright (c) 2017-2020 - Chris Griffith - MIT License +# Copyright (c) 2017-2022 - Chris Griffith - MIT License import copy import re from os import PathLike