Skip to content

Commit 136ce1c

Browse files
committed
Updates to build and test files to allow use of any version of Numpy (i.e., no longer requiring Numpy < 2.0).
Version number updated to 1.0.3. Removal of PyPI/wheel Intel builds for Python 3.8 and 3.9 (incompatible with Numpy 2).
1 parent b1a2f6f commit 136ce1c

11 files changed

+1006
-400
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
(Formatting and design based on Olivier Lacan's [Keep a CHANGELOG](http://keepachangelog.com/))
44

55

6+
# 1.0.3 -- 2024-10-xx
7+
8+
### Added
9+
Added support for Numpy version 2. PyImfit should now work with both versions 1 and 2 of Numpy.
10+
11+
12+
613
# 1.0.2 -- 2024-09-17
714

815
### Fixed

conda/rattler_setup/recipe.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# recipe file for use by rattler-config in building conda packages for pyimfit
22

33
context:
4-
version: 1.0.2
4+
version: 1.0.3
55

66
package:
77
name: pyimfit
@@ -30,7 +30,7 @@ requirements:
3030
- pip
3131
- scons
3232
- nomkl
33-
- numpy<2.0
33+
- numpy
3434
- scipy
3535
run:
3636
- python

conda/test_pyimfit_install.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# it isn't in the lcoal directory).
66

77
import sys, os, tarfile, argparse
8+
import numpy
89
import pyimfit
910
import requests
1011
from astropy.io import fits
@@ -63,6 +64,7 @@ def main( argv ):
6364
print("\nStarting test...")
6465
vinfo = sys.version_info
6566
print("Python version {0}.{1}".format(vinfo[0], vinfo[1]))
67+
print("Numpy version {0}".format(numpy.__version__))
6668
print("PyImfit version {0}".format(pyimfit.__version__))
6769

6870
filesExist = True

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# The short X.Y version
2929
version = '1.0'
3030
# The full version, including alpha/beta/rc tags
31-
release = '1.0.2'
31+
release = '1.0.3'
3232

3333

3434
# -- General configuration ---------------------------------------------------

howto_new_distribution.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ For the time being, it's probably best to focus on Intel mac, since we run the L
132132
H. [vm] tar -cf linux-64.tar linux-64 && gzip linux-64.tar
133133
H. [if using Intel Mac for uploading:] Transfer conda packages to Intel Mac:
134134
$ cp ~/vagrant/iraf/transfer/pyimfit-<VERSION_NUMBER>*.conda ~/coding/pyimfit/conda/output/linux-64/
135-
I. If everything went OK, shut down the VM and reset its memory allocation to 1 GB.
135+
I. If everything went OK, shut down the VM and reset its memory allocation to 2 GB.
136136

137137
ALTERNATIVE: Do this on ex-sol.mpe.mpg.de
138138
A. ssh erwin@ex-sol.mpe.mpg.de

make_upload.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@ def main( argv=None ):
2222
default=False, help="Upload to PyPI)")
2323
parser.add_option("--skip-build", action="store_false", dest="doBuild",
2424
default=True, help="Skip the build process")
25+
parser.add_option("--python", dest="pyVersion", type="str", default=None,
26+
help="Build only for this version of Python [default = 3.10-3.12]")
2527

2628
(options, args) = parser.parse_args(argv)
2729
# args[0] = name program was called with
2830
# args[1] = first actual argument, etc.
2931
if len(args) < 2:
30-
print("You must supply a version number!\n")
32+
print("You must supply a PyImfit version number!\n")
3133
return None
3234
versionNum = args[1]
3335
# Figure out which type of macOS architecture we're running under
@@ -41,7 +43,9 @@ def main( argv=None ):
4143
usingAppleSilicon = False
4244
prelimString = "export _PYTHON_HOST_PLATFORM='macosx-10.9-x86_64' ; export ARCHFLAGS='-arch x86_64' ; "
4345
wheelSuffix = "macosx_10_9_x86_64"
44-
pythonVersionList = ["3.8", "3.9", "3.10", "3.11", "3.12"]
46+
pythonVersionList = ["3.10", "3.11", "3.12"]
47+
if options.pyVersion is not None:
48+
pythonVersionList = [options.pyVersion]
4549

4650
if options.doBuild:
4751
# Make sdist (.tar.gz) and macOS binary wheels

pyimfit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
imageFunctionList = get_function_list()
1515
imageFunctionDict = get_function_dict()
1616

17-
__version__ = "1.0.2"
17+
__version__ = "1.0.3"

pyimfit/pyimfit_lib.cpp

Lines changed: 982 additions & 389 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
requires = [
33
"setuptools>=42",
44
"Cython",
5-
"numpy<2.0",
5+
"numpy",
66
]
77

88
build-backend = "setuptools.build_meta"

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Pip requirements.txt file for PyImfit, including for testing
22
# numpy 2.0 breaks some of the Cython-generated .cpp code (even though we're using Cython 3.0)
3-
numpy<2.0
3+
numpy
44
scipy
55
pytest
66
requests

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,13 +360,13 @@ def run(self):
360360
"Operating System :: POSIX",
361361
"Intended Audience :: Science/Research",
362362
],
363-
python_requires='>=3.8',
363+
python_requires='>=3.10',
364364
# setup_requires = temporary local installation in order to run this script
365365
# install_requires = standard pip installation for general future use
366366
# NOTE: it's not clear we really need 'numpy' in the install_requires, since we
367367
# have numpy specified in requirements.txt
368368
setup_requires=['scons'],
369-
install_requires=['numpy<2.0', 'scipy'],
369+
install_requires=['numpy', 'scipy'],
370370
cmdclass={'build_ext': my_build_ext, 'clean': CleanCommand, 'cleanall': CleanAllCommand},
371371
ext_modules=extensions
372372
)

0 commit comments

Comments
 (0)