diff --git a/.github/workflows/windows-arm64-wheels.yml b/.github/workflows/windows-arm64-wheels.yml index 8e23ea4..aa34d0c 100644 --- a/.github/workflows/windows-arm64-wheels.yml +++ b/.github/workflows/windows-arm64-wheels.yml @@ -3,7 +3,7 @@ name: Build Windows ARM64 wheels on: [push] env: - MLPACK_COMMIT: 4.4.0 + MLPACK_COMMIT: 4.5.0 CIBW_TEST_COMMAND: python -c 'import mlpack; import numpy as np; x = np.random.rand(100, 10); o = mlpack.pca(input_=x, new_dimensionality=5, verbose=True)' jobs: @@ -87,9 +87,6 @@ jobs: git clone https://github.com/mlpack/mlpack cd mlpack git checkout $MLPACK_VERSION - sed -i.bk 's/${PACKAGE_VERSION}/${PACKAGE_VERSION}.post1/g' src/mlpack/bindings/python/setup.py.in - rm -f src/mlpack/bindings/python/setup.py.in.bk - patch -p1 < ../numpy2.patch - name: Generate setup.py shell: powershell diff --git a/Jenkinsfile b/Jenkinsfile index d4fe487..6050d7a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,7 +5,7 @@ pipeline environment { - MLPACK_VERSION = '4.4.0' + MLPACK_VERSION = '4.5.0' TWINE_PYPI_TOKEN = credentials('twine-pypi-token') } @@ -23,12 +23,6 @@ pipeline cd mlpack/ git checkout $MLPACK_VERSION - # Temporary patch: increment build number. - sed -i.bk 's/${PACKAGE_VERSION}/${PACKAGE_VERSION}.post1/g' src/mlpack/bindings/python/setup.py.in - rm -f src/mlpack/bindings/python/setup.py.in.bk - # Apply patches. - patch -p1 < ../numpy2.patch - mkdir build/ cd build/ cmake -DBUILD_PYTHON_BINDINGS=ON ../ diff --git a/azure-pipelines-macos-steps.yml b/azure-pipelines-macos-steps.yml index a164147..f6caccd 100644 --- a/azure-pipelines-macos-steps.yml +++ b/azure-pipelines-macos-steps.yml @@ -11,10 +11,6 @@ steps: git clone https://github.com/mlpack/mlpack cd mlpack git checkout $(MLPACK_VERSION) - sed -i.bk 's/${PACKAGE_VERSION}/${PACKAGE_VERSION}.post1/g' src/mlpack/bindings/python/setup.py.in - rm -f src/mlpack/bindings/python/setup.py.in.bk - # Apply patches. - patch -p1 < ../numpy2.patch displayName: Clone mlpack - bash: | diff --git a/azure-pipelines-windows-steps.yml b/azure-pipelines-windows-steps.yml index fe5227a..0c0bba7 100644 --- a/azure-pipelines-windows-steps.yml +++ b/azure-pipelines-windows-steps.yml @@ -53,10 +53,6 @@ steps: git clone https://github.com/mlpack/mlpack cd mlpack git checkout $(MLPACK_VERSION) - sed -i.bk 's/${PACKAGE_VERSION}/${PACKAGE_VERSION}.post1/g' src/mlpack/bindings/python/setup.py.in - rm -f src/mlpack/bindings/python/setup.py.in.bk - # Apply patches. - patch -p1 < ../numpy2.patch displayName: Clone mlpack - powershell: | diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9e0bf77..d65a9f1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -62,7 +62,7 @@ jobs: timeoutInMinutes: 0 # No limit for build time. pool: {vmImage: 'macOS-14'} variables: - MLPACK_VERSION: 4.4.0 + MLPACK_VERSION: 4.5.0 CIBW_TEST_COMMAND: python -c 'import mlpack; import numpy as np; x = np.random.rand(100, 10); o = mlpack.pca(input_=x, new_dimensionality=5, verbose=True)' # The PYPI_TOKEN variable is automatically set by Azure Pipelines. TWINE_PYPI_TOKEN: $(PYPI_TOKEN) @@ -163,7 +163,7 @@ jobs: timeoutInMinutes: 0 # No limit for build time. pool: {vmImage: 'windows-2019'} variables: - MLPACK_VERSION: 4.4.0 + MLPACK_VERSION: 4.5.0 # The PYPI_TOKEN variable is automatically set by Azure Pipelines. TWINE_PYPI_TOKEN: $(PYPI_TOKEN) steps: diff --git a/numpy2.patch b/numpy2.patch deleted file mode 100644 index c56bde8..0000000 --- a/numpy2.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- mlpack-4.4.0/src/mlpack/bindings/python/mlpack/matrix_utils.py 2024-05-28 16:08:34.000000000 -0400 -+++ mlpack/src/mlpack/bindings/python/mlpack/matrix_utils.py 2024-07-24 17:22:50.872603391 -0400 -@@ -160,7 +160,10 @@ - dims = len(x) - - d = np.zeros([dims]) -- out = np.array(x, dtype=dtype, copy=copy) # Try to avoid copy... -+ if np.lib.NumpyVersion(np.__version__) >= '2.0.0b1': -+ out = np.array(x, dtype=dtype, copy=(True if copy else None)) -+ else: -+ out = np.array(x, dtype=dtype, copy=copy) - - # Since we don't have a great way to check if these are using the same - # memory location, we will probe manually (ugh).