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

python setup.py egg_info did not run successfully #117

Open
frossigneux opened this issue Jun 28, 2022 · 6 comments
Open

python setup.py egg_info did not run successfully #117

frossigneux opened this issue Jun 28, 2022 · 6 comments

Comments

@frossigneux
Copy link

I try to install the package on Gitlab with image python:3.8.12.

Context:

$ python -V
Python 3.8.12
$ pip install virtualenv
Collecting virtualenv
  Downloading virtualenv-20.15.0-py2.py3-none-any.whl (10.1 MB)
Collecting distlib<1,>=0.3.1
  Downloading distlib-0.3.4-py2.py3-none-any.whl (461 kB)
Collecting filelock<4,>=3.2
  Downloading filelock-3.7.1-py3-none-any.whl (10 kB)
Collecting six<2,>=1.9.0
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting platformdirs<3,>=2
  Downloading platformdirs-2.5.2-py3-none-any.whl (14 kB)
Installing collected packages: six, platformdirs, filelock, distlib, virtualenv
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Successfully installed distlib-0.3.4 filelock-3.7.1 platformdirs-2.5.2 six-1.16.0 virtualenv-20.15.0
WARNING: You are using pip version 21.2.4; however, version 22.1.2 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.

I get an error:

Collecting django-autofixture
  Downloading django-autofixture-0.12.1.tar.gz (29 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      running egg_info
      creating /tmp/pip-pip-egg-info-pz0fsdki/django_autofixture.egg-info
      writing /tmp/pip-pip-egg-info-pz0fsdki/django_autofixture.egg-info/PKG-INFO
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-qggos2b0/django-autofixture_c9a0d2963ccb464292e299cf8dbd723b/setup.py", line 43, in <module>
          setup(
        File "/builds/pictia-lab/pictia-back/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "/builds/pictia-lab/pictia-back/venv/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 177, in setup
          return run_commands(dist)
        File "/builds/pictia-lab/pictia-back/venv/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 193, in run_commands
          dist.run_commands()
        File "/builds/pictia-lab/pictia-back/venv/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
          self.run_command(cmd)
        File "/builds/pictia-lab/pictia-back/venv/lib/python3.8/site-packages/setuptools/dist.py", line 1229, in run_command
          super().run_command(command)
        File "/builds/pictia-lab/pictia-back/venv/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.run()
        File "/builds/pictia-lab/pictia-back/venv/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 301, in run
          writer(self, ep.name, os.path.join(self.egg_info, ep.name))
        File "/builds/pictia-lab/pictia-back/venv/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 665, in write_pkg_info
          metadata.write_pkg_info(cmd.egg_info)
        File "/builds/pictia-lab/pictia-back/venv/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 1136, in write_pkg_info
          self.write_pkg_file(pkg_info)
        File "/builds/pictia-lab/pictia-back/venv/lib/python3.8/site-packages/setuptools/dist.py", line 234, in write_pkg_file
          if not long_description.endswith("\n"):
      AttributeError: 'UltraMagicString' object has no attribute 'endswith'
      [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.
@shivshankardayal
Copy link

I am also having the same issue.

@castorfou
Copy link

same here with python 3.10

@castorfou
Copy link

and with python 3.7 as well

@NicolasBFR
Copy link

Same problem with python 3.10 and latest setuptools

@FranciscodeMaussion
Copy link

just remove all the UltraMagicString uses from setup.py

@kostiag
Copy link

kostiag commented Feb 29, 2024

Same problem with python 3.11 and 3.12.2

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

6 participants