Skip to content

pip install -e django-select2/ throw errors if .git folder is removed. #175

@jerryincloud

Description

@jerryincloud

Describe the bug
setuptools-scm was unable to detect version for /portal/django-select2. if .git folder is removed then try to install it.

Exception & Traceback

      obj = import_module(mod_path)
    File "/home/ec2-user/.pyenv/versions/3.9.15/lib/python3.9/importlib/__init__.py", line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
    File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 850, in exec_module
    File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
    File "/tmp/pip-build-env-wdsajbwb/overlay/lib/python3.9/site-packages/flit_scm/__init__.py", line 21, in <module>
      get_version(**setuptools_scm_config)
    File "/tmp/pip-build-env-wdsajbwb/overlay/lib/python3.9/site-packages/setuptools_scm/__init__.py", line 149, in get_version
      _version_missing(config)
    File "/tmp/pip-build-env-wdsajbwb/overlay/lib/python3.9/site-packages/setuptools_scm/__init__.py", line 109, in _version_missing
      raise LookupError(
  LookupError: setuptools-scm was unable to detect version for /portal/django-select2.
  
  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.

Code Snippet
Please provide us with a code example on how to reproduce the error.

pip install -e django-select2/

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions