summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2021-11-20 07:27:01 -0800
committerGitHub <noreply@github.com>2021-11-20 07:27:01 -0800
commit811cd1bdb02493a4717f1bd2466a833920d0ad0e (patch)
tree3ba2348c49cedf2fcdad306fc85d262ea347fd81
parentdc336dea43ed57a14445339eade738845adaab2e (diff)
parentdc252a96683ab4f1227f30b80df476143052dd05 (diff)
downloadxattr-811cd1bdb02493a4717f1bd2466a833920d0ad0e.tar.gz
Merge pull request #95 from xattr/github-actionsv0.9.8
Switch to github actions
-rw-r--r--.github/workflows/build-and-deploy.yml116
-rw-r--r--.travis.yml59
-rwxr-xr-x.travis/install.sh33
-rwxr-xr-x.travis/run.sh29
-rw-r--r--CHANGES.txt9
-rw-r--r--pyproject.toml14
-rw-r--r--setup.py7
-rw-r--r--xattr/__init__.py2
-rw-r--r--xattr/tests/__init__.py1
9 files changed, 145 insertions, 125 deletions
diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml
new file mode 100644
index 0000000..ad5a636
--- /dev/null
+++ b/.github/workflows/build-and-deploy.yml
@@ -0,0 +1,116 @@
+name: Build and upload to PyPI
+
+# Build on every branch push, tag push, and pull request change:
+on: [push, pull_request]
+# Alternatively, to publish when a (published) GitHub Release is created, use the following:
+# on:
+# push:
+# pull_request:
+# release:
+# types:
+# - published
+
+jobs:
+ build_wheels:
+ name: Build wheels on ${{ matrix.os }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os:
+ - 'ubuntu-latest'
+ - 'macos-latest'
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Set up QEMU
+ if: runner.os == 'Linux'
+ uses: docker/setup-qemu-action@v1
+ with:
+ platforms: arm64
+
+ - name: Build wheels
+ uses: pypa/cibuildwheel@v2.2.2
+ env:
+ CIBW_BUILD_FRONTEND: "build"
+ CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
+ CIBW_MANYLINUX_I686_IMAGE: manylinux2014
+ CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
+ CIBW_MANYLINUX_PYPY_AARCH64_IMAGE: manylinux2014
+ CIBW_MANYLINUX_PYPY_X86_64_IMAGE: manylinux2014
+ CIBW_MANYLINUX_PYPY_I686_IMAGE: manylinux2014
+ CIBW_ARCHS_LINUX: "auto aarch64"
+ CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
+
+ - name: Build Python 2.7 wheels
+ if: runner.os != 'Windows'
+ uses: pypa/cibuildwheel@v1.12.0
+ env:
+ CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
+ CIBW_MANYLINUX_I686_IMAGE: manylinux2010
+ CIBW_BUILD: "cp27-*"
+ CIBW_SKIP: "pp*"
+ CIBW_ARCHS_LINUX: "auto aarch64"
+
+ - uses: actions/upload-artifact@v2
+ if: "github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')"
+ with:
+ path: ./wheelhouse/*.whl
+
+ build_sdist:
+ name: Build source distribution
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: actions/setup-python@v2
+ name: Install Python
+ with:
+ python-version: '3.9'
+
+ - name: Build sdist
+ run: python setup.py sdist
+
+ - uses: actions/upload-artifact@v2
+ if: "github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')"
+ with:
+ path: dist/*.tar.gz
+
+ upload_pypi:
+ needs: [build_wheels, build_sdist]
+ runs-on: ubuntu-latest
+ # upload to PyPI on every tag starting with 'v'
+ if: "github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')"
+ # alternatively, to publish when a GitHub Release is created, use the following rule:
+ # if: github.event_name == 'release' && github.event.action == 'published'
+ steps:
+ - uses: actions/download-artifact@v2
+ with:
+ name: artifact
+ path: dist
+
+ - uses: pypa/gh-action-pypi-publish@v1.4.2
+ with:
+ user: __token__
+ password: ${{ secrets.PYPI_PASSWORD }}
+ # To test: repository_url: https://test.pypi.org/legacy/
+
+ upload_pypi_test:
+ needs: [build_wheels, build_sdist]
+ runs-on: ubuntu-latest
+ # upload to PyPI on every tag starting with 'v'
+ if: "github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/test-v')"
+ # alternatively, to publish when a GitHub Release is created, use the following rule:
+ # if: github.event_name == 'release' && github.event.action == 'published'
+ steps:
+ - uses: actions/download-artifact@v2
+ with:
+ name: artifact
+ path: dist
+
+ - uses: pypa/gh-action-pypi-publish@v1.4.2
+ with:
+ user: __token__
+ password: ${{ secrets.PYPI_PASSWORD_TEST }}
+ repository_url: https://test.pypi.org/legacy/
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 7e436af..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,59 +0,0 @@
-language: python
-cache:
- directories:
- - "$HOME/.cache/pip"
- - "$HOME/.pyenv"
-matrix:
- include:
- - name: 'Ubuntu: 3.8'
- os: linux
- python: 3.8
- - name: 'Ubuntu: 3.7'
- os: linux
- python: 3.7
- - name: 'Ubuntu: 3.6'
- os: linux
- python: 3.6
- - name: 'Ubuntu: 3.5'
- os: linux
- python: 3.5
- - name: 'Ubuntu: 2.7'
- os: linux
- python: 2.7
- - name: 'Ubuntu: PyPy 3.5'
- os: linux
- env: PYPY_URL=https://bitbucket.org/pypy/pypy/downloads/pypy3-v6.0.0-linux64.tar.bz2
- - name: 'Ubuntu: PyPy 2.7'
- os: linux
- env: PYPY_URL=https://bitbucket.org/pypy/pypy/downloads/pypy2-v6.0.0-linux64.tar.bz2
- - name: 'OSX: 3.7'
- os: osx
- language: generic
- env: PYENV_VERSION=3.7.4 BUILD_SDIST=true
- osx_image: xcode_9.4
- - name: 'OSX: 3.6'
- os: osx
- language: generic
- env: PYENV_VERSION=3.6.5
- osx_image: xcode_9.4
- - name: 'OSX: 2.7'
- os: osx
- language: generic
- env: PYENV_VERSION=2.7.15
- osx_image: xcode_9.4
-install:
-- "./.travis/install.sh"
-script:
-- "./.travis/run.sh"
-deploy:
- provider: releases
- api_key:
- secure: ik/Btxv+NMOGjKuNnilYSeATYwL7sHy8nildzQcF+GMCFL8mDcerXRoC1jOF+ETsmSOAZ95NOEUGNiyvCApy4VgYvBvz7mJzdaob034+GXOStEIdBBvV8v9XB9XwQpJUUGvRMSF9WMUGmhyQ9PQEPOHfERgLkdlcY24djCJm/6A=
- file:
- - dist/*.whl
- - dist/*.tar.gz
- file_glob: true
- on:
- repo: xattr/xattr
- tags: true
- skip_cleanup: true
diff --git a/.travis/install.sh b/.travis/install.sh
deleted file mode 100755
index 1ff4a03..0000000
--- a/.travis/install.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-
-set -e
-set -x
-
-install_pypy() {
- pypy_dir="/home/travis/pypy"
- curl -L "$PYPY_URL" -o "pypy.tar.bz2"
- mkdir "$pypy_dir"
- tar xf "pypy.tar.bz2" -C "$pypy_dir" --strip-components=1
- if [ -f "$pypy_dir/bin/pypy" ]; then
- ln -s "$pypy_dir/bin/pypy" "pypy"
- elif [ -f "$pypy_dir/bin/pypy3" ]; then
- ln -s "$pypy_dir/bin/pypy3" "pypy"
- fi
- ./pypy -m ensurepip
-}
-
-install_pyenv() {
- brew update > /dev/null
- brew upgrade readline openssl pyenv
- eval "$(pyenv init -)"
- pyenv install -sv "$PYENV_VERSION"
- pip install --upgrade pip
- pyenv rehash
- python -m pip install wheel
-}
-
-if [[ -n "$PYPY_URL" ]]; then
- install_pypy
-elif [[ -n "$PYENV_VERSION" && "$TRAVIS_OS_NAME" == "osx" ]]; then
- install_pyenv
-fi
diff --git a/.travis/run.sh b/.travis/run.sh
deleted file mode 100755
index 206bf68..0000000
--- a/.travis/run.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-
-set -e
-set -x
-
-if [[ -n "$PYENV_VERSION" ]]; then
- eval "$(pyenv init -)"
-fi
-
-if [[ -n "$PYPY_URL" ]]; then
- cmd=./pypy
-else
- cmd=python
-fi
-
-"$cmd" setup.py build_ext -i
-"$cmd" -m compileall -f .
-"$cmd" setup.py test
-
-if [[ -n "$PYENV_VERSION" && "$TRAVIS_OS_NAME" == 'osx' ]]; then
- python setup.py bdist_wheel
-fi
-
-if [[ "$BUILD_SDIST" == 'true' ]]; then
- "$cmd" setup.py sdist --formats=gztar
- # Ensure the package installs from tarball correctly.
- filename=$("$cmd" setup.py --fullname)
- pip install "dist/$filename.tar.gz"
-fi
diff --git a/CHANGES.txt b/CHANGES.txt
index 5192a73..0db3bd2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,12 @@
+Version 0.9.8 released 2021-11-19
+
+* Update build to use Github Actions
+ https://github.com/xattr/xattr/pull/95
+* Various dump related fixes
+ https://github.com/xattr/xattr/pull/93
+* Fix classifiers list
+ https://github.com/xattr/xattr/pull/89
+
Version 0.9.7 released 2019-12-02
* Fix xattr().update() in Python 3
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..13cbddf
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,14 @@
+[tool.cibuildwheel]
+test-requires = "pytest"
+test-command = "pytest {project}/xattr/tests"
+
+[tool.cibuildwheel.linux]
+before-all = "yum install -y libffi-devel"
+
+[[tool.cibuildwheel.overrides]]
+select = "*-manylinux2_*"
+before-all = "apt-get -y install libffi-dev"
+
+[[tool.cibuildwheel.overrides]]
+select = "*-musllinux*"
+before-all = "apk add libffi-dev" \ No newline at end of file
diff --git a/setup.py b/setup.py
index 0f1af60..928ab2a 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ import sys
from setuptools import setup
-VERSION = '0.9.7'
+VERSION = '0.9.8'
DESCRIPTION = "Python wrapper for extended filesystem attributes"
LONG_DESCRIPTION = """
Extended attributes extend the basic attributes of files and directories
@@ -49,8 +49,9 @@ setup(
"xattr = xattr.tool:main",
],
},
- install_requires=["cffi>=1.0.0"],
- setup_requires=["cffi>=1.0.0"],
+ # Keep this in sync with pyproject.toml
+ install_requires=["cffi>=1.0"],
+ setup_requires=["cffi>=1.0"],
cffi_modules=["xattr/lib_build.py:ffi"],
test_suite="xattr.tests.all_tests_suite",
zip_safe=False,
diff --git a/xattr/__init__.py b/xattr/__init__.py
index 50780b4..4e5a517 100644
--- a/xattr/__init__.py
+++ b/xattr/__init__.py
@@ -7,7 +7,7 @@ The xattr type wraps a path or file descriptor with a dict-like interface
that exposes these extended attributes.
"""
-__version__ = '0.9.7'
+__version__ = '0.9.8'
from .compat import integer_types
from .lib import (XATTR_NOFOLLOW, XATTR_CREATE, XATTR_REPLACE,
diff --git a/xattr/tests/__init__.py b/xattr/tests/__init__.py
index 739dd58..3e75a10 100644
--- a/xattr/tests/__init__.py
+++ b/xattr/tests/__init__.py
@@ -6,6 +6,7 @@ import unittest
def all_tests_suite():
suite = unittest.TestLoader().loadTestsFromNames([
'xattr.tests.test_xattr',
+ 'xattr.tests.test_tool',
])
return suite