proud-vr-87793
08/27/2022, 8:39 PMmorecantile
(found on Github here). When I try to do ./pants generate-lockfiles
, I get an error like this:
20:25:25.78 [INFO] Completed: Generate lockfile for python-default
20:25:25.78 [ERROR] 1 Exception encountered:
ProcessExecutionFailure: Process 'Generate lockfile for python-default' failed with exit code 1.
stdout:
stderr:
WARNING: Discarding <https://files.pythonhosted.org/packages/82/9e/718d2802f64a17b16a0589a97fc3e454f013400403672acde445d289b271/morecantile-3.1.2.tar.gz#sha256=72aacd46a8e74032d081befe2e76ff0861abc71ae95940be84580202be474ad6> (from <https://pypi.org/simple/morecantile/>) (requires-python:>=3.7). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement morecantile==3.1.2
ERROR: No matching distribution found for morecantile==3.1.2
pid 2973543 -> /home/ubuntu/.cache/pants/named_caches/pex_root/venvs/05babdc9287e6fa5ed263c085edf8c6d27209bb3/ddab8011daaee380698ac2fb9701af18c90c03f6/pex --disable-pip-version-check --no-python-version-warning --exists-action a --isolated -q --cache-dir /home/ubuntu/.cache/pants/named_caches/pex_root --log /tmp/process-executionf2VqiP/.tmp/pex-pip-logwme1obv6/pip.log download --dest /tmp/process-executionf2VqiP/.tmp/tmpkbbqnlo4/usr.bin.python3.8 --requirement __pip_args.txt morecantile==3.1.2 --index-url <https://pypi.org/simple/> --retries 5 --timeout 15 exited with 1 and STDERR:
None
It seems that I can generate lockfiles containing versions of morecantile
up to and including 3.0.5
. After some light investigation, I suspect that this is because starting at the next version, the distribution's version argument in the setup()
function is removed (see here). I'm guessing they're determining this dynamically during build. Which, might be a problem in itself. But, Poetry seems to be able to install this package fine. And so can Pants if I install from Github directly (instead of PyPI, ie. by specifying git+<https://github.com/developmentseed/morecantile@master#egg=morecantile>
in requirements.txt
.
Does the lack of a version in the setup
function seem plausible as the source of the error above? If yes, is this just Pants being pickier than eg. Poetry?enough-analyst-54434
08/27/2022, 10:18 PMinstall_requires
metadata and installs leaves 1st. The fundamental problem here is attrs
is, in addition to being a runtime (install_requires
) dependency, a build-time dependency (setup_requires
) via 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#L8
but morecantile 3.1.2
does not list it as a setup_requires
. The `setup_requires`mechanism in setuptools is pretty broken; so its good that morecantile master is now using a PEP-517/518 build where you can correctly specify setup_requires
style build time deps using [build-system] requires = [...]
. It looks like they removed the `attrs`build time dep though as well as moving from traditional setup.py
to flit
as their PEP-517 build backend.