ffprobe-python icon indicating copy to clipboard operation
ffprobe-python copied to clipboard

Installing with pip is broken with setuptools 59.x.y

Open theyosh opened this issue 3 years ago • 0 comments

Hi,

When I have installed python package setuptools 59.x.y version (latest), I am unable to build this ffprobe package. This has to do with that you read a readme file for description: https://github.com/gbstack/ffprobe-python/blob/master/setup.py#L7

And apparently, it is not allowed to have new lines in there with setup tools 59.x.y version.

pip install git+https://github.com/gbstack/ffprobe-python
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting git+https://github.com/gbstack/ffprobe-python
  Cloning https://github.com/gbstack/ffprobe-python to /tmp/pip-req-build-ot7_lcsu
  Running command git clone --filter=blob:none -q https://github.com/gbstack/ffprobe-python /tmp/pip-req-build-ot7_lcsu
  Resolved https://github.com/gbstack/ffprobe-python to commit 6b499f63e3db0293ae58f99c1726cd0aabe2bd12
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/pi/TerrariumPI/venv/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-ot7_lcsu/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-ot7_lcsu/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-xj02ahpt
       cwd: /tmp/pip-req-build-ot7_lcsu/
  Complete output (26 lines):
  running egg_info
  creating /tmp/pip-pip-egg-info-xj02ahpt/ffprobe_python.egg-info
  writing /tmp/pip-pip-egg-info-xj02ahpt/ffprobe_python.egg-info/PKG-INFO
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-req-build-ot7_lcsu/setup.py", line 38, in <module>
      'Topic :: Software Development :: Libraries'
    File "/home/pi/TerrariumPI/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/pi/TerrariumPI/venv/lib/python3.7/site-packages/setuptools/command/egg_info.py", line 292, in run
      writer(self, ep.name, os.path.join(self.egg_info, ep.name))
    File "/home/pi/TerrariumPI/venv/lib/python3.7/site-packages/setuptools/command/egg_info.py", line 656, in write_pkg_info
      metadata.write_pkg_info(cmd.egg_info)
    File "/usr/lib/python3.7/distutils/dist.py", line 1117, in write_pkg_info
      self.write_pkg_file(pkg_info)
    File "/home/pi/TerrariumPI/venv/lib/python3.7/site-packages/setuptools/dist.py", line 167, in write_pkg_file
      write_field('Summary', single_line(self.get_description()))
    File "/home/pi/TerrariumPI/venv/lib/python3.7/site-packages/setuptools/dist.py", line 151, in single_line
      raise ValueError('Newlines are not allowed')
  ValueError: Newlines are not allowed
  ----------------------------------------
WARNING: Discarding git+https://github.com/gbstack/ffprobe-python. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Where you see the Value Error: Newlines are not allowed

When I downgrade to setup tools 58.x.y version, I can build this package. So it looks like the setup tools is changing their behavior about description fields. Could you have a look into this?

Thanks

theyosh avatar Nov 28 '21 09:11 theyosh