diff --git a/.github/workflows/ci2.yml b/.github/workflows/ci2.yml deleted file mode 100644 index 1300fb5..0000000 --- a/.github/workflows/ci2.yml +++ /dev/null @@ -1,352 +0,0 @@ -name: ci - -on: - push: - branches: - - main - tags: - - '**' - pull_request: {} - -env: - COLUMNS: 150 - PKG_CONFIG_ALLOW_CROSS: 1 - -jobs: - rust-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - id: cache-rust - name: cache rust - uses: Swatinem/rust-cache@v2 - with: - key: v3 - - - name: install rust stable - id: rust-toolchain - uses: dtolnay/rust-toolchain@stable - with: - components: llvm-tools - - - name: run test - run: cargo test -p database -p convert -p py_types - - build-sdist: - name: build sdist - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: PyO3/maturin-action@v1 - with: - command: sdist - args: --out dist - rust-toolchain: stable - - uses: actions/upload-artifact@v3 - with: - name: pypi_files - path: dist - - build: - name: build on ${{ matrix.platform || matrix.os }} (${{ matrix.target }} - ${{ matrix.manylinux || 'auto' }}) - # only run on push to main and on release - # if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'Full Build') - strategy: - fail-fast: false - matrix: - os: [ubuntu, macos, windows] - target: [x86_64, aarch64] - manylinux: [auto] - include: - - os: ubuntu - platform: linux - - os: windows - ls: dir - interpreter: 3.7 3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10 - - os: windows - ls: dir - target: i686 - python-architecture: x86 - interpreter: 3.7 3.8 3.9 3.10 3.11 3.12 - - os: windows - ls: dir - target: aarch64 - interpreter: 3.11 3.12 - - os: macos - target: aarch64 - interpreter: 3.7 3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10 - - os: ubuntu - platform: linux - target: i686 - - os: ubuntu - platform: linux - target: aarch64 - - - os: ubuntu - platform: linux - target: armv7 - interpreter: 3.7 3.8 3.9 3.10 3.11 3.12 - # musllinux - - os: ubuntu - platform: linux - target: x86_64 - manylinux: musllinux_1_1 - - os: ubuntu - platform: linux - target: aarch64 - manylinux: musllinux_1_1 - - os: ubuntu - platform: linux - target: ppc64le - interpreter: 3.7 3.8 3.9 3.10 3.11 3.12 - - os: ubuntu - platform: linux - target: s390x - interpreter: 3.7 3.8 3.9 3.10 3.11 3.12 - exclude: - # Optimized PGO builds for x86_64 manylinux and windows follow a different matrix, - # maybe in future maturin-action can support this automatically - - os: ubuntu - target: x86_64 - manylinux: auto - - os: windows - target: x86_64 - # Windows on arm64 only supports Python 3.11+ - - os: windows - target: aarch64 - - runs-on: ${{ matrix.os }}-latest - steps: - - uses: actions/checkout@v4 - - - name: set up python - uses: actions/setup-python@v4 - with: - python-version: '3.11' - architecture: ${{ matrix.python-architecture || 'x64' }} - - - run: pip install -U 'black>=22.3.0,<23' typing_extensions toml httpx - - - name: production - check package version - if: github.ref == 'refs/heads/main' - run: | - python .github/prod.py - - - name: release - check package version - if: contains(github.ref, 'release') - run: | - python .github/release.py - - - name: build wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - manylinux: ${{ matrix.manylinux || 'auto' }} - container: ${{ matrix.container }} - args: --release --out dist --interpreter ${{ matrix.interpreter || '3.7 3.8 3.9 3.10 3.11 3.12 pypy3.7 pypy3.8 pypy3.9 pypy3.10' }} ${{ matrix.extra-build-args }} - rust-toolchain: stable - docker-options: -e CI - - - run: ${{ matrix.ls || 'ls -lh' }} dist/ - - - uses: actions/upload-artifact@v3 - with: - name: pypi_files - path: dist - - build-pgo: - name: build pgo-optimized on ${{ matrix.platform || matrix.os }} (${{ matrix.interpreter}} - ${{ matrix.target }} - ${{ matrix.manylinux || 'auto' }}) - # only run on push to main and on release - # if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'Full Build') - strategy: - fail-fast: false - matrix: - os: [ubuntu, windows] - target: [x86_64] - manylinux: [auto] - interpreter: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev", "pypy3.7", "pypy3.8", "pypy3.9", "pypy3.10"] - include: - - os: ubuntu - platform: linux - - os: windows - ls: dir - - interpreter: 3.12-dev - maturin-interpreter: "3.12" - - runs-on: ${{ matrix.os }}-latest - steps: - - uses: actions/checkout@v4 - - - name: set up python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.interpreter }} - architecture: ${{ matrix.python-architecture || 'x64' }} - - - name: install rust stable - id: rust-toolchain - uses: dtolnay/rust-toolchain@stable - with: - components: llvm-tools - - - run: pip install -U 'black>=22.3.0,<23' typing_extensions toml httpx - - - name: production - check package version - if: github.ref == 'refs/heads/main' - run: | - python .github/prod.py - - - name: release - check package version - if: contains(github.ref, 'release') - run: | - python .github/release.py - - - name: build initial wheel - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - manylinux: ${{ matrix.manylinux || 'auto' }} - args: > - --release - --out pgo-wheel - --interpreter ${{ matrix.maturin-interpreter || matrix.interpreter }} - rust-toolchain: stable - docker-options: -e CI - env: - RUSTFLAGS: "-Cprofile-generate=${{ github.workspace }}/profdata" - - - name: detect rust host - run: echo RUST_HOST=$(rustc -Vv | grep host | cut -d ' ' -f 2) >> "$GITHUB_ENV" - shell: bash - - - name: generate pgo data - run: | - pip install -U pip - pip install -r tests/requirements.txt - pip install pysqlx-core --no-index --no-deps --find-links pgo-wheel --force-reinstall - pytest tests/benchmarks - rustup run stable bash -c 'echo LLVM_PROFDATA=$RUSTUP_HOME/toolchains/$RUSTUP_TOOLCHAIN/lib/rustlib/${{ env.RUST_HOST }}/bin/llvm-profdata >> "$GITHUB_ENV"' - - - name: merge pgo data - run: ${{ env.LLVM_PROFDATA }} merge -o ${{ github.workspace }}/merged.profdata ${{ github.workspace }}/profdata - - - name: build pgo-optimized wheel - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - manylinux: ${{ matrix.manylinux || 'auto' }} - args: > - --release - --out dist - --interpreter ${{ matrix.maturin-interpreter || matrix.interpreter }} - rust-toolchain: stable - docker-options: -e CI - env: - RUSTFLAGS: "-Cprofile-use=${{ github.workspace }}/merged.profdata" - - - run: ${{ matrix.ls || 'ls -lh' }} dist/ - - - uses: actions/upload-artifact@v3 - with: - name: pypi_files - path: dist - - release: - name: Release - if: contains(github.ref, 'main') || contains(github.ref, 'release') - needs: [build,build-pgo] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: set up python - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: install deps - run: pip install -U twine toml httpx - - - name: production - check package version - if: github.ref == 'refs/heads/main' - run: | - python .github/prod.py - - - name: release - check package version - if: contains(github.ref, 'release') - run: | - python .github/release.py - - - name: download articart - uses: actions/download-artifact@v3 - with: - name: pypi_files - path: dist - - - run: twine check --strict dist/* - - - name: upload to pypi - run: twine upload dist/* - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} - - - name: create release - if: github.ref == 'refs/heads/main' - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ env.PY_SQLX_VERSION }} - release_name: ${{ env.PY_SQLX_VERSION }} - body: | - Changes in this Release - ${{ github.event.head_commit.message }} - draft: false - prerelease: false - - needs: [test-builds-arch, test-builds-os, build-sdist, check] - if: success() && startsWith(github.ref, 'refs/tags/') - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: set up python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - run: pip install -U twine - - - name: check package version - run: python .github/check_version.py - - - name: get dist artifacts - uses: actions/download-artifact@v3 - with: - name: pypi_files - path: dist - - - run: twine check --strict dist/* - - - name: upload to pypi - run: twine upload dist/* - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.pypi_token }} - - - name: get wasm dist artifacts - uses: actions/download-artifact@v3 - with: - name: wasm_wheels - path: wasm - - - name: upload to github release - uses: softprops/action-gh-release@v1 - with: - files: | - wasm/*.whl - prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }} \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index e476066..5a44369 100644 --- a/poetry.lock +++ b/poetry.lock @@ -232,24 +232,25 @@ requirements-deprecated-finder = ["pip-api", "pipreqs"] [[package]] name = "maturin" -version = "0.13.7" +version = "1.3.1" description = "Build and publish crates with pyo3, rust-cpython and cffi bindings as well as rust binaries as python packages" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "maturin-0.13.7-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:bc58b0266a4c124f9afd69a987ac324ff35c0d963b41073ed64a32f94c226d5a"}, - {file = "maturin-0.13.7-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:424d53adc9684167cf89829275fe5072331a197de0ac08e7a893f9283c7df213"}, - {file = "maturin-0.13.7-py3-none-manylinux_2_12_i686.manylinux2010_i686.musllinux_1_1_i686.whl", hash = "sha256:3137876c338eb7e551ba44a609b5f02d02454d1b3a8677ad6bf2121c5a92b2b7"}, - {file = "maturin-0.13.7-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl", hash = "sha256:a96f1b3ede71c0f76b8c7cfac18a9eec90174bdf434fa9aeff491be9a7ca5179"}, - {file = "maturin-0.13.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:0b6ac1219a809155057fd1f358f7ece03c3abd2e2991832ce5146825a9fa4160"}, - {file = "maturin-0.13.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl", hash = "sha256:3c36f429adc3a8af8de9838399750742a86053f0031a953b48ee92932120dc0c"}, - {file = "maturin-0.13.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.musllinux_1_1_ppc64le.whl", hash = "sha256:bb3a2830d64ae6a324571f694475b91111e827bc0ccc60a0c47f4fb596a46bd8"}, - {file = "maturin-0.13.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:794f58d3103449f8cd8ab5f36fd05c31b8d8de3643cd0e3720fd5dc3c328dd5c"}, - {file = "maturin-0.13.7-py3-none-win32.whl", hash = "sha256:63586eb286866264ec62d29df6ab955360de6226128f67d14623ffe1a12d4963"}, - {file = "maturin-0.13.7-py3-none-win_amd64.whl", hash = "sha256:f50d62aca567fdbbb929771794f3c5c78048ef0efa4af7d83ed472a8b8d26454"}, - {file = "maturin-0.13.7-py3-none-win_arm64.whl", hash = "sha256:8c6225e7eba2885a0cd82a6cf898e74bb720796a5744e0450f3b1340d1ca97af"}, - {file = "maturin-0.13.7.tar.gz", hash = "sha256:c0a77aa0c57f945649ca711c806203a1b6888ad49c2b8b85196ffdcf0421db77"}, + {file = "maturin-1.3.1-py3-none-linux_armv6l.whl", hash = "sha256:925f8324d9bbe8fad90b73ebc6c7f6f594645e7f13af50bded72606b6c233208"}, + {file = "maturin-1.3.1-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:f3c2c694b76e63e78c353e4a2a74f8baff5ac6becf807f23435d28e47a567d63"}, + {file = "maturin-1.3.1-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:13188296f389d05043b8bd2265df66692490b61ba219ae7d5abc09e81e5659ce"}, + {file = "maturin-1.3.1-py3-none-manylinux_2_12_i686.manylinux2010_i686.musllinux_1_1_i686.whl", hash = "sha256:11bbf9978695ac066729af08bc24123317ca3fad51757b0fbdfe811212896714"}, + {file = "maturin-1.3.1-py3-none-manylinux_2_12_x86_64.manylinux2010_x86_64.musllinux_1_1_x86_64.whl", hash = "sha256:d566d2f424fa3f5cd6bd3033fd300b80654884abd061bd53c68f4717753e7d58"}, + {file = "maturin-1.3.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:c0e2b8171f1a70270b86ed72397ba548e3bf4d914f24cd50a228ed85a9d5e914"}, + {file = "maturin-1.3.1-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl", hash = "sha256:804c6706588a9ca78f18f1a10adf9d24099b9cd3c2917628063ba8d4418b8a50"}, + {file = "maturin-1.3.1-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.musllinux_1_1_ppc64le.whl", hash = "sha256:c533d02563bb185125488cdcf161cc6ba2cdd4812ebff1b6504d1b29880ba1f8"}, + {file = "maturin-1.3.1-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:066b0c515505d4a4c526a9afc26fad4f010972d60937530dc4949dda0f49aa61"}, + {file = "maturin-1.3.1-py3-none-win32.whl", hash = "sha256:4835c332e3b632547db12e6a70abc18cb90ba9df06200dd9a7cc73424919901d"}, + {file = "maturin-1.3.1-py3-none-win_amd64.whl", hash = "sha256:871268417d6b3e2b46018c54a0522efc018bc4918b885d005df90b338e0674c7"}, + {file = "maturin-1.3.1-py3-none-win_arm64.whl", hash = "sha256:659a601c27984a50350f792447ff65ec60309423747f5304c98cb7b7fbb63d39"}, + {file = "maturin-1.3.1.tar.gz", hash = "sha256:efa194e99ae5fff185263d8244acacb12ae256ea73aba62c9446f6075ffc7ac1"}, ] [package.dependencies] @@ -257,7 +258,7 @@ tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} [package.extras] patchelf = ["patchelf"] -zig = ["ziglang (>=0.9.0,<0.10.0)"] +zig = ["ziglang (>=0.10.0,<0.11.0)"] [[package]] name = "mypy-extensions" @@ -438,4 +439,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "c2955fb1d3f196ac7f599d3bad2a2ba7d28ee9ae26b2f8b44a528162a2f98656" +content-hash = "4c1b31057299fd2bcbd057cf3779615595e484c201580d24b43ef7b55f56662e" diff --git a/pyproject.toml b/pyproject.toml index d7c40fb..486fd01 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,9 @@ [build-system] -requires = ["maturin>=0.13,<0.14"] -build-backend = "maturin" +requires = [ + 'maturin>=1,<2', + 'typing-extensions >=4.6.0,!=4.7.0' +] +build-backend = 'maturin' [project] name = "pysqlx-core" @@ -84,6 +87,6 @@ isort = {version = "^5.10.1", extras = ["colors"]} black = "^22.10.0" [tool.poetry.dev-dependencies] -maturin = "^0.13.6" +maturin = "^1.3.1" httpx = "^0.23.0" toml = "^0.10.2"