Skip to content

Use setup_requires for cpuinfo #130

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

Conversation

alimanfoo
Copy link
Member

@alimanfoo alimanfoo commented Nov 23, 2018

Use setup_requires to obtain cpuinfo module rather than vendoring it. (Hopefully) supersedes #82.

TODO:

  • tox -e py37 passes locally
  • tox -e py27 passes locally
  • Changes documented in docs/release.rst
  • AppVeyor and Travis CI passes
  • Test coverage to 100% (Coveralls passes)

@@ -22,7 +22,6 @@ matrix:

install:
- pip install -U tox-travis coveralls pip setuptools wheel
- python setup.py build_ext --inplace
Copy link
Member Author

Choose a reason for hiding this comment

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

This isn't actually needed, building will happen via tox.

Copy link
Member

Choose a reason for hiding this comment

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

Agreed. Think this was causing the build to happen twice before actually.

@alimanfoo alimanfoo added this to the 0.6.0 milestone Nov 23, 2018
have_sse2 = 'sse2' in cpu_info['flags']
have_avx2 = 'avx2' in cpu_info['flags']
try:
import cpuinfo
Copy link
Member

@jakirkham jakirkham Nov 23, 2018

Choose a reason for hiding this comment

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

Unfortunately this actually won't benefit from setup_requires at this stage as Setuptools hasn't had the opportunity to install py-cpuinfo. To get this to work correctly, we need to add a BuildExtCommand subclass like this one for NumPy and add it to our cmdclasses in setup.

Copy link
Member Author

Choose a reason for hiding this comment

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

Doh, of course.

@alimanfoo
Copy link
Member Author

On reflection I think I'm going to push back work to avoid vendoring py-cpuinfo to the next release. It's not straightforward to use a BuildExtCommand subclass for the blosc extension. Better to wait for full support for pyproject.toml IMO.

@alimanfoo alimanfoo closed this Nov 27, 2018
@alimanfoo alimanfoo removed this from the 0.6.0 milestone Nov 27, 2018
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