-
Create a one-off Heroku app (or use an existing one) for the compilation.
-
Set the app to use the Python buildpack with OpenSSL 1.0.2g
heroku buildpacks:set https://github.com/yuvadm/heroku-buildpack-python-openssl-1.0.2.git -a myapp
-
Run a one-off dyno to do the compilation:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/setup.py | |
+++ b/setup.py | |
@@ -788,11 +788,9 @@ class PyBuildExt(build_ext): | |
depends=['socketmodule.h'], | |
libraries=math_libs) ) | |
# Detect SSL support for the socket module (via _ssl) | |
- search_for_ssl_incs_in = [ | |
- '/usr/local/ssl/include', | |
- '/usr/contrib/ssl/include/' | |
- ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Checker for non-awaited async function calls.""" | |
import six | |
import astroid | |
from pylint.checkers import BaseChecker, utils | |
from pylint.interfaces import IAstroidChecker | |
def register(linter): |
- In iTerm2, go to Settings -> Profiles -> Advanced -> Smart Selection -> Edit
- Click
+
to add a rule with the following values:- Notes: Python traceback
- Regular Expression:
File "(.+)", line ([0-9]+), in .+
- Precision: Very High
- Click
Edit Actions...
and add an action to open in your editor. For example, if you use VS Code, add an action with the following values:- Title: Open in VS Code
- Action: Run Command...
- Parameter:
/usr/local/bin/code -r -g "\1":\2
- You are using Python on macOS M1 (or M2, etc) and are trying to install a Python library which uses a native library.
- You install the Python library (e.g. using
pip
) and the native library (using Homebrew). - You get an error saying that the native library cannot be located even though it's installed using Homebrew.
Example: You are trying to use e.g. pyfluidsynth
. You've installed pyfluidsynth
with pip, and also ran brew install fluidsynth
. However, import fluidsynth
still gives an error:
ImportError: Couldn't find the FluidSynth library.