diff --git a/ImageD11/sinograms/lima_segmenter.py b/ImageD11/sinograms/lima_segmenter.py index 2421f9be..76ec102a 100755 --- a/ImageD11/sinograms/lima_segmenter.py +++ b/ImageD11/sinograms/lima_segmenter.py @@ -447,8 +447,8 @@ def sbatchlocal(fname, cores=None): for line in lines: if line.find('--array=')>=0: start, end = line.split('=')[-1].split('-') - commands = [ f'SLURM_ARRAY_TASK_ID={i} bash {fname} > {fname}_{i}.log' for - i in range(int(start), int(end)) ] + commands = [ 'SLURM_ARRAY_TASK_ID=%d bash %s > %s_%d.log'%(i, fname, fname, i ) + for i in range(int(start), int(end)) ] with concurrent.futures.ThreadPoolExecutor(max_workers = cores) as pool: for _ in pool.map( os.system, commands ): pass diff --git a/appveyor.yml b/appveyor.yml index 600d09d0..acc87bbc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,7 +20,7 @@ install: - "set TMPDIR=C:\\tmp" - python -c "import sys; print(sys.executable, sys.version)" - python -m pip install --upgrade pip setuptools - - python -m pip install pytest numpy + - python -m pip install pytest 'numpy<2' - python -m pip install --ignore-installed certifi --upgrade-strategy only-if-needed --only-binary=h5py --only-binary=scipy --only-binary=hdf5plugin . diff --git a/pyproject.toml b/pyproject.toml index a59ec013..450bf7b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,5 +3,16 @@ requires = ["setuptools", "six", "wheel", "numpy; python_version=='2.7'", +# There is no way to compile for versions < 1.25 and up to 2. +# See https://numpy.org/doc/2.0/dev/depending_on_numpy.html +# +# This gives you all versions < 2.0 "oldest-supported-numpy; python_version>='3.0'" ] +# +# This gives all versions > 1.25 +# "numpy>=2.0.0rc1; python_version>='3.0'" ] +# +# As usual, the dependencies are not ready. +# pin numpy < 2 for now. +# build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index fe9445a0..edb46c11 100644 --- a/setup.py +++ b/setup.py @@ -142,7 +142,9 @@ def build_extension(self, ext): minimal = [ # can't compile without this "six", - "numpy", + 'numpy ; python_version < "3"', + # Until the dependencies are ready + 'numpy<2 ; python_version >= "3"', "setuptools", ]