Skip to content

Commit

Permalink
build against numpy>=2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jfolz committed Jun 20, 2024
1 parent 98194a8 commit 108164a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [1.7.4] - 2024-06-20
### Changed
- Depend on numpy>=1.19.0.
- Build against numpy>=2.0.0.
- Drop Python 3.7 and 3.8 support.


## [1.7.3] - 2024-06-20
### Changed
- Update to libjpeg-turbo 3.0.3.
Expand Down Expand Up @@ -170,7 +177,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Initial public release.


[Unreleased]: https://gitlab.com/jfolz/simplejpeg/-/compare/1.7.3...master
[Unreleased]: https://gitlab.com/jfolz/simplejpeg/-/compare/1.7.4...master
[1.7.4]: https://gitlab.com/jfolz/simplejpeg/-/compare/1.7.3...1.7.4
[1.7.3]: https://gitlab.com/jfolz/simplejpeg/-/compare/1.7.2...1.7.3
[1.7.2]: https://gitlab.com/jfolz/simplejpeg/-/compare/1.7.1...1.7.2
[1.7.1]: https://gitlab.com/jfolz/simplejpeg/-/compare/1.7.0...1.7.1
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
]
requires-python = ">=3.7"
requires-python = ">=3.9"
license = {file = "LICENSE"}
authors = [
{name = "Joachim Folz", email = "[email protected]"},
Expand All @@ -21,7 +21,7 @@ Source = "https://gitlab.com/jfolz/simplejpeg"
Tracker = "https://gitlab.com/jfolz/simplejpeg/issues"

[build-system]
requires = ["setuptools>=50.0.3", "wheel", "cmake>=3.6.3", "cython~=3.0.0", "oldest-supported-numpy"]
requires = ["setuptools>=50.0.3", "wheel", "cmake>=3.6.3", "cython~=3.0.0", "numpy>=2.0.0"]
build-backend = "setuptools.build_meta"

[tool.cibuildwheel]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
numpy<2
numpy>=1.19.3
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def __repr__(self):

PACKAGE_DIR = pt.abspath(pt.dirname(__file__))
PLATFORM = platform.system().lower()
NPY_API_VERSION = 'NPY_1_19_API_VERSION'
# build output dir is machine-specific
BUILD_DIR = 'build_' + '_'.join(platform.architecture())
IS64BIT = sys.maxsize > 2**32
Expand Down Expand Up @@ -208,6 +209,10 @@ def make_jpeg_module():
]
extra_link_args = []
extra_compile_args = []
macros = [
('NPY_NO_DEPRECATED_API', NPY_API_VERSION),
('NPY_TARGET_VERSION', NPY_API_VERSION),
]
if PLATFORM == 'linux':
extra_link_args.extend([
'-Wl,' # following are linker options
Expand All @@ -225,7 +230,7 @@ def make_jpeg_module():
extra_objects=static_libs,
extra_link_args=extra_link_args,
extra_compile_args=extra_compile_args,
define_macros=[('NPY_NO_DEPRECATED_API', 'NPY_1_7_API_VERSION')],
define_macros=macros,
)


Expand Down
2 changes: 1 addition & 1 deletion simplejpeg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from ._jpeg import decode_jpeg_header


__version__ = '1.7.3'
__version__ = '1.7.4'
__version_info__ = __version__.split('.')


Expand Down

0 comments on commit 108164a

Please sign in to comment.