Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip >=21.3 is required for editable install #2100

Closed
seisman opened this issue Aug 31, 2022 · 5 comments · Fixed by #2109 or #2290
Closed

pip >=21.3 is required for editable install #2100

seisman opened this issue Aug 31, 2022 · 5 comments · Fixed by #2109 or #2290
Labels
bug Something isn't working
Milestone

Comments

@seisman
Copy link
Member

seisman commented Aug 31, 2022

Description of the problem

I just had a fresh install of the latest miniconda. It now ships Python 3.9.13 and pip 21.2.4 in the base environment by default.

Installing PyGMT in editable mode fails with the following error:

$ pip install --no-deps -e .
ERROR: File "setup.py" or "setup.cfg" not found. Directory cannot be installed in editable mode: /home/seisman/OSS/gmt/pygmt
(A "pyproject.toml" file was found, but editable mode currently requires a setuptools-based build.)

After upgrading pip to 21.3 or newer, the installation works again.

It's related to a new feature in pip 21.3 (https://pip.pypa.io/en/stable/news/#v21-3), which was released on 2021-10-11.

Support editable installs for projects that have a pyproject.toml and use a build backend that supports PEP 660. (#8212)

So, it means that users who have pip<21.3 cannot install pygmt in editable mode.

@seisman seisman added the bug Something isn't working label Aug 31, 2022
@seisman
Copy link
Member Author

seisman commented Aug 31, 2022

Adding an empty setup.cfg file to the repository root directory can fix the issue. So, do we want to have setup.cfg back for users who have pip<21.3?

@weiji14
Copy link
Member

weiji14 commented Sep 5, 2022

If we want to add back a setup.cfg file, how long do we want to keep it for? Until PyGMT v0.9.0? v0.10.0?

@seisman
Copy link
Member Author

seisman commented Sep 5, 2022

I think we should keep it until the latest miniconda/Anaconda ships pip>=21.3 by default.

@seisman
Copy link
Member Author

seisman commented Dec 12, 2022

I'm reopening the issue so that we won't forge to remove the setup.cfg in the future.

@seisman seisman reopened this Dec 12, 2022
@seisman seisman modified the milestones: 0.8.0, 0.9.0 Dec 12, 2022
@seisman
Copy link
Member Author

seisman commented Dec 31, 2022

The latest Anaconda/miniconda release in Oct. 2022 ships pip 22.2.2 by default (see the Anaconda changelog and the Anaconda package lists. Now it's time to remove the setup.cfg file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants