Closed julietcohen closed 11 months ago
@robyngit noticed that colormaps
is now available with pip, so we no longer need to install it vis github in the setup.py
. She suggested a simpler solution than the one I posted above: change the install_requires
line for colormaps
in the setup.py
of both viz-staging
and viz-raster
to colormaps==0.4.0
. This works without having the change the setuptools
line in the pyproject.toml
like I did above!
When installing the
colormaps
dependency, a new error has arisen in the terminal, and it is applicable to bothviz-staging
andviz-raster
, as both requirecolormaps
. This is likely due to the colormaps library rather thanviz-staging
orviz-raster
. I am creating this issue here to document troubleshooting and the solution for future reference.The issue occurs:
error message
``` Collecting git+https://github.com/PermafrostDiscoveryGateway/viz-staging.git Cloning https://github.com/PermafrostDiscoveryGateway/viz-staging.git to /tmp/pip-req-build-238ljiae Running command git clone --filter=blob:none --quiet https://github.com/PermafrostDiscoveryGateway/viz-staging.git /tmp/pip-req-build-238ljiae Resolved https://github.com/PermafrostDiscoveryGateway/viz-staging.git to commit 3c259a02e8740bd2fce7f740779147dbaa37f02c Preparing metadata (setup.py) ... done Collecting colormaps@ git+https://github.com/pratiman-91/colormaps.git#egg=colormaps Cloning https://github.com/pratiman-91/colormaps.git to /tmp/pip-install-dt2s7gki/colormaps_10ea6edc538c435193d4c8d8f8a68451 Running command git clone --filter=blob:none --quiet https://github.com/pratiman-91/colormaps.git /tmp/pip-install-dt2s7gki/colormaps_10ea6edc538c435193d4c8d8f8a68451 Resolved https://github.com/pratiman-91/colormaps.git to commit 8f96cd26fc4e18c2bc4fcfbc0c90b73e3048c228 Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [69 lines of output] /tmp/pip-build-env-52o7xtz3/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py:75: _MissingDynamic: `license` defined outside of `pyproject.toml` is ignored. !! ******************************************************************************** The following seems to be defined outside of `pyproject.toml`: `license = 'LICENSE'` According to the spec (see the link below), however, setuptools CANNOT consider this value unless `license` is listed as `dynamic`. https://packaging.python.org/en/latest/specifications/declaring-project-metadata/ To prevent this problem, you can list `license` under `dynamic` or alternatively remove the `[project]` table from your file and rely entirely on other means of configuration. ******************************************************************************** !! _handle_missing_dynamic(dist, project_table) /tmp/pip-build-env-52o7xtz3/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py:75: _MissingDynamic: `dependencies` defined outside of `pyproject.toml` is ignored. !! ******************************************************************************** The following seems to be defined outside of `pyproject.toml`: `dependencies = ['matplotlib', 'numpy']` According to the spec (see the link below), however, setuptools CANNOT consider this value unless `dependencies` is listed as `dynamic`. https://packaging.python.org/en/latest/specifications/declaring-project-metadata/ To prevent this problem, you can list `dependencies` under `dynamic` or alternatively remove the `[project]` table from your file and rely entirely on other means of configuration. ******************************************************************************** !! _handle_missing_dynamic(dist, project_table) Traceback (most recent call last): File "/home/jcohen/venv/k8s-parsl-viz/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, inReproduce the error:
Create new conda env and activate it:
conda create -n test_colormaps python=3.9
conda activate test_colormaps
Install for latest release ofviz-staging
:pip install git+https://github.com/PermafrostDiscoveryGateway/viz-staging.git
Temporary Solution to install
colormaps
outside ofviz-staging
orviz-raster
:conda create -n test_colormaps python=3.9
then activate:conda activate test_colormaps
viz-staging
setup.py
pyproject.toml
incolormaps-0.4.0
, changingrequires = ["setuptools>=61.0"]
torequires = ["setuptools==61.0"]
as recommended by this post.pip install -e viz-staging
and thenpip install -e colormaps-0.4.0
This did work to install both, but I would like to determine why this issue arose. It's confusing that it would be necessary to edit the
pyproject.toml
file now, when I did not have to before, for the same release of the package. It will be necessary to resolve this is a different way, like by editing theviz-staging
setup.py
so that users do not have to download a local version of thecolormaps
release0.4.0
and edit thepyproject.toml
.Just adding the requirement
'setuptools==61.0',
to theviz-staging
setup.py
shows the same error.