Skip to content

pip >=21.3 is required for editable install  #2100

Description

@seisman

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.

Activity

  1. added
    bug
    on Aug 31, 2022
  2. seisman commented on Aug 31, 2022

    @seisman
    MemberAuthor

    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?

  3. added this to the 0.8.0 milestone on Sep 2, 2022
  4. weiji14 commented on Sep 5, 2022

    @weiji14
    Member

    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?

  5. seisman commented on Sep 5, 2022

    @seisman
    MemberAuthor

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

  6. seisman commented on Dec 12, 2022

    @seisman
    MemberAuthor

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

  7. modified the milestones: 0.8.0, 0.9.0 on Dec 12, 2022
  8. seisman commented on Dec 31, 2022

    @seisman
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions