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

Add option to disable speedups even if they were built when bezier was installed #115

Open
dhermes opened this issue Feb 19, 2018 · 3 comments

Comments

@dhermes
Copy link
Owner

dhermes commented Feb 19, 2018

No description provided.

@dhermes
Copy link
Owner Author

dhermes commented Oct 19, 2018

It may be easiest to just do this in src/bezier/_speedup.pyx at import time. We could check for an environment variable (e.g. just re-use BEZIER_NO_EXTENSIONS) and than raise an ImportError if it's set.

Some other implications:

  • src/bezier/__config__.py (in particular handle_import_error()) would need updating
  • _HAS_SPEEDUP may need to be renamed, e.g. to _USE_SPEEDUP

@dhermes
Copy link
Owner Author

dhermes commented Jan 2, 2020

We could make the _curve_helpers.py (and related modules) go into a hazmat subpackage and just have them be publicly available. There is prior art for this in cryptography, trio and I'm sure other popular packages.

UPDATE: Filed this as #170.

@dhermes
Copy link
Owner Author

dhermes commented Jan 6, 2020

Regarding the hazmat comment, #160 made this more of a possible by putting some of these helpers in modules prefixed with _py_ to signify that they are pure-Python implementations (as opposed to a mix of Python and a binary extension speedup).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant