Closed yunjunz closed 7 months ago
I try to replace the old setup.py
with pyproject.toml
here, but testing both locally and in the Circle CI failed due to the same error as below. @avalentino @jhkennedy @scottstanie Could you take a look at the PR when you get a chance and help me find out what went wrong?
(test_mintpy) yunjunz:~>$ cd ~/tools/MintPy/
(test_mintpy) yunjunz:~/tools/MintPy>$ python -m pip install -e .
Obtaining file:///Users/yunjunz/tools/MintPy
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Preparing editable metadata (pyproject.toml) ... done
INFO: pip is looking at multiple versions of mintpy to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement python>=3.6 (from mintpy) (from versions: none)
ERROR: No matching distribution found for python>=3.6
I think the python>=3.6
part isn't install-able via pip, so it had to be removed from requirements.txt
. It's enforced by having it in pyproject.toml
.
(sorry I didn't mean to push directly to you branch! 😬 )
By the way, had you considered bumping up the min python version? Both 3.6 and 3.7 are now in the end-of-life stage
Thank you @scottstanie @avalentino for the quick fix and suggestions.
I just bumped the min version to 3.8 as you suggested. I will look at the new syntax of 3.7 and 3.8 on another day to see what can be simplified in the code to leverage the new version!
Description of proposed changes
add
tests/requirements.txt
file for test requirementsrequirements.txt
: move pre-commit into thetests/requirements.txt
filepyproject.toml
: add all the corresponding contents fromsetup.py
based on https://setuptools.pypa.io/en/latest/userguide/pyproject_config.htmldelete
setup.py
Reminders