Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/jonwright/ImageD11 into i…
Browse files Browse the repository at this point in the history
…ssue285
  • Loading branch information
jonwright committed Jun 18, 2024
2 parents 4358bcc + 04f4524 commit 89f1651
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ImageD11/sinograms/lima_segmenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .


Expand Down
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]

Expand Down

0 comments on commit 89f1651

Please sign in to comment.