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

mark the scandir extension as optional #106

Merged
merged 2 commits into from Aug 2, 2018

Conversation

RonnyPfannschmidt
Copy link
Contributor

build errors no longer stop the build
this may hide errors but ensures installing on jython or linux without gcc works fine

this can be refined to be conditional on jython/pypy and/or gcc missing

build errors no longer stop the build
this may hide errors but ensures installing on jython or linux without gcc works fine
@nicoddemus
Copy link

This fixes pytest-dev/pytest#3750 and alleviates #105 if I'm following the discussion correctly.

setup.py Outdated
@@ -32,7 +34,7 @@
description='scandir, a better directory iterator and faster os.walk()',
long_description=long_description,
py_modules=['scandir'],
ext_modules=[Extension('_scandir', ['_scandir.c'])],
ext_modules=[Extension('_scandir', ['_scandir.c'], optional=True)],

Choose a reason for hiding this comment

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

Perhaps add a comment to say why it's being marked optional?

@lorengordon
Copy link

Also related to #73

@benhoyt benhoyt merged commit 5464b86 into benhoyt:master Aug 2, 2018
@nicoddemus
Copy link

@benhoyt thanks for merging! Could you please ping this thread once this change is released, so we can verify/close the related issues? Thanks!

@benhoyt
Copy link
Owner

benhoyt commented Aug 2, 2018

Will do.

@benhoyt
Copy link
Owner

benhoyt commented Aug 2, 2018

Done and on PyPI

@RonnyPfannschmidt
Copy link
Contributor Author

@benhoyt thanks for the support and the swift release 👍

@RonnyPfannschmidt RonnyPfannschmidt deleted the build-no-c branch August 2, 2018 16:42
@rndrr
Copy link

rndrr commented Aug 2, 2018

Cross-posting here for visibility:


we're seeing the following warning on both 2.7.12 and 2.7.15 and pip fails the build (tested with setuptools: 20.1.1, 40.0.0):

/usr/lib/python2.7/distutils/extension.py:133: UserWarning: Unknown Extension options: 'optional'

Looks like the optional kwarg for Extension is only supported in python 3

@RonnyPfannschmidt
Copy link
Contributor Author

indeed, and i missed the issue because i accidentally got myself gcc installed back between python version testing

@RonnyPfannschmidt
Copy link
Contributor Author

im working on a backport of optional=True

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.

None yet

6 participants