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

remove newline from easybuild-easyblocks package description (required to avoid installation error with setuptools>=59.0.0) #2623

Merged
merged 1 commit into from
Nov 16, 2021

Conversation

boegel
Copy link
Member

@boegel boegel commented Nov 16, 2021

Fix for error that is raised by setuptools 59.0.0 or newer (see pypa/setuptools#2870)

$ pip3 install easybuild-easyblocks==4.4.2
...   
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-256ka0gi/easybuild-easyblocks/setup.py'"'"'; __file__='"'"'/tmp/pip-install-256ka0gi/easybuild-easyblocks/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-256ka0gi/easybuild-easyblocks/pip-egg-info
         cwd: /tmp/pip-install-256ka0gi/easybuild-easyblocks/
    Complete output (25 lines):
    Installing version 4.4.1 (required versions: API >= 4)
    running egg_info
    creating /tmp/pip-install-256ka0gi/easybuild-easyblocks/pip-egg-info/easybuild_easyblocks.egg-info
    writing /tmp/pip-install-256ka0gi/easybuild-easyblocks/pip-egg-info/easybuild_easyblocks.egg-info/PKG-INFO
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-256ka0gi/easybuild-easyblocks/setup.py", line 56, in <module>
        setup(
      File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python3.8/dist-packages/setuptools/command/egg_info.py", line 292, in run
        writer(self, ep.name, os.path.join(self.egg_info, ep.name))
      File "/usr/local/lib/python3.8/dist-packages/setuptools/command/egg_info.py", line 656, in write_pkg_info
        metadata.write_pkg_info(cmd.egg_info)
      File "/usr/lib/python3.8/distutils/dist.py", line 1117, in write_pkg_info
        self.write_pkg_file(pkg_info)
      File "/usr/local/lib/python3.8/dist-packages/setuptools/dist.py", line 167, in write_pkg_file
        write_field('Summary', single_line(self.get_description()))
      File "/usr/local/lib/python3.8/dist-packages/setuptools/dist.py", line 151, in single_line
        raise ValueError('Newlines are not allowed')
    ValueError: Newlines are not allowed

(reported by @sassy-crick)

Copy link
Member

@branfosj branfosj left a comment

Choose a reason for hiding this comment

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

lgtm

@branfosj branfosj merged commit 68f9dda into easybuilders:develop Nov 16, 2021
@boegel boegel deleted the no_newline_description branch November 17, 2021 22:19
@boegel boegel changed the title remove newline from package description (required to avoid installati… remove newline from package description (required to avoid installation error with setuptools>=59.0.0) Nov 24, 2021
@boegel
Copy link
Member Author

boegel commented Nov 26, 2021

Some more context on this: the newline in the package description was introduced in #2137, so installing easybuild-easyblocks versions 4.3.0-4.5.0 is (currently) broken if setuptools>=59.0 is being used...

@boegel
Copy link
Member Author

boegel commented Nov 26, 2021

There's a lengthy discussion on the breaking change in setuptools 59.0.0 at pypa/setuptools#2893.

Apparently it was very easy to miss this, because the warning message that earlier setuptools versions were producing was not even visible by default...

@boegel boegel changed the title remove newline from package description (required to avoid installation error with setuptools>=59.0.0) remove newline from easybuild-easyblocks package description (required to avoid installation error with setuptools>=59.0.0) Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants