Skip to content

Commit

Permalink
Merge pull request #567 from HEXRD/install-tbb
Browse files Browse the repository at this point in the history
Add TBB as a dependency to HEXRD
  • Loading branch information
psavery authored Oct 18, 2023
2 parents 11fae15 + 1642747 commit 77923b1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 21 deletions.
3 changes: 3 additions & 0 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ requirements:
- scikit-image
- scikit-learn
- scipy
# TBB seems to be a little faster than OpenMP for the cases I've tried.
# Installing TBB means numba will use it instead of OpenMP.
- tbb
- tqdm

test:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[build-system]
requires = ["setuptools", "wheel", "numpy<1.25", "setuptools_scm[toml]"]
requires = ["setuptools", "wheel", "numpy<1.27", "setuptools_scm[toml]"]
25 changes: 5 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,20 @@
np_include_dir = numpy.get_include()

install_reqs = [
'appdirs',
'fabio>=0.11',
'fast-histogram',
'h5py',
'lmfit',
'numba',
'numpy<1.25', # NOTE: bump this to support the latest version numba supports
'numpy<1.27', # NOTE: bump this to support the latest version numba supports
'psutil',
'pycifrw',
'pyyaml',
'scikit-image',
'scikit-learn',
'scipy',
'tbb',
'tqdm',
'xxhash',
]
Expand All @@ -33,15 +36,6 @@
else:
compiler_optimize_flags = []

# This a hack to get around the fact that scikit-image on conda-forge doesn't install
# dist info so setuptools can't find it, even though its there, which results in
# pkg_resources.DistributionNotFound, even though the package is available. So we
# only added it if we aren't building with conda.
# appdirs has the same issue.
if os.environ.get('CONDA_BUILD') != '1':
install_reqs.append('scikit-image')
install_reqs.append('appdirs')


# extension for convolution from astropy
def get_convolution_extensions():
Expand Down Expand Up @@ -102,7 +96,7 @@ def get_extension_modules():
# use entry_points, not scripts:
entry_points = {
'console_scripts': ["hexrd = hexrd.cli.main:main"]
}
}

setup(
name='hexrd',
Expand Down Expand Up @@ -134,12 +128,3 @@ def get_extension_modules():
python_requires='>=3.8',
install_requires=install_reqs
)

# ext_modules = get_extension_modulesf()
# setupF(
# name='hexrd',
# url='https://github.com/cryos/hexrd',
# license='BSD',
# ext_modules=ext_modules,
# packages=find_packages(),
# )

0 comments on commit 77923b1

Please sign in to comment.