happy-kitchen-89482
08/27/2022, 9:07 PMpython -m pex.cli lock create --interpreter-constraint=">=3.8,<3.9" --resolver-version=pip-2020-resolver morecantile==3.1.2
vs
python3.9 -m pex.cli lock create --interpreter-constraint=">=3.8,<3.9" --resolver-version=pip-2020-resolver morecantile==3.0.5
enough-analyst-54434
08/27/2022, 10:06 PMx$ ./morecantile.venv/bin/pip install -U pip
Collecting pip
Downloading pip-22.2.2-py3-none-any.whl (2.0 MB)
|████████████████████████████████| 2.0 MB 2.0 MB/s
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.0.2
Uninstalling pip-20.0.2:
Successfully uninstalled pip-20.0.2
Successfully installed pip-22.2.2
jsirois@DESKTOP-51NK7LK:~/dev/pantsbuild/pex$ ./morecantile.venv/bin/pip install morecantile==3.1.2
Collecting morecantile==3.1.2
Downloading morecantile-3.1.2.tar.gz (25 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [36 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-wfa5kg7y/morecantile_3a8eec6ae11342be97344f0404801765/setup.py", line 17, in <module>
setup(
File "/home/jsirois/dev/pantsbuild/pex/morecantile.venv/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.8/distutils/core.py", line 121, in setup
dist.parse_config_files()
File "/home/jsirois/dev/pantsbuild/pex/morecantile.venv/lib/python3.8/site-packages/setuptools/dist.py", line 701, in parse_config_files
parse_configuration(self, self.command_options,
File "/home/jsirois/dev/pantsbuild/pex/morecantile.venv/lib/python3.8/site-packages/setuptools/config.py", line 121, in parse_configuration
meta.parse()
File "/home/jsirois/dev/pantsbuild/pex/morecantile.venv/lib/python3.8/site-packages/setuptools/config.py", line 426, in parse
section_parser_method(section_options)
File "/home/jsirois/dev/pantsbuild/pex/morecantile.venv/lib/python3.8/site-packages/setuptools/config.py", line 399, in parse_section
self[name] = value
File "/home/jsirois/dev/pantsbuild/pex/morecantile.venv/lib/python3.8/site-packages/setuptools/config.py", line 184, in __setitem__
value = parser(value)
File "/home/jsirois/dev/pantsbuild/pex/morecantile.venv/lib/python3.8/site-packages/setuptools/config.py", line 515, in _parse_version
version = self._parse_attr(value, self.package_dir)
File "/home/jsirois/dev/pantsbuild/pex/morecantile.venv/lib/python3.8/site-packages/setuptools/config.py", line 349, in _parse_attr
module = import_module(module_name)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/tmp/pip-install-wfa5kg7y/morecantile_3a8eec6ae11342be97344f0404801765/morecantile/__init__.py", line 14, in <module>
from .defaults import tms # noqa
File "/tmp/pip-install-wfa5kg7y/morecantile_3a8eec6ae11342be97344f0404801765/morecantile/defaults.py", line 8, in <module>
import attr
ModuleNotFoundError: No module named 'attr'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
And the reason is here: https://github.com/developmentseed/morecantile/blob/f4db676c7367b3d805a5c9872aaac9b727113fcf/setup.cfg#L11-L12
-> https://github.com/developmentseed/morecantile/blob/f4db676c7367b3d805a5c9872aaac9b727113fcf/morecantile/__init__.py#L11-L14
-> https://github.com/developmentseed/morecantile/blob/f4db676c7367b3d805a5c9872aaac9b727113fcf/morecantile/defaults.py#L8enough-analyst-54434
08/27/2022, 10:07 PMenough-analyst-54434
08/27/2022, 10:22 PMhappy-kitchen-89482
08/28/2022, 12:23 AMproud-vr-87793
08/28/2022, 1:44 AMmorecantile
(actually the maintainers seem to have a few packages with the same issue 😅).