Skip to content

Commit

Permalink
Update xcookie
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Sep 13, 2024
1 parent 6b1db7c commit 165dbc4
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 18 deletions.
52 changes: 36 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4.1.1
- name: Set up Python 3.12 for linting
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5.1.1
with:
python-version: '3.12'
- name: Install dependencies
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4.1.1
- name: Set up Python 3.12
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5.1.1
with:
python-version: '3.12'
- name: Upgrade pip
Expand All @@ -62,9 +62,9 @@ jobs:
- name: Build sdist
shell: bash
run: |-
python -m pip install pip -U
python -m pip install setuptools>=0.8 wheel build
python -m pip install setuptools>=0.8 wheel build twine
python -m build --sdist --outdir wheelhouse
python -m twine check ./wheelhouse/line_profiler*.tar.gz
- name: Install sdist
run: |-
ls -al wheelhouse
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
name: Upload sdist artifact
with:
name: sdist_wheels
path: wheelhouse/*.tar.gz
path: ./wheelhouse/line_profiler*.tar.gz
build_binpy_wheels:
##
# Build the binary wheels. Note: even though cibuildwheel will test
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
uses: ilammy/msvc-dev-cmd@v1
if: matrix.os == 'windows-latest' && ${{ contains(matrix.cibw_skip, '*-win32') }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v3.0.0
if: runner.os == 'Linux' && matrix.arch != 'auto'
with:
platforms: all
Expand All @@ -151,7 +151,7 @@ jobs:
shell: bash
run: ls -la wheelhouse
- name: Set up Python 3.12 to combine coverage
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5.1.1
if: runner.os == 'Linux'
with:
python-version: '3.12'
Expand All @@ -170,6 +170,14 @@ jobs:
echo '### The cwd should now have a coverage.xml'
ls -altr
pwd
- uses: codecov/codecov-action@v4.0.1
name: Codecov Upload
env:
HAVE_CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN != '' }}
if: ${{ env.HAVE_PERSONAL_TOKEN == 'true' }}
with:
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
- uses: codecov/codecov-action@v4.0.1
name: Codecov Upload
with:
Expand Down Expand Up @@ -320,12 +328,12 @@ jobs:
uses: ilammy/msvc-dev-cmd@v1
if: matrix.os == 'windows-latest'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v3.0.0
if: runner.os == 'Linux' && matrix.arch != 'auto'
with:
platforms: all
- name: Setup Python
uses: actions/setup-python@v5.0.0
uses: actions/setup-python@v5.1.1
with:
python-version: ${{ matrix.python-version }}
- uses: actions/download-artifact@v2.1.1
Expand All @@ -343,11 +351,23 @@ jobs:
echo "Installing helpers"
pip install setuptools>=0.8 setuptools_scm wheel build -U
pip install tomli pkginfo
export WHEEL_FPATH=$(python -c "import pathlib; print(str(sorted(pathlib.Path('wheelhouse').glob('line_profiler*.whl'))[-1]).replace(chr(92), chr(47)))")
export MOD_VERSION=$(python -c "from pkginfo import Wheel; print(Wheel('$WHEEL_FPATH').version)")
echo "$WHEEL_FPATH=WHEEL_FPATH"
echo "$INSTALL_EXTRAS=INSTALL_EXTRAS"
echo "$MOD_VERSION=MOD_VERSION"
export WHEEL_FPATH=$(python -c "if 1:
import pathlib
dist_dpath = pathlib.Path('wheelhouse')
candidates = list(dist_dpath.glob('line_profiler*.whl'))
candidates += list(dist_dpath.glob('line_profiler*.tar.gz'))
fpath = sorted(candidates)[-1]
print(str(fpath).replace(chr(92), chr(47)))
")
export MOD_VERSION=$(python -c "if 1:
from pkginfo import Wheel, SDist
fpath = '$WHEEL_FPATH'
cls = Wheel if fpath.endswith('.whl') else SDist
print(cls(fpath).version)
")
echo "WHEEL_FPATH=$WHEEL_FPATH"
echo "INSTALL_EXTRAS=$INSTALL_EXTRAS"
echo "MOD_VERSION=$MOD_VERSION"
pip install --prefer-binary "line_profiler[$INSTALL_EXTRAS]==$MOD_VERSION" -f wheelhouse
echo "Install finished."
- name: Test wheel ${{ matrix.install-extras }}
Expand Down Expand Up @@ -402,7 +422,7 @@ jobs:
file: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
test_deploy:
name: Uploading Test to PyPi
name: Deploy Test
runs-on: ubuntu-latest
if: github.event_name == 'push' && ! startsWith(github.event.ref, 'refs/tags') && ! startsWith(github.event.ref, 'refs/heads/release')
needs:
Expand Down Expand Up @@ -476,7 +496,7 @@ jobs:
wheelhouse/*.asc
wheelhouse/*.ots
live_deploy:
name: Uploading Live to PyPi
name: Deploy Live
runs-on: ubuntu-latest
if: github.event_name == 'push' && (startsWith(github.event.ref, 'refs/tags') || startsWith(github.event.ref, 'refs/heads/release'))
needs:
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# need to edit the conf.py
cd ~/code/line_profiler/docs
sphinx-apidoc --private --separate -f -o ~/code/line_profiler/docs/source/auto ~/code/line_profiler/line_profiler
sphinx-apidoc --private --separate --force --output-dir ~/code/line_profiler/docs/source/auto ~/code/line_profiler/line_profiler
# Note: the module should importable before running this
# (e.g. install it in developer mode or munge the PYTHONPATH)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ mod_name = "line_profiler"
repo_name = "line_profiler"
rel_mod_parent_dpath = "."
os = [ "all", "linux", "osx", "win",]
min_python = 3.6
min_python = '3.6'
author = "Robert Kern"
author_email = "robert.kern@enthought.com"
description = "Line-by-line profiler"
Expand Down

0 comments on commit 165dbc4

Please sign in to comment.