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

get only first part of SOABI for ABI tag #2915

Merged
merged 2 commits into from
Jun 23, 2015
Merged

Conversation

minrk
Copy link
Contributor

@minrk minrk commented Jun 18, 2015

after cpython-

CPython 3.5 has SOABI='cpython-35m-darwin'

This now returns the expected 'cp35m'

The alternate fix is to add a .replace('-', '_'), so that the ABI tag would be cp35m_darwin, but right now there is a hyphen in the tag, which I believe is not valid in pep425.

Related PR on wheel

after cpython-

CPython 3.5 has SOABI='cpython-35m-darwin'

This now returns the expected 'cp35m'
@minrk
Copy link
Contributor Author

minrk commented Jun 18, 2015

I should add: the situation right now is that OS X wheels cannot be created or uploaded with Python 3.5, since wheel is producing the abi tag cpdarwin which it rejects itself, and pip is looking for the tag cp35m-darwin, which PyPI rejects on upload as invalid.

@dstufft
Copy link
Member

dstufft commented Jun 18, 2015

I'm not super familiar with this code, is it possible to add a test, or there a test that's failing on Python 3.5 on OSX right now?

@minrk
Copy link
Contributor Author

minrk commented Jun 18, 2015

The tests don't run at all for me on Python 3.5. They all fail with:

________________________________________________________________________________________________ ERROR collecting tests/unit/test_wheel.py _________________________________________________________________________________________________
.tox/py35/lib/python3.5/site-packages/py/_path/local.py:650: in pyimport
    __import__(modname)
<frozen importlib._bootstrap>:969: in _find_and_load
    ???
<frozen importlib._bootstrap>:954: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:892: in _find_spec
    ???
<frozen importlib._bootstrap>:873: in _find_spec_legacy
    ???
.tox/py35/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:137: in find_module
    source_stat, co = _rewrite_test(state, fn_pypath)
.tox/py35/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:278: in _rewrite_test
    rewrite_asserts(tree)
.tox/py35/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:336: in rewrite_asserts
    AssertionRewriter().run(mod)
.tox/py35/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:550: in run
    new.extend(self.visit(child))
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ast.py:245: in visit
    return visitor(node)
.tox/py35/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:658: in visit_Assert
    top_condition, explanation = self.visit(assert_.test)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ast.py:245: in visit
    return visitor(node)
.tox/py35/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:789: in visit_Compare
    left_res, left_expl = self.visit(comp.left)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ast.py:245: in visit
    return visitor(node)
.tox/py35/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:780: in visit_Attribute
    value, value_expl = self.visit(attr.value)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ast.py:245: in visit
    return visitor(node)
.tox/py35/lib/python3.5/site-packages/_pytest/assertion/rewrite.py:693: in visit_Name
    locs = ast.Call(self.builtin("locals"), [], [], None, None)
E   TypeError: Call constructor takes either 0 or 3 positional arguments

I can add a test that asserts that there are no hyphens in the tags.

@dstufft
Copy link
Member

dstufft commented Jun 18, 2015

Oh, on 3.5 you need --assert=plain passed to pytest because of pytest-dev/pytest#744.

@minrk
Copy link
Contributor Author

minrk commented Jun 18, 2015

Thanks. Tests are indeed passing without this patch, and they shouldn't be. I've added a test that fails on master, but passes after this patch.

@dstufft
Copy link
Member

dstufft commented Jun 18, 2015

Awesome, thanks! There's a style error, if you can fix that up I can merge this right away.

@minrk
Copy link
Contributor Author

minrk commented Jun 18, 2015

pep8 should be appeased.

@ned-deily
Copy link

Thanks for finding this! The updated pip should probably get pushed into the 3.5 release. We should open a release-blocker Python issue for that.

@minrk
Copy link
Contributor Author

minrk commented Jun 20, 2015

This apparently also affects building wheels on Linux. I have a travis bot for building wheels, and it can't build any compiled wheels on 3.5 due to this bug.

dstufft added a commit that referenced this pull request Jun 23, 2015
get only first part of SOABI for ABI tag
@dstufft dstufft merged commit c68a56d into pypa:develop Jun 23, 2015
natefoo added a commit to natefoo/pip that referenced this pull request Oct 13, 2015
- Catch IOError wherever sysconfig is used (pypa#1074)
- Reapply pypa#2915

Also, be sure to normalize the SOABI
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants