FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[Bug]: matplotlib __init__.py checks for .git folder 2 levels up, then errors due to setup tools_scm · Issue #23114 · matplotlib/matplotlib · GitHub

[Bug]: matplotlib __init__.py checks for .git folder 2 levels up, then errors due to setup tools_scm #23114

Closed

Description

Bug summary

My Uni deployed packages for me, which they store using git. Their .git folder happens to be two levels up from __init__.py, which see the folder and then requires setuptools_scm, which is not available in our cluster's environment.

Code for reproduction

Create .git folder two levels up from __init__.py .

Actual outcome

...
File /usr/local/pace-apps/manual/packages/nipype/1.7.1/matplotlib/__init__.py:168, in _get_version()
   166 root = Path(__file__).resolve().parents[2]
   167 if (root / ".git").exists() and not (root / ".git/shallow").exists():
--> 168     import setuptools_scm
   169     return setuptools_scm.get_version(
   170         root=root,
   171         version_scheme="release-branch-semver",
   172         local_scheme="node-and-date",
   173         fallback_version=_version.version,
   174     )
   175 else:  # Get the version from the _version.py setuptools_scm file.

ModuleNotFoundError: No module named 'setuptools_scm'

Expected outcome

No errors, no requirement for setuptools_scm.

Additional information

New setup on our PACE-ICE cluster.
Not sure how they installed it.

Operating system

Linux

Matplotlib Version

3.5.1

Matplotlib Backend

agg

Python version

3.8.8

Jupyter version

6.4.11

Installation

No response

Activity

  1. jklymak commented on May 24, 2022

    Member

    @JohnAtl your uni actually puts a .git inside package directories? It seems strange that they would version control an external package they have downloaded from pip.

    ping @timhoffm - _get_version() maybe need a provisional import here, or we need some other way to know if we are on a development build or not.

  2. added 3 commits that reference this issue on May 26, 2022
    3b0ea0f
    2c02929
    db0b2c9
  3. tacaswell commented on May 26, 2022

    Member

    That is a .... strong choice on the part of who ever runs your cluster, but I can see how they got there. So long as they exclude the pyc files it might not ever get too outrageously big.

  4. added this to the v3.5.3 milestone on May 26, 2022
  5. added a commit that references this issue on Jun 14, 2022
    a31b3a8
  6. added a commit that references this issue on Jun 24, 2022
    94b7bf5
  7. added a commit that references this issue on Apr 19, 2026
    e815ad6
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL