diff --git a/conda.recipe/meta.yaml b/conda.recipe/meta.yaml index 8a1b54ec7..229760264 100644 --- a/conda.recipe/meta.yaml +++ b/conda.recipe/meta.yaml @@ -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: diff --git a/pyproject.toml b/pyproject.toml index 46e6a3155..dc9d6a44b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,2 @@ [build-system] -requires = ["setuptools", "wheel", "numpy<1.25", "setuptools_scm[toml]"] +requires = ["setuptools", "wheel", "numpy<1.27", "setuptools_scm[toml]"] diff --git a/setup.py b/setup.py index 337bb54f8..5c7967216 100644 --- a/setup.py +++ b/setup.py @@ -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', ] @@ -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(): @@ -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', @@ -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(), -# )