Skip to content

Commit fe029af

Browse files
authored
Merge pull request heroku#785 from heroku/update-readme
Update readme
2 parents dd8fe58 + a979d57 commit fe029af

File tree

1 file changed

+41
-38
lines changed

1 file changed

+41
-38
lines changed

README.md

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,62 +4,65 @@
44

55
[![Build Status](https://travis-ci.org/heroku/heroku-buildpack-python.svg?branch=master)](https://travis-ci.org/heroku/heroku-buildpack-python)
66

7-
This is the official [Heroku buildpack](https://devcenter.heroku.com/articles/buildpacks) for Python apps, powered by [Pipenv](http://docs.pipenv.org/), [pip](https://pip.pypa.io/) and other excellent software.
7+
This is the official [Heroku buildpack](https://devcenter.heroku.com/articles/buildpacks) for Python apps.
88

9-
Recommended web frameworks include **Django** and **Flask**. The recommended webserver is **Gunicorn**. There are no restrictions around what software can be used (as long as it's pip-installable). Web processes must bind to `$PORT`, and only the HTTP protocol is permitted for incoming connections.
9+
Recommended web frameworks include **Django** and **Flask**, among others. The recommended webserver is **Gunicorn**. There are no restrictions around what software can be used (as long as it's pip-installable). Web processes must bind to `$PORT`, and only the HTTP protocol is permitted for incoming connections.
1010

11-
Python packages with C dependencies that are not [available on the stack image](https://devcenter.heroku.com/articles/stack-packages) are generally not supported, unless `manylinux` wheels are provided by the package maintainers (common). For recommended solutions, check out [this article](https://devcenter.heroku.com/articles/python-c-deps) for more information.
11+
Python packages with C dependencies that are not [available on the stack image](https://devcenter.heroku.com/articles/stack-packages) are generally not supported, unless `manylinux` wheels are provided by the package maintainers (common). For recommended solutions, check out [this article](https://devcenter.heroku.com/articles/python-c-deps) for more information.
1212

1313
See it in Action
1414
----------------
15+
```
16+
$ ls
17+
my-application requirements.txt runtime.txt
18+
19+
$ git push heroku master
20+
Counting objects: 4, done.
21+
Delta compression using up to 8 threads.
22+
Compressing objects: 100% (2/2), done.
23+
Writing objects: 100% (4/4), 276 bytes | 276.00 KiB/s, done.
24+
Total 4 (delta 0), reused 0 (delta 0)
25+
remote: Compressing source files... done.
26+
remote: Building source:
27+
remote:
28+
remote: -----> Python app detected
29+
remote: -----> Installing python-3.7.1
30+
remote: -----> Installing pip
31+
remote: -----> Installing SQLite3
32+
remote: -----> Installing requirements with pip
33+
remote: Collecting flask (from -r /tmp/build_c2c067ef79ff14c9bf1aed6796f9ed1f/requirements.txt (line 1))
34+
remote: Downloading ...
35+
remote: Installing collected packages: Werkzeug, click, MarkupSafe, Jinja2, itsdangerous, flask
36+
remote: Successfully installed Jinja2-2.10 MarkupSafe-1.1.0 Werkzeug-0.14.1 click-7.0 flask-1.0.2 itsdangerous-1.1.0
37+
remote:
38+
remote: -----> Discovering process types
39+
remote: Procfile declares types -> (none)
40+
remote:
41+
```
1542

16-
Deploying a Python application couldn't be easier:
43+
A `requirements.txt` must be present at the root of your application's repository to deploy.
1744

18-
$ ls
19-
Pipfile Pipfile.lock Procfile web.py
45+
To specify your python version, you also need a `runtime.txt` file - unless you are using the default Python runtime version.
2046

21-
$ heroku create --buildpack heroku/python
47+
Current default Python Runtime: Python 3.6.7
2248

23-
$ git push heroku master
24-
25-
-----> Python app detected
26-
-----> Installing python-3.6.6
27-
-----> Installing pip
28-
-----> Installing requirements with Pipenv 2018.5.18…
29-
...
30-
Installing dependencies from Pipfile…
31-
-----> Discovering process types
32-
Procfile declares types -> (none)
49+
Alternatively, you can provide a `setup.py` file, or a `Pipfile`. Using `Pipenv` will generate `runtime.txt` based on `python-version` at build time.
3350

34-
A `Pipfile` or `requirements.txt` must be present at the root of your application's repository.
51+
Specify a Buildpack Version
52+
---------------------------
3553

36-
You can also specify the latest production release of this buildpack for upcoming builds of an existing application:
54+
You can specify the latest production release of this buildpack for upcoming builds of an existing application:
3755

3856
$ heroku buildpacks:set heroku/python
3957

4058

4159
Specify a Python Runtime
4260
------------------------
4361

44-
Specific versions of the Python runtime can be specified in your `Pipfile`:
45-
46-
[requires]
47-
python_version = "2.7"
48-
49-
Or, more specifically:
50-
51-
[requires]
52-
python_full_version = "2.7.15"
53-
54-
Or, with a `runtime.txt` file:
55-
56-
$ cat runtime.txt
57-
python-2.7.15
58-
59-
Runtime options include:
62+
Supported runtime options include:
6063

61-
- `python-3.7.0`
62-
- `python-3.6.6`
64+
- `python-3.7.1`
65+
- `python-3.6.7`
6366
- `python-2.7.15`
6467

6568
## Tests
@@ -82,4 +85,4 @@ make test-heroku-16
8285

8386
The tests are run via the vendored
8487
[shunit2](https://github.com/kward/shunit2)
85-
test framework.
88+
test framework.

0 commit comments

Comments
 (0)