Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
07c719e
pgqwin(), Python2+3 Linux/OSX compat, C.Bassa fork
haavee Jun 29, 2018
784bb32
towards linking to specific cpgplot/pgplot
Jul 17, 2018
edbf44d
fixes for Python3/MacOSX
haavee Jul 17, 2018
d0dfdbe
Update INSTALL with some documentation
haavee Jul 17, 2018
f5f6928
Added pgpt1 functionality
Aug 21, 2018
42f9fe9
Added pgerr1 functionality
Aug 21, 2018
a208ef0
Merge pull request #2 from cbassa/add-pgerr1
haavee Aug 22, 2018
0fde157
Fix function name
cbassa Aug 22, 2018
17c9057
Merge branch 'master' into add-pgpt1
haavee Aug 22, 2018
0f45866
Merge pull request #1 from cbassa/add-pgpt1
haavee Aug 22, 2018
8d4b8b8
It's time to do modern building
Feb 6, 2025
8bcbf5d
First step to building with pip install/numpy
Feb 6, 2025
e3c6c94
setup.cfg was unnecessary
Feb 6, 2025
793f9f3
The extension buils & works±
Feb 7, 2025
f9e7074
Cleaner config, still supporting PGPLOT_DIR
Feb 7, 2025
2aef5d3
Fix up documentation
Feb 7, 2025
2a4dead
Fix Numpy API warnings, compiler warnings
Feb 7, 2025
1399482
Fix pkgconfig.configure_extension() breakage
Feb 7, 2025
ebb66e9
Update README
Feb 7, 2025
dbecf7e
Modernized numpy examples
Feb 7, 2025
cd6feac
Need to incref the array descriptor too
Feb 7, 2025
22976ed
Fixed up numpy examples, deleted others
Feb 7, 2025
ea4ddfd
Mention fixes + how-to branch for python 3.6
haavee Feb 19, 2025
70ae6a2
Version needs to be in pyproject, not just tag
Apr 15, 2025
6dae5f0
Initial mods to support PyPI
Apr 22, 2025
0a9ed3b
More preparations for PyPIing
Apr 22, 2025
4df6415
pyproject vsn to 1.5.0-beta
Apr 22, 2025
9119118
Add build_wheels & push-to-pypi workflows
Apr 22, 2025
c7e395c
Complaint "No event triggers defined in 'on'"
Apr 22, 2025
7454013
Maybe this helps?
Apr 22, 2025
de96f87
Ah. Maybe upload_pypi is a step in build_wheels ..
Apr 22, 2025
595b08d
Separate workflows for build + publish on PyPI
Aug 6, 2025
75d7a3b
Fix duplicate workflow name
Aug 6, 2025
eb6bca1
Add installation of OS-level deps step
Aug 6, 2025
d1c7dd2
Fixed "Syntax Error" - forgot "endif"
Aug 6, 2025
dd2c0d1
*sigh* I'm getting auld -it's "fi" in shell speak
Aug 6, 2025
968162a
Force use of "bash" as shell ...
Aug 6, 2025
6de8190
Fix cibuildwheel step
Aug 8, 2025
27b7355
Find libX11 on macos
Aug 8, 2025
d1568bf
Disable some builds
Aug 8, 2025
3df44f6
Replace build_wheels step in publish workflow
Aug 8, 2025
ec30b91
Add sdist, collect+flatten artefacts, check
Aug 8, 2025
dc89166
Only run manually, add building source dist
Aug 8, 2025
fca657f
Gah
Aug 8, 2025
826a245
Fix setup.py to allow source dist building
Aug 8, 2025
4d4baeb
Allow manual run + skip publish to PyPI
Aug 8, 2025
e990de0
Fix typo in original author's name
Aug 8, 2025
fe11002
Add a workflow that published to test.pypi.org
Aug 8, 2025
ceda47b
Build wheels now works, back to on demand run
Aug 8, 2025
2993f92
Improve some of the metadata
Aug 8, 2025
bf9dda3
Bump to v1.6.0
Aug 8, 2025
10626b6
Initial go at numpy1.x/2.x compat at the same time
Aug 11, 2025
b30cd61
No Numpy2 on any cp38-*
Aug 11, 2025
3d3b1a7
Found root cause of numpy ABI misbehaving
Aug 12, 2025
f1026ed
doc + requirements now consistent on Py3.9+
Aug 12, 2025
9eaa626
Run build_wheels on push to fix-* branches
Aug 11, 2025
9978d5d
Start working on conda recipe
Aug 12, 2025
88af67c
Fixup some beginner/n00b mistakes
Aug 12, 2025
0e67630
Robustify recipe, now also works after purge
Aug 12, 2025
8151f45
Add conda documentation
Aug 12, 2025
a84efe4
Loonix need gfortran and xorg-x11-proto-devel
Aug 12, 2025
3f21862
Indicate LGPL, update contributors in pyproject
Aug 12, 2025
2e196f4
Bump recipe to use v1.6.1
Aug 12, 2025
640acd8
Fix workflow trigger on every push
Aug 12, 2025
437956e
Add proper license stuff (fixup)
Aug 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Build Wheels

on:
workflow_dispatch:
push:
branches:
- fix-*

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest] # add windows-latest later

steps:
- uses: actions/checkout@v4

# Dependencies are now handled by cibuildwheel's before-all hooks
# No need to install them on the runner

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install cibuildwheel

- name: Build wheels
run: cibuildwheel --output-dir dist
env:
# Install system dependencies and build giza from source
# giza-devel is not available in AlmaLinux 8 EPEL, so we build from source
# Install build dependencies for RHEL/CentOS/AlmaLinux
# Fallback for Debian/Ubuntu systems
# Download and build giza from source
CIBW_BEFORE_ALL_LINUX: |
(which apt || which yum || which dnf) &&
((yum install -y gcc make cairo-devel libX11-devel pkgconfig wget tar gzip) ||
(apt-get update && apt-get install -y gcc make libcairo2-dev libx11-dev pkg-config wget tar gzip)) &&
cd /tmp &&
wget https://github.com/danieljprice/giza/archive/refs/tags/v1.4.2.tar.gz &&
tar -xzf v1.4.2.tar.gz &&
cd giza-1.4.2 &&
export CFLAGS=-fPIC &&
./configure --prefix=/usr/local &&
make &&
make install &&
ldconfig
CIBW_BEFORE_ALL_MACOS: "brew install giza libx11 pkg-config"
CIBW_BEFORE_ALL_WINDOWS: "echo 'Windows support not implemented yet'"
# Ensure pkg-config and runtime linker can find giza
CIBW_ENVIRONMENT_LINUX: "PKG_CONFIG_PATH=/usr/local/lib/pkgconfig LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH"
CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=14.0 PKG_CONFIG_PATH=$(brew --prefix)/lib/pkgconfig DYLD_FALLBACK_LIBRARY_PATH=$(brew --prefix)/lib:$DYLD_FALLBACK_LIBRARY_PATH"
# Avoid universal2 since Homebrew giza isn’t universal
CIBW_ARCHS_MACOS: "native"
# Smoke test to verify import/linking works inside each wheel env
CIBW_TEST_COMMAND: >
python -c 'import ppgplot; print("ok")'

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: python-pgplot-wheels-${{ matrix.os }}
path: dist/

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build

- name: Build sdist
run: python -m build --sdist

- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: python-pgplot-sdist
path: dist/*.tar.gz
146 changes: 146 additions & 0 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
name: Build and Publish Wheels

on:
push:
tags:
- "v*.*.*"
workflow_dispatch: # Manual trigger for testing
inputs:
dry_run:
description: 'Dry run (skip actual PyPI upload)'
required: false
default: 'true'
type: boolean

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest] # add windows-latest later

steps:
- uses: actions/checkout@v4

# Dependencies are now handled by cibuildwheel's before-all hooks
# No need to install them on the runner

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install cibuildwheel

- name: Build wheels
run: cibuildwheel --output-dir dist
env:
# Install system dependencies and build giza from source
# giza-devel is not available in AlmaLinux 8 EPEL, so we build from source
# Install build dependencies for RHEL/CentOS/AlmaLinux
# Fallback for Debian/Ubuntu systems
# Download and build giza from source
CIBW_BEFORE_ALL_LINUX: |
(which apt || which yum || which dnf) &&
((yum install -y gcc make cairo-devel libX11-devel pkgconfig wget tar gzip) ||
(apt-get update && apt-get install -y gcc make libcairo2-dev libx11-dev pkg-config wget tar gzip)) &&
cd /tmp &&
wget https://github.com/danieljprice/giza/archive/refs/tags/v1.4.2.tar.gz &&
tar -xzf v1.4.2.tar.gz &&
cd giza-1.4.2 &&
export CFLAGS=-fPIC &&
./configure --prefix=/usr/local &&
make &&
make install &&
ldconfig
CIBW_BEFORE_ALL_MACOS: "brew install giza libx11 pkg-config"
CIBW_BEFORE_ALL_WINDOWS: "echo 'Windows support not implemented yet'"
# Ensure pkg-config and runtime linker can find giza
CIBW_ENVIRONMENT_LINUX: "PKG_CONFIG_PATH=/usr/local/lib/pkgconfig LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH"
CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=14.0 PKG_CONFIG_PATH=$(brew --prefix)/lib/pkgconfig DYLD_FALLBACK_LIBRARY_PATH=$(brew --prefix)/lib:$DYLD_FALLBACK_LIBRARY_PATH"
# Avoid universal2 since Homebrew giza isn’t universal
CIBW_ARCHS_MACOS: "native"
# Smoke test to verify import/linking works inside each wheel env
CIBW_TEST_COMMAND: >
python -c 'import ppgplot; print("ok")'

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: python-pgplot-wheels-${{ matrix.os }}
path: dist/

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build

- name: Build sdist
run: python -m build --sdist

- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: python-pgplot-sdist
path: dist/*.tar.gz

publish_pypi:
name: Publish to PyPI
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist/

- name: Flatten artifacts
run: |
find dist/ -name "*.whl" -exec mv {} dist/ \;
find dist/ -name "*.tar.gz" -exec mv {} dist/ \;
find dist/ -mindepth 1 -type d -exec rm -rf {} + || true

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install Twine
run: pip install twine

- name: Verify distributions
run: |
ls -la dist/
twine check dist/*

- name: Publish to PyPI
if: ${{ !inputs.dry_run }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*

- name: Dry run - show what would be uploaded
if: ${{ inputs.dry_run }}
run: |
echo "DRY RUN: Would upload the following files to PyPI:"
ls -la dist/
echo "Files passed twine check - ready for upload!"
120 changes: 120 additions & 0 deletions .github/workflows/test_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Test Build and Publish

on:
workflow_dispatch: # Manual trigger
push:
branches:
- test-pypi* #

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install cibuildwheel

- name: Build wheels
run: cibuildwheel --output-dir dist
env:
CIBW_BEFORE_ALL_LINUX: |
(which apt || which yum || which dnf) &&
((yum install -y gcc make cairo-devel libX11-devel pkgconfig wget tar gzip) ||
(apt-get update && apt-get install -y gcc make libcairo2-dev libx11-dev pkg-config wget tar gzip)) &&
cd /tmp &&
wget https://github.com/danieljprice/giza/archive/refs/tags/v1.4.2.tar.gz &&
tar -xzf v1.4.2.tar.gz &&
cd giza-1.4.2 &&
export CFLAGS=-fPIC &&
./configure --prefix=/usr/local &&
make &&
make install &&
ldconfig
CIBW_BEFORE_ALL_MACOS: "brew install giza libx11 pkg-config"
CIBW_ENVIRONMENT_LINUX: "PKG_CONFIG_PATH=/usr/local/lib/pkgconfig LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH"
CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=14.0 PKG_CONFIG_PATH=$(brew --prefix)/lib/pkgconfig DYLD_FALLBACK_LIBRARY_PATH=$(brew --prefix)/lib:$DYLD_FALLBACK_LIBRARY_PATH"
CIBW_ARCHS_MACOS: "native"
CIBW_TEST_COMMAND: >
python -c 'import ppgplot; print("ok")'

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: python-pgplot-wheels-${{ matrix.os }}
path: dist/

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build

- name: Build sdist
run: python -m build --sdist

- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: python-pgplot-sdist
path: dist/*.tar.gz

test_publish:
name: Test Publish to Test PyPI
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist/

- name: Flatten artifacts
run: |
find dist/ -name "*.whl" -exec mv {} dist/ \;
find dist/ -name "*.tar.gz" -exec mv {} dist/ \;
find dist/ -mindepth 1 -type d -exec rm -rf {} + || true

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install Twine
run: pip install twine

- name: Verify distributions
run: |
ls -la dist/
twine check dist/*

- name: Publish to Test PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
run: twine upload --repository testpypi dist/*
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
version 1.6
- Python2/3 compatibility, numpy 1.x/2.x compatibility
- github actions to build wheels and publish to (test)PyPI
- setup.py can build source dists
version 1.5*
- Fake version for experimenting w/ PyPI by n00b
version 1.4
- Now ppgplot uses the "numpy" module by default, reverting to "numarray"
and then "Numeric", respectively, if the preferred module is not found.
Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@

PPGPLOT CONTRIBUTORS:

Marjolein Verkouter continued supporting a fork of NickP's repo, making it
Py2/Py3, numpy1.x/2.x compatible, and make the extension pip-installable.
Added some functionality and incorporated patches from C. Bassa on his fork
of the original repo.

Steven Bamford adapted ppgplot in 2007 to use numpy, in favour of the
depreciated numarray and Numeric modules, and included these minor
changes (mostly to setup.py) in the Google Code version (1.4) in April
Expand Down
Loading