Skip to content

Commit

Permalink
Adding numpy version cap. RE:#386
Browse files Browse the repository at this point in the history
  • Loading branch information
phargogh committed Jun 21, 2024
2 parents d645b70 + 0622c75 commit eaedc96
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 39 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build-py-dists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest, macos-latest]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
python-arch: [x64]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand All @@ -20,11 +19,10 @@ jobs:
- name: Fetch git tags
run: git fetch origin +refs/tags/*:refs/tags/*

- name: Set up python ${{ matrix.python-version }} ${{ matrix.python-arch }}
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.python-arch }}

- name: Install dependencies
run: python -m pip install build
Expand All @@ -34,7 +32,7 @@ jobs:

- uses: actions/upload-artifact@v1
with:
name: Wheel for ${{ matrix.os }} ${{ matrix.python-version }} ${{ matrix.python-arch }}
name: Wheel for ${{ matrix.os }} ${{ matrix.python-version }}
path: dist

build-sdist:
Expand All @@ -52,7 +50,7 @@ jobs:
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.12

- name: Install dependencies
run: python -m pip install build
Expand Down
6 changes: 4 additions & 2 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
Release History
===============

Unreleased Changes
2.4.4 (2024-05-21)
------------------
* Our github actions for building python distributions now use
`actions/setup-python@v5`, which uses node 20.
https://github.com/natcap/pygeoprocessing/issues/384
* ``warp_raster`` and ``build_overviews`` no longer raise ``ValueError``s if
* ``warp_raster`` and ``build_overviews`` no longer raise a ``ValueError`` if
called with an invalid resampling algorithm. We now fall back to the
underlying GDAL functions' error messages.
https://github.com/natcap/pygeoprocessing/issues/387
* Implementing decaying flow accumulation for D8 routing.
https://github.com/natcap/pygeoprocessing/issues/386
* Updated to Cython 3.
* Dropped support for Python 3.7.

2.4.3 (2024-03-06)
------------------
Expand Down
35 changes: 34 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
[project]
name = "pygeoprocessing"
description = "PyGeoprocessing: Geoprocessing routines for GIS"
requires-python = ">=3.6"
license = {file = "LICENSE.txt"}
maintainers = [
{name = "Natural Capital Project Software Team"}
]
keywords = ['gis', 'geoprocessing', 'pygeoprocessing']
classifiers = [
'Intended Audience :: Developers',
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'Natural Language :: English',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft',
'Operating System :: POSIX',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Scientific/Engineering :: GIS',
'License :: OSI Approved :: BSD License'
]
# the version is provided dynamically by setuptools_scm
# `dependencies` and `optional-dependencies` are provided by setuptools
# using the corresponding setup args `install_requires` and `extras_require`
# `readme` is provided by setuptools using the corresponding setup arg `long_description`
dynamic = ["version", "dependencies", "optional-dependencies", "readme"]


[build-system]
# these are the minimum packages needed in order to execute the pygeoprocessing build.
# Setuptools, wheel are from pep508.
Expand All @@ -6,7 +39,7 @@
# that we can provide a much easier build experience so long as GDAL is
# available at runtime.
requires = [
'setuptools', 'wheel', 'setuptools_scm', 'cython<3.0.0', 'oldest-supported-numpy'
'setuptools', 'wheel', 'setuptools_scm', 'cython>=3.0.0', 'oldest-supported-numpy'
]
build-backend = "setuptools.build_meta"

Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
# --------------------
# This file records the packages and requirements needed in order for
# pygeoprocessing to work as expected.
Cython<3.0.0
GDAL>=3.0.4
numpy>=1.10.1
numpy>=1.10.1,<2.0
Rtree>=0.8.3
scipy>=0.14.1,!=0.19.1
Shapely>=1.6.4
Expand Down
26 changes: 3 additions & 23 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import platform

import numpy
from Cython.Build import cythonize
from setuptools import setup
from setuptools.extension import Extension

Expand All @@ -27,8 +28,6 @@
description="PyGeoprocessing: Geoprocessing routines for GIS",
long_description=LONG_DESCRIPTION,
long_description_content_type='text/x-rst',
maintainer='James Douglass',
maintainer_email='[email protected]',
url='https://github.com/natcap/pygeoprocessing',
packages=[
'pygeoprocessing',
Expand All @@ -43,26 +42,7 @@
install_requires=_REQUIREMENTS,
license='BSD',
zip_safe=False,
keywords='gis pygeoprocessing',
classifiers=[
'Intended Audience :: Developers',
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'Natural Language :: English',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft',
'Operating System :: POSIX',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Scientific/Engineering :: GIS',
'License :: OSI Approved :: BSD License'
],
ext_modules=[
ext_modules=cythonize([
Extension(
name="pygeoprocessing.routing.routing",
sources=["src/pygeoprocessing/routing/routing.pyx"],
Expand Down Expand Up @@ -92,5 +72,5 @@
extra_link_args=compiler_and_linker_args,
language="c++"
),
]
])
)
3 changes: 0 additions & 3 deletions src/pygeoprocessing/geoprocessing_core.pyx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# coding=UTF-8
# distutils: language=c++
# cython: language_level=3
import logging
import multiprocessing
import os
Expand Down
2 changes: 0 additions & 2 deletions src/pygeoprocessing/routing/watershed.pyx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# coding=UTF-8
# cython: language_level=3
import logging
import os
import shutil
Expand Down

0 comments on commit eaedc96

Please sign in to comment.