Skip to content

Commit ff229ec

Browse files
committed
Update README
1 parent 9f12227 commit ff229ec

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@ the `Math.sin` in Ruby:
6161
Type conversions from Ruby to Python are automatically performed for numeric,
6262
boolean, string, arrays, and hashes.
6363

64+
### Specifying the Python version
65+
66+
If you want to use a specific version of Python instead of the default,
67+
you can change the Python version by setting the `PYTHON` environment variable
68+
to the path of the `python` executable.
69+
70+
When `PYTHON` is not specified, pycall.rb tries to use `python3` first,
71+
and then tries to use `python`.
72+
6473
### Releasing the RubyVM GVL during Python function calls
6574

6675
You may want to release the RubyVM GVL when you call a Python function that takes very long runtime.
@@ -119,13 +128,7 @@ variable `@__pyptr__`. `PyCall::PyObjectWrapper` assumes the existance of
119128
system and Python object system. For example, `PyCall::PyObjectWrapper`
120129
translates Ruby's coerce system into Python's swapped operation protocol.
121130

122-
### Specifying the Python version
123-
124-
If you want to use a specific version of Python instead of the default,
125-
you can change the Python version by setting the `PYTHON` environment variable
126-
to the path of the `python` executable.
127-
128-
### Deploying on Heroku
131+
## Deploying on Heroku
129132

130133
Heroku's default version of Python is not compiled with the `--enabled-shared`
131134
option and can't be accessed by PyCall. Alternative [buildpacks](https://devcenter.heroku.com/articles/buildpacks) are available,

0 commit comments

Comments
 (0)