diff --git a/.github/workflows/CI-wheels.yaml b/.github/workflows/CI-wheels.yaml index 37e7412..0b1a183 100644 --- a/.github/workflows/CI-wheels.yaml +++ b/.github/workflows/CI-wheels.yaml @@ -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" diff --git a/.github/workflows/Publish.yaml b/.github/workflows/Publish.yaml index 63c284c..8cc2a10 100644 --- a/.github/workflows/Publish.yaml +++ b/.github/workflows/Publish.yaml @@ -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 }}" diff --git a/.github/workflows/QA.yaml b/.github/workflows/QA.yaml index dac48f2..313c47d 100644 --- a/.github/workflows/QA.yaml +++ b/.github/workflows/QA.yaml @@ -4,7 +4,6 @@ on: [push] env: LIBZIM_DL_VERSION: "9.2.3-2" MACOSX_DEPLOYMENT_TARGET: "12.0" - PROFILE: "0" jobs: lint: @@ -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 diff --git a/.github/workflows/Tests.yaml b/.github/workflows/Tests.yaml index e2166f3..be20710 100644 --- a/.github/workflows/Tests.yaml +++ b/.github/workflows/Tests.yaml @@ -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: diff --git a/README.md b/README.md index 0b371d8..3023d59 100644 --- a/README.md +++ b/README.md @@ -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). @@ -35,9 +35,7 @@ Users on other platforms can install the source distribution (see [Building](#Bu ```sh git clone git@github.com: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 🤗! @@ -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 | diff --git a/setup.py b/setup.py index c6b65f6..774e6a7 100755 --- a/setup.py +++ b/setup.py @@ -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)