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

Newlines are not allowed in Python package description #391

Merged
merged 1 commit into from
Nov 23, 2021

Conversation

Luthaf
Copy link
Contributor

@Luthaf Luthaf commented Nov 17, 2021

This fixes pip install . with the latest version of pip (issue discovered by @bananenpampe!). Without the change, pip fails the build with

Processing /Users/guillaume/code/librascal
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /opt/miniconda3/bin/python /opt/miniconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /var/folders/v6/c9ym3wnn4c3c2t3r9sv4v02h0000gn/T/tmph2nyklro
       cwd: /Users/guillaume/code/librascal
  Complete output (38 lines):
  running egg_info
  writing bindings/rascal.egg-info/PKG-INFO
  Traceback (most recent call last):
    File "/opt/miniconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
      main()
    File "/opt/miniconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/opt/miniconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/private/var/folders/v6/c9ym3wnn4c3c2t3r9sv4v02h0000gn/T/pip-build-env-tzp2ef7d/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 162, in get_requires_for_build_wheel
      return self._get_build_requires(
    File "/private/var/folders/v6/c9ym3wnn4c3c2t3r9sv4v02h0000gn/T/pip-build-env-tzp2ef7d/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 143, in _get_build_requires
      self.run_setup()
    File "/private/var/folders/v6/c9ym3wnn4c3c2t3r9sv4v02h0000gn/T/pip-build-env-tzp2ef7d/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 158, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 24, in <module>
      setup(
    File "/private/var/folders/v6/c9ym3wnn4c3c2t3r9sv4v02h0000gn/T/pip-build-env-tzp2ef7d/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 469, in setup
      return upstream_setup(*args, **kw)
    File "/private/var/folders/v6/c9ym3wnn4c3c2t3r9sv4v02h0000gn/T/pip-build-env-tzp2ef7d/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/opt/miniconda3/lib/python3.9/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/opt/miniconda3/lib/python3.9/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/opt/miniconda3/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/private/var/folders/v6/c9ym3wnn4c3c2t3r9sv4v02h0000gn/T/pip-build-env-tzp2ef7d/overlay/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 292, in run
      writer(self, ep.name, os.path.join(self.egg_info, ep.name))
    File "/private/var/folders/v6/c9ym3wnn4c3c2t3r9sv4v02h0000gn/T/pip-build-env-tzp2ef7d/overlay/lib/python3.9/site-packages/setuptools/command/egg_info.py", line 656, in write_pkg_info
      metadata.write_pkg_info(cmd.egg_info)
    File "/opt/miniconda3/lib/python3.9/distutils/dist.py", line 1117, in write_pkg_info
      self.write_pkg_file(pkg_info)
    File "/private/var/folders/v6/c9ym3wnn4c3c2t3r9sv4v02h0000gn/T/pip-build-env-tzp2ef7d/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 167, in write_pkg_file
      write_field('Summary', single_line(self.get_description()))
    File "/private/var/folders/v6/c9ym3wnn4c3c2t3r9sv4v02h0000gn/T/pip-build-env-tzp2ef7d/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 151, in single_line
      raise ValueError('Newlines are not allowed')
  ValueError: Newlines are not allowed

Copy link
Contributor

@agoscinski agoscinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure. if you feel like, you can rerun the notebook tests, sometimes timeouts happen.

@Luthaf Luthaf merged commit a061e91 into lab-cosmo:master Nov 23, 2021
@Luthaf Luthaf deleted the fix-pip-install branch November 23, 2021 17:35
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

Successfully merging this pull request may close these issues.

2 participants