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

[CI] Issue with new setuptools-scm for version configuration in mne-python #11532

Closed
adam2392 opened this issue Mar 5, 2023 · 3 comments
Closed

Comments

@adam2392
Copy link
Member

adam2392 commented Mar 5, 2023

With 3bf04ed, there seems to be an issue when installing mne-python from GitHub with lines like:

python -m pip install --upgrade --progress-bar off --no-deps https://api.github.com/repos/mne-tools/mne-python/zipball/main

This occurs locally too:

(mne) adam2392@adams-mbp mne-connectivity % python -m pip install --upgrade --progress-bar off --no-deps https://api.github.com/repos/mne-tools/mne-python/zipball/main
Collecting https://api.github.com/repos/mne-tools/mne-python/zipball/main
  Downloading https://api.github.com/repos/mne-tools/mne-python/zipball/main (61.5 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [30 lines of output]
      /Users/adam2392/miniconda3/envs/mne/lib/python3.8/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/6_/sl83qtkd68x3_mvfys07_6qm0000gn/T/pip-req-build-06b35e6i/setup.py", line 58, in <module>
          setup(name=DISTNAME,
        File "/Users/adam2392/miniconda3/envs/mne/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "/Users/adam2392/miniconda3/envs/mne/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 109, in setup
          _setup_distribution = dist = klass(attrs)
        File "/Users/adam2392/miniconda3/envs/mne/lib/python3.8/site-packages/setuptools/dist.py", line 462, in __init__
          _Distribution.__init__(
        File "/Users/adam2392/miniconda3/envs/mne/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 293, in __init__
          self.finalize_options()
        File "/Users/adam2392/miniconda3/envs/mne/lib/python3.8/site-packages/setuptools/dist.py", line 886, in finalize_options
          ep(self)
        File "/Users/adam2392/miniconda3/envs/mne/lib/python3.8/site-packages/setuptools/dist.py", line 907, in _finalize_setup_keywords
          ep.load()(self, ep.name, value)
        File "/private/var/folders/6_/sl83qtkd68x3_mvfys07_6qm0000gn/T/pip-req-build-06b35e6i/.eggs/setuptools_scm-7.1.0-py3.8.egg/setuptools_scm/integration.py", line 91, in version_keyword
          _assign_version(dist, config)
        File "/private/var/folders/6_/sl83qtkd68x3_mvfys07_6qm0000gn/T/pip-req-build-06b35e6i/.eggs/setuptools_scm-7.1.0-py3.8.egg/setuptools_scm/integration.py", line 63, in _assign_version
          _version_missing(config)
        File "/private/var/folders/6_/sl83qtkd68x3_mvfys07_6qm0000gn/T/pip-req-build-06b35e6i/.eggs/setuptools_scm-7.1.0-py3.8.egg/setuptools_scm/__init__.py", line 108, in _version_missing
          raise LookupError(
      LookupError: setuptools-scm was unable to detect version for /private/var/folders/6_/sl83qtkd68x3_mvfys07_6qm0000gn/T/pip-req-build-06b35e6i.
      
      Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
      
      For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Also occurs in mne-connectivity: https://app.circleci.com/pipelines/github/mne-tools/mne-connectivity/644/workflows/914de5ee-39ab-4ca1-8111-0362aec121e8/jobs/701

Also noticed this issue in mne-bids. I presume this is not an issue with mne-python, but just tracking it here in case anyone knows an easy work around.

@mscheltienne
Copy link
Member

I had this issue too on another repository, pip install git+https://github.com/mne-tools/mne-python fixes the CI.

@larsoner
Copy link
Member

larsoner commented Mar 6, 2023

Thanks @mscheltienne I adapted your solution to a few other repos, so I'll close

@larsoner larsoner closed this as completed Mar 6, 2023
@adam2392
Copy link
Member Author

adam2392 commented Mar 7, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants