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

CI: 'SpecifierSet' object has no attribute 'split' #2350

Closed
decentral1se opened this issue Oct 7, 2019 · 3 comments
Closed

CI: 'SpecifierSet' object has no attribute 'split' #2350

decentral1se opened this issue Oct 7, 2019 · 3 comments
Assignees
Labels
bug critical major packaging installation, packaging, built containers
Milestone

Comments

@decentral1se
Copy link
Contributor

decentral1se commented Oct 7, 2019

Looks like some sort of pip/setuptools issue related to specifiers (>,<,>=,...)

(.venv) ➜ molecule (master) ✔ pip show setuptools | grep -i version
Version: 41.4.0
(.venv) ➜ molecule (master) ✔ pip show pip | grep -i version
Version: 19.2.3

(.venv) ➜  molecule (master) ✔ pip install -e .      
Obtaining file:///home/decentral1se/hacking/molecule
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: /home/decentral1se/hacking/molecule/.venv/bin/python /home/decentral1se/hacking/molecule/.venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp1cijsh20
         cwd: /home/decentral1se/hacking/molecule
    Complete output (28 lines):
    Traceback (most recent call last):
      File "/home/decentral1se/hacking/molecule/.venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
        main()
      File "/home/decentral1se/hacking/molecule/.venv/lib/python3.7/site-packages/pip/(.venv) ➜  molecule (master) ✔ pip install -e .                    
Obtaining file:///home/decentral1se/hacking/molecule
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: /home/decentral1se/hacking/molecule/.venv/bin/python /home/decentral1se/hacking/molecule/.venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp98lvx227
         cwd: /home/decentral1se/hacking/molecule
    Complete output (28 lines):
    Traceback (most recent call last):
      File "/home/decentral1se/hacking/molecule/.venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
        main()
      File "/home/decentral1se/hacking/molecule/.venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "/home/decentral1se/hacking/molecule/.venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 69, in prepare_metadata_for_build_wheel
        return hook(metadata_directory, config_settings)
      File "/tmp/pip-build-env-701d0led/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 156, in prepare_metadata_for_build_wheel
        self.run_setup()
      File "/tmp/pip-build-env-701d0led/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 142, in run_setup
        exec(compile(code, __file__, 'exec'), locals())
      File "setup.py", line 350, in <module>
        __name__ == '__main__' and setuptools.setup(**setup_params)
      File "/tmp/pip-build-env-701d0led/overlay/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/home/decentral1se/.pyenv/versions/3.7.2/lib/python3.7/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/tmp/pip-build-env-701d0led/overlay/lib/python3.7/site-packages/setuptools/dist.py", line 447, in __init__
        k: v for k, v in attrs.items()
      File "/home/decentral1se/.pyenv/versions/3.7.2/lib/python3.7/distutils/dist.py", line 292, in __init__
        self.finalize_options()
      File "/tmp/pip-build-env-701d0led/overlay/lib/python3.7/site-packages/setuptools/dist.py", line 735, in finalize_options
        ep.load()(self, ep.name, value)
      File "/tmp/pip-build-env-701d0led/overlay/lib/python3.7/site-packages/setuptools/dist.py", line 291, in check_specifier
        packaging.specifiers.SpecifierSet(value)
      File "/tmp/pip-build-env-701d0led/overlay/lib/python3.7/site-packages/setuptools/_vendor/packaging/specifiers.py", line 594, in __init__
        specifiers = [s.strip() for s in specifiers.split(",") if s.strip()]
    AttributeError: 'SpecifierSet' object has no attribute 'split'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/decentral1se/hacking/molecule/.venv/bin/python /home/decentral1se/hacking/molecule/.venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp98lvx227 Check the logs for full command output.
@decentral1se
Copy link
Contributor Author

Temporary fix is out @ #2351 🚒

@ssbarnea
Copy link
Member

This seems to be the same issue I reported few minutes ago on ansible/ansible-lint#590

@ssbarnea ssbarnea self-assigned this Oct 18, 2019
@ssbarnea ssbarnea added critical major packaging installation, packaging, built containers labels Oct 18, 2019
ssbarnea added a commit to ssbarnea/molecule that referenced this issue Oct 18, 2019
This should address the failure to install which seems to still
appears from time to time even with our pyproject.toml workaround.

Fixes: ansible#2350

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
@ssbarnea ssbarnea added this to the 3.0 milestone Oct 18, 2019
@helpr helpr bot added the pr-available label Oct 18, 2019
ssbarnea added a commit to ssbarnea/molecule that referenced this issue Oct 20, 2019
As we encountered case where initial creation of the virtualenv with tox
worked fine but attempt to run again on it was trigerring ansible#2350 we
add a CI test that should prevent this from happenign again.

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
ssbarnea added a commit that referenced this issue Oct 20, 2019
As we encountered case where initial creation of the virtualenv with tox
worked fine but attempt to run again on it was trigerring #2350 we
add a CI test that should prevent this from happenign again.

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
ssbarnea added a commit to ssbarnea/molecule that referenced this issue Oct 20, 2019
This should address the failure to install which seems to still
appears from time to time even with our pyproject.toml workaround.

This revers pinning of setuptools for build-from-source, which was
made two weeks ago in attempt to avoid the same bug.

Fixes: ansible#2350

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
@helpr helpr bot added pr-rejected and removed pr-available labels Oct 20, 2019
@ssbarnea
Copy link
Member

This was fixed by ssbarnea@c1d0303

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug critical major packaging installation, packaging, built containers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants