Skip to content

Commit

Permalink
feat(python): support python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Dec 16, 2024
1 parent 80a185c commit c218635
Show file tree
Hide file tree
Showing 6 changed files with 250 additions and 121 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
include:
- os: ubuntu-arm64-24.04 # aarch64-linux
python-version: "3.12"
- os: macos-14 # aarch64-darwin
python-version: "3.12"
- os: macos-14 # aarch64-darwin
python-version: "3.13"
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
8 changes: 5 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -154,24 +154,26 @@
in
rec {
packages = {
default = packages.ibis312;
default = packages.ibis313;

inherit (pkgs) ibis310 ibis311 ibis312
inherit (pkgs) ibis310 ibis311 ibis312 ibis313
update-lock-files check-release-notes-spelling;
};

checks = {
ibis310-pytest = pkgs.ibis310.passthru.tests.pytest;
ibis311-pytest = pkgs.ibis311.passthru.tests.pytest;
ibis312-pytest = pkgs.ibis312.passthru.tests.pytest;
ibis313-pytest = pkgs.ibis313.passthru.tests.pytest;
};

devShells = rec {
ibis310 = mkDevShell pkgs.ibisDevEnv310;
ibis311 = mkDevShell pkgs.ibisDevEnv311;
ibis312 = mkDevShell pkgs.ibisDevEnv312;
ibis313 = mkDevShell pkgs.ibisDevEnv313;

default = ibis312;
default = ibis313;

preCommit = pkgs.mkShell {
name = "preCommit";
Expand Down
6 changes: 4 additions & 2 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@ in
ibis310 = mkEnv pkgs.python310;
ibis311 = mkEnv pkgs.python311;
ibis312 = mkEnv pkgs.python312;
ibis313 = mkEnv pkgs.python313;

ibisDevEnv310 = mkDevEnv pkgs.python310;
ibisDevEnv311 = mkDevEnv pkgs.python311;
ibisDevEnv312 = mkDevEnv pkgs.python312;
ibisDevEnv313 = mkDevEnv pkgs.python313;

ibisSmallDevEnv = mkEnv'
{
Expand All @@ -108,7 +110,7 @@ in
};
editable = false;
}
pkgs.python312;
pkgs.python313;

duckdb = super.duckdb.overrideAttrs (
_: lib.optionalAttrs (stdenv.isAarch64 && stdenv.isLinux) {
Expand Down Expand Up @@ -149,7 +151,7 @@ in
gen-examples = pkgs.writeShellApplication {
name = "gen-examples";
runtimeInputs = [
pkgs.ibisDevEnv312
pkgs.ibisDevEnv313
(pkgs.rWrapper.override {
packages = with pkgs.rPackages; [
Lahman
Expand Down
53 changes: 53 additions & 0 deletions nix/pyproject-overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ let
toolz.setuptools = [ ];
typing-extensions.flit-core = [ ];
debugpy.setuptools = [ ];
google-crc32c.setuptools = [ ];
lz4.setuptools = [ ];
snowflake-connector-python.setuptools = [ ];
} // lib.optionalAttrs stdenv.hostPlatform.isDarwin {
duckdb = {
setuptools = [ ];
Expand All @@ -49,6 +52,56 @@ in
pkgs.arrow-cpp
];
});

scipy = prev.scipy.overrideAttrs (attrs: {
nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [
final.meson-python
final.pyproject-metadata
final.cython
final.packaging
final.numpy
final.pybind11
final.pythran
pkgs.pkg-config
pkgs.ninja
pkgs.meson
pkgs.gfortran
pkgs.cmake
];
});

scikit-learn = prev.scikit-learn.overrideAttrs (attrs: {
nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [
final.meson-python
final.pyproject-metadata
final.cython
final.packaging
final.numpy
final.scipy
pkgs.ninja
pkgs.meson
pkgs.gfortran
];
});

pyproj = prev.pyproj.overrideAttrs (attrs: {
nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [
final.setuptools
final.cython
pkgs.proj
];
PROJ_DIR = "${lib.getBin pkgs.proj}";
PROJ_INCDIR = "${lib.getDev pkgs.proj}";
});

pyogrio = prev.pyogrio.overrideAttrs (attrs: {
nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [
final.setuptools
final.versioneer
final.cython
pkgs.gdal
];
});
}) // lib.mapAttrs (name: spec: addBuildSystems prev.${name} spec) buildSystemOverrides // {
mysqlclient = prev.mysqlclient.overrideAttrs (attrs: {
nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ final.setuptools ];
Expand Down
6 changes: 3 additions & 3 deletions requirements-dev.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c218635

Please sign in to comment.