diff --git a/MANIFEST.in b/MANIFEST.in index 1258427..4ec8d9f 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ -include MANIFEST.in +include MANIFEST.in VERSION include *.rst *.txt *.cfg site.cfg.example diff --git a/RELEASING.md b/RELEASING.md index d6f8f99..bbdf116 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -3,7 +3,7 @@ Releasing NumExpr * Author: Robert A. McLeod, Francesc Alted * Contact: faltet@gmail.com -* Date: 2023-12-11 +* Date: 2024-06-20 Following are notes for releasing NumExpr. @@ -11,7 +11,7 @@ Preliminaries ------------- * Make sure that `RELEASE_NOTES.rst` and `ANNOUNCE.rst` are up-to-date with the latest news in the release. -* Ensure that the new version number in `setup.cfg` is correct. +* Ensure that the new version number in `VERSION` is correct. * Do a commit and a push: `git commit -a -m "Getting ready for release X.Y.Z"` @@ -74,7 +74,7 @@ Announcing Post-release actions -------------------- -* Add `.dev0` to the version number in `setup.cfg`, and bump the bugfix version +* Add `.dev0` to the version number in `VERSION`, and bump the bugfix version number. * Create new headers for adding new features in `RELEASE_NOTES.rst` and add this place-holder: diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..8bbb6e4 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +2.10.1 diff --git a/numexpr/__init__.py b/numexpr/__init__.py index 7946f85..648b869 100644 --- a/numexpr/__init__.py +++ b/numexpr/__init__.py @@ -28,8 +28,6 @@ # cpuinfo imports were moved into the test submodule function that calls them # to improve import times. -import os, os.path -import platform from numexpr.expressions import E from numexpr.necompiler import (NumExpr, disassemble, evaluate, re_evaluate, validate) diff --git a/pyproject.toml b/pyproject.toml index c57e423..8ca4e1c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,6 +2,48 @@ requires = [ "setuptools", "wheel", - "numpy>=2.0.0rc1", + "numpy>=2.0.0", ] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta" + +[tool.setuptools.packages.find] +include = ["numexpr"] + +[project] +name = "numexpr" +description = "Fast numerical expression evaluator for NumPy" +authors = [{name = "David M. Cooke, Francesc Alted, and others", email = "blosc@blosc.org"}] +maintainers = [{ name = "Blosc Development Team", email = "blosc@blosc.org"}] +classifiers = [ + "Development Status :: 6 - Mature", + "Intended Audience :: Developers", + "Intended Audience :: Information Technology", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python", + "Topic :: Software Development :: Libraries :: Python Modules", + "Operating System :: Microsoft :: Windows", + "Operating System :: Unix", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] +requires-python = ">=3.9" +# Follow guidelines from https://scientific-python.org/specs/spec-0000/ +dependencies = [ + "numpy>=1.23.0", +] +dynamic = ["version"] + +[project.urls] +homepage = "https://github.com/pydata/numexpr" +documentation = "https://numexpr.readthedocs.io/en/latest/user_guide.html" +repository = "https://github.com/pydata/numexpr" + +[tool.cibuildwheel] +skip = "cp36-* cp37-* pp37-* cp38-* pp* *-manylinux_i686 *_ppc64le *_s390x" +# Let's use a more recent version of the manylinux image for more modern compilers +manylinux-x86_64-image = "manylinux_2_28" +manylinux-aarch64-image = "manylinux_2_28" diff --git a/requirements.txt b/requirements.txt index 6b5b554..1c52baf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -numpy >= 1.19.3 # keep in sync with NPY_TARGET_VERSION (setup.py) +numpy >= 1.23.0 # keep in sync with NPY_TARGET_VERSION (setup.py) diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 8e3588c..0000000 --- a/setup.cfg +++ /dev/null @@ -1,32 +0,0 @@ -[metadata] -name = numexpr -version = 2.10.1.dev0 -description = Fast numerical expression evaluator for NumPy -author = David M. Cooke, Francesc Alted, and others -maintainer = Francesc Alted -maintainer_email = faltet@gmail.com -url = https://github.com/pydata/numexpr -long_description = file: README.rst -long_description_content_type = text/x-rst -license = MIT -classifiers = - Development Status :: 6 - Mature - Intended Audience :: Financial and Insurance Industry - Intended Audience :: Science/Research - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - Operating System :: Microsoft :: Windows - Operating System :: POSIX - Operating System :: MacOS - -[options] -zip_safe = False -packages = find: -python_requires = >=3.9 -# install_requires = -# numpy - diff --git a/setup.py b/setup.py index 33fd31d..04e53cc 100644 --- a/setup.py +++ b/setup.py @@ -10,19 +10,21 @@ #################################################################### import os, os.path as op -from setuptools import setup, Extension import platform import configparser import numpy as np +from setuptools import setup, Extension + with open('requirements.txt') as f: requirements = f.read().splitlines() +version = open("VERSION").read().strip() with open('numexpr/version.py', 'w') as fh: - cfg = configparser.ConfigParser() - cfg.read('setup.cfg') - fh.write('# THIS FILE IS GENERATED BY `SETUP.PY`\n') - fh.write("version = '%s'\n" % cfg['metadata']['version']) + # Create the version.py file + fh.write("# THIS FILE IS GENERATED BY `setup.py`\n") + fh.write(f"__version__ = '{version}'\n") + fh.write(f"version = '{version}'\n") try: fh.write("numpy_build_version = '%s'\n" % np.__version__) except ImportError: @@ -35,7 +37,7 @@ clibs = [] def_macros = [ # keep in sync with minimal runtime requirement (requirements.txt) - ('NPY_TARGET_VERSION', 'NPY_1_19_API_VERSION') + ('NPY_TARGET_VERSION', 'NPY_1_23_API_VERSION') ] sources = ['numexpr/interpreter.cpp', 'numexpr/module.cpp', @@ -98,6 +100,7 @@ def setup_package(): ) metadata = dict( + version=version, install_requires=requirements, libraries=clibs, ext_modules=[