Menu

#1 build fails with python 3.7

pending
nobody
None
major
bug
2020-01-23
2020-01-23
No

I am in the process of upgrading python to 3.7 for Alpine Linux, but get into an error when running.python3 setup.py build:

sys.argv ['setup.py', 'build']
Warning: 'keywords' should be a list, got type 'NoneType'
Traceback (most recent call last):
  File "setup.py", line 922, in <module>
    main()
  File "setup.py", line 910, in main
    setup(**kw)
  File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.7/distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib/python3.7/site-packages/setuptools/dist.py", line 447, in __init__
    k: v for k, v in attrs.items()
  File "/usr/lib/python3.7/distutils/dist.py", line 267, in __init__
    getattr(self.metadata, "set_" + key)(val)
  File "/usr/lib/python3.7/distutils/dist.py", line 1203, in set_keywords
    self.keywords = _ensure_list(value, 'keywords')
  File "/usr/lib/python3.7/distutils/dist.py", line 40, in _ensure_list
    value = list(value)
TypeError: 'NoneType' object is not iterable

(originally posted on 2019-04-15 at 08:21:19 by ncopa <ncopa@bitbucket>)

Discussion

  • Anthon van der Neut

    None
    (originally posted on 2019-04-15 at 08:21:48 by ncopa <ncopa@bitbucket>)

     
  • Anthon van der Neut

    • status set to on hold

    I cannot reproduce this:

    $ /opt/python/3.7/bin/python -m venv /tmp/pathlib_issue1
    $ source /tmp/pathlib_issue1/bin/activate
    (pathlib_issue1) $ pip install -U pip
    Looking in indexes: https://pypi.org/simple, http://localhost:4040/anthon/dev/+simple/
    Requirement already up-to-date: pip in /tmp/pathlib_issue1/lib/python3.7/site-packages (19.0.3)
    (pathlib_issue1) $ python --version
    Python 3.7.3
    (pathlib_issue1) $ pip install -U ruamel.std.pathlib
    Looking in indexes: https://pypi.org/simple, http://localhost:4040/anthon/dev/+simple/
    Collecting ruamel.std.pathlib
      Using cached https://files.pythonhosted.org/packages/8c/44/cbe416a864949348b63fc944278bf97905e8edf6a0323e350f05ce87b24e/ruamel.std.pathlib-0.6.3-py2.py3-none-any.whl
    Installing collected packages: ruamel.std.pathlib
    Successfully installed ruamel.std.pathlib-0.6.3
    (pathlib_issue1) $ deactivate
    $ rm -rf /tmp/pathlib_issue1/
    

    Make sure the pip and setuptools in your (virtual) environment are up-to-date. Retry this in a clean virtualenv as above and include the output of pip list ran after you get the error (assuming it persists), and the output of python --version

    (originally posted on 2019-04-15 at 08:47:24)

     
  • Anthon van der Neut

    I am now using this as a workaround:

    diff --git a/__init__.py b/__init__.py
    index 3f4ace5..9e71492 100644
    --- a/__init__.py
    +++ b/__init__.py
    @@ -14,6 +14,7 @@ _package_data = dict(
         extras_require={
             ':python_version<="3.4"': ['pathlib2', ],
         },
    +    keywords='',
         license='MIT License',
         universal=True,
         tox=dict(
    

    (originally posted on 2019-04-15 at 10:26:21 by ncopa <ncopa@bitbucket>)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.