Skip to content

Commit ec01ac9

Browse files
committed
Modernize the build process (testing)
1 parent 9c8ec78 commit ec01ac9

File tree

8 files changed

+59
-47
lines changed

8 files changed

+59
-47
lines changed

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include MANIFEST.in
1+
include MANIFEST.in VERSION
22

33
include *.rst *.txt *.cfg site.cfg.example
44

RELEASING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ Releasing NumExpr
33

44
* Author: Robert A. McLeod, Francesc Alted
55
6-
* Date: 2023-12-11
6+
* Date: 2024-06-20
77

88
Following are notes for releasing NumExpr.
99

1010
Preliminaries
1111
-------------
1212

1313
* Make sure that `RELEASE_NOTES.rst` and `ANNOUNCE.rst` are up-to-date with the latest news in the release.
14-
* Ensure that the new version number in `setup.cfg` is correct.
14+
* Ensure that the new version number in `VERSION` is correct.
1515
* Do a commit and a push:
1616

1717
`git commit -a -m "Getting ready for release X.Y.Z"`
@@ -74,7 +74,7 @@ Announcing
7474
Post-release actions
7575
--------------------
7676

77-
* Add `.dev0` to the version number in `setup.cfg`, and bump the bugfix version
77+
* Add `.dev0` to the version number in `VERSION`, and bump the bugfix version
7878
number.
7979
* Create new headers for adding new features in `RELEASE_NOTES.rst`
8080
and add this place-holder:

VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.10.1

numexpr/__init__.py

-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
# cpuinfo imports were moved into the test submodule function that calls them
2929
# to improve import times.
3030

31-
import os, os.path
32-
import platform
3331
from numexpr.expressions import E
3432
from numexpr.necompiler import (NumExpr, disassemble, evaluate, re_evaluate,
3533
validate)

pyproject.toml

+44-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,48 @@
22
requires = [
33
"setuptools",
44
"wheel",
5-
"numpy>=2.0.0rc1",
5+
"numpy>=2.0.0",
66
]
7-
build-backend = "setuptools.build_meta"
7+
build-backend = "setuptools.build_meta"
8+
9+
[tool.setuptools.packages.find]
10+
include = ["numexpr"]
11+
12+
[project]
13+
name = "numexpr"
14+
description = "Fast numerical expression evaluator for NumPy"
15+
authors = [{name = "David M. Cooke, Francesc Alted, and others", email = "[email protected]"}]
16+
maintainers = [{ name = "Blosc Development Team", email = "[email protected]"}]
17+
classifiers = [
18+
"Development Status :: 6 - Mature",
19+
"Intended Audience :: Developers",
20+
"Intended Audience :: Information Technology",
21+
"Intended Audience :: Science/Research",
22+
"License :: OSI Approved :: MIT License",
23+
"Programming Language :: Python",
24+
"Topic :: Software Development :: Libraries :: Python Modules",
25+
"Operating System :: Microsoft :: Windows",
26+
"Operating System :: Unix",
27+
"Programming Language :: Python :: 3",
28+
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: 3.10",
30+
"Programming Language :: Python :: 3.11",
31+
"Programming Language :: Python :: 3.12",
32+
]
33+
requires-python = ">=3.9"
34+
# Follow guidelines from https://scientific-python.org/specs/spec-0000/
35+
dependencies = [
36+
"numpy>=1.23.0",
37+
]
38+
dynamic = ["version"]
39+
40+
[project.urls]
41+
homepage = "https://github.com/pydata/numexpr"
42+
documentation = "https://numexpr.readthedocs.io/en/latest/user_guide.html"
43+
repository = "https://github.com/pydata/numexpr"
44+
45+
[tool.cibuildwheel]
46+
skip = "cp36-* cp37-* pp37-* cp38-* pp* *-manylinux_i686 *_ppc64le *_s390x"
47+
# Let's use a more recent version of the manylinux image for more modern compilers
48+
manylinux-x86_64-image = "manylinux_2_28"
49+
manylinux-aarch64-image = "manylinux_2_28"

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
numpy >= 1.19.3 # keep in sync with NPY_TARGET_VERSION (setup.py)
1+
numpy >= 1.23.0 # keep in sync with NPY_TARGET_VERSION (setup.py)

setup.cfg

-32
This file was deleted.

setup.py

+9-6
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,21 @@
1010
####################################################################
1111

1212
import os, os.path as op
13-
from setuptools import setup, Extension
1413
import platform
1514
import configparser
1615
import numpy as np
16+
from setuptools import setup, Extension
17+
1718

1819
with open('requirements.txt') as f:
1920
requirements = f.read().splitlines()
2021

22+
version = open("VERSION").read().strip()
2123
with open('numexpr/version.py', 'w') as fh:
22-
cfg = configparser.ConfigParser()
23-
cfg.read('setup.cfg')
24-
fh.write('# THIS FILE IS GENERATED BY `SETUP.PY`\n')
25-
fh.write("version = '%s'\n" % cfg['metadata']['version'])
24+
# Create the version.py file
25+
fh.write("# THIS FILE IS GENERATED BY `setup.py`\n")
26+
fh.write(f"__version__ = '{version}'\n")
27+
fh.write(f"version = '{version}'\n")
2628
try:
2729
fh.write("numpy_build_version = '%s'\n" % np.__version__)
2830
except ImportError:
@@ -35,7 +37,7 @@
3537
clibs = []
3638
def_macros = [
3739
# keep in sync with minimal runtime requirement (requirements.txt)
38-
('NPY_TARGET_VERSION', 'NPY_1_19_API_VERSION')
40+
('NPY_TARGET_VERSION', 'NPY_1_23_API_VERSION')
3941
]
4042
sources = ['numexpr/interpreter.cpp',
4143
'numexpr/module.cpp',
@@ -98,6 +100,7 @@ def setup_package():
98100
)
99101

100102
metadata = dict(
103+
version=version,
101104
install_requires=requirements,
102105
libraries=clibs,
103106
ext_modules=[

0 commit comments

Comments
 (0)