Skip to content

Commit

Permalink
fixup! Adopting-ish openZIM bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaudin committed Sep 4, 2024
1 parent 1c1d47c commit d13cd09
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 15 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/CI-wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ on:
env:
LIBZIM_DL_VERSION: "9.2.3-2"
MACOSX_DEPLOYMENT_TARGET: "12.0"
PROFILE: "0"
CIBW_ENVIRONMENT_PASS_LINUX: "LIBZIM_DL_VERSION PROFILE"
CIBW_ENVIRONMENT_PASS_LINUX: "LIBZIM_DL_VERSION"
CIBW_BUILD_VERBOSITY: "3"


Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/Publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ on:
env:
LIBZIM_DL_VERSION: "9.2.3-2"
MACOSX_DEPLOYMENT_TARGET: "12.0"
PROFILE: "0"
CIBW_ENVIRONMENT_PASS_LINUX: "LIBZIM_DL_VERSION PROFILE"
CIBW_ENVIRONMENT_PASS_LINUX: "LIBZIM_DL_VERSION"
# APPLE_SIGNING_KEYCHAIN_PATH set in prepare keychain step
APPLE_SIGNING_KEYCHAIN_PROFILE: "build-profile"
APPLE_SIGNING_IDENTITY: "${{ secrets.APPLE_SIGNING_IDENTITY }}"
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/QA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on: [push]
env:
LIBZIM_DL_VERSION: "9.2.3-2"
MACOSX_DEPLOYMENT_TARGET: "12.0"
PROFILE: "0"

jobs:
lint:
Expand All @@ -29,6 +28,5 @@ jobs:
- name: Check ruff
run: inv lint-ruff

# disabled until we add stubs so it has some use
# - name: Check pyright
# run: inv check-pyright
- name: Check pyright
run: inv check-pyright
2 changes: 1 addition & 1 deletion .github/workflows/Tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push]
env:
LIBZIM_DL_VERSION: "9.2.3-2"
MACOSX_DEPLOYMENT_TARGET: "12.0"
# on by default now but shows intent
# we want cython traces for coverage
PROFILE: "1"

jobs:
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Our [PyPI wheels](https://pypi.org/project/libzim/) bundle a [recent release](ht
- Linux+musl for `x86_64` and `aarch64`
- Windows for `x64`

Wheels are available for both CPython and PyPy.
Wheels are available for both CPython only (but can be built for Pypy).

Users on other platforms can install the source distribution (see [Building](#Building) below).

Expand All @@ -35,9 +35,7 @@ Users on other platforms can install the source distribution (see [Building](#Bu

```sh
git clone [email protected]:openzim/python-libzim.git && cd python-libzim
# python -m venv env && source env/bin/activate
pip install -e .
# invoke --list for available development helpers
# hatch run test:coverage
```

See [CONTRIBUTING.md](./CONTRIBUTING.md) for additional details then [Open a ticket](https://github.com/openzim/python-libzim/issues/new) or submit a Pull Request on Github 🤗!
Expand Down Expand Up @@ -160,7 +158,7 @@ with Creator("test.zim") as creator:
| `LIBZIM_DL_VERSION` | `8.1.1` or `2023-04-14` | Specify the C++ libzim binary version to download and bundle. Either a release version string or a date, in which case it downloads a nightly |
| `USE_SYSTEM_LIBZIM` | `1` | Uses `LDFLAG` and `CFLAGS` to find the libzim to link against. Resulting wheel won't bundle C++ libzim. |
| `DONT_DOWNLOAD_LIBZIM` | `1` | Disable downloading of C++ libzim. Place headers in `include/` and libzim dylib/so in `libzim/` if no using system libzim. It will be bundled in wheel. |
| `PROFILE` | `0` | Toggle profile tracing in Cython extension. Required for Cython code coverage reporting. **ON by default**. Set to `0` to disable. |
| `PROFILE` | `0` | Enable profile tracing in Cython extension. Required for Cython code coverage reporting. |
| `SIGN_APPLE` | `1` | Set to sign and notarize the extension for macOS. Requires following informations |
| `APPLE_SIGNING_IDENTITY` | `Developer ID Application: OrgName (ID)` | Required for signing on macOS |
| `APPLE_SIGNING_KEYCHAIN_PATH` | `/tmp/build.keychain` | Path to the Keychain containing the certificate to sign for macOS with |
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Config:
download_libzim: bool = not bool(os.getenv("DONT_DOWNLOAD_LIBZIM") or False)

# toggle profiling for coverage report in Cython
profiling: bool = os.getenv("PROFILE", "1") == "1"
profiling: bool = os.getenv("PROFILE", "0") == "1"

# macOS signing
should_sign_apple: bool = bool(os.getenv("SIGN_APPLE") or False)
Expand Down

0 comments on commit d13cd09

Please sign in to comment.