Compare commits

...

141 Commits

Author SHA1 Message Date
kennethreitz a41ddf6bd1 skip set if no path-links are found 2016-12-19 16:48:30 -05:00
kennethreitz 197b7bae3f Merge branch 'egg-links' 2016-12-19 16:45:16 -05:00
kennethreitz f468739cfb v89 2016-12-19 16:45:04 -05:00
kennethreitz 555d5bd2be cp the cache 2016-12-19 16:42:33 -05:00
kennethreitz 0a4d32c8a5 cache src 2016-12-19 16:39:34 -05:00
kennethreitz 1a1cedfc21 symlink eggs 2016-12-19 16:37:03 -05:00
kennethreitz d35ee2c14c Squashed commit of the following:
commit 554a8bbae6
Author: Kenneth Reitz <me@kennethreitz.org>
Date:   Mon Dec 19 16:26:18 2016 -0500

    comment out debugging line

commit 6572ad3d44
Author: Kenneth Reitz <me@kennethreitz.org>
Date:   Mon Dec 19 16:21:03 2016 -0500

    test

commit 35cabaeebc
Author: Kenneth Reitz <me@kennethreitz.org>
Date:   Mon Dec 19 16:09:21 2016 -0500

    try .

commit 300285a92d
Author: Kenneth Reitz <me@kennethreitz.org>
Date:   Mon Dec 19 16:05:22 2016 -0500

    find

commit 7a6f1eb010
Author: Kenneth Reitz <me@kennethreitz.org>
Date:   Mon Dec 19 16:02:24 2016 -0500

    find

commit 66d754978e
Author: Kenneth Reitz <me@kennethreitz.org>
Date:   Mon Dec 19 15:55:04 2016 -0500

    fix xargs

commit 9c222a9350
Author: Kenneth Reitz <me@kennethreitz.org>
Date:   Mon Dec 19 15:53:04 2016 -0500

    copy src

commit 7f4273f47f
Author: Kenneth Reitz <me@kennethreitz.org>
Date:   Mon Dec 19 15:45:20 2016 -0500

    new replace script

commit dd707c21e3
Author: Kenneth Reitz <me@kennethreitz.org>
Date:   Mon Dec 19 15:40:35 2016 -0500

    re-write egg-links
2016-12-19 16:31:29 -05:00
kennethreitz 554a8bbae6 comment out debugging line 2016-12-19 16:26:18 -05:00
kennethreitz 6572ad3d44 test 2016-12-19 16:21:03 -05:00
kennethreitz 35cabaeebc try . 2016-12-19 16:09:21 -05:00
kennethreitz 300285a92d find 2016-12-19 16:05:22 -05:00
kennethreitz 7a6f1eb010 find 2016-12-19 16:02:24 -05:00
kennethreitz 66d754978e fix xargs 2016-12-19 15:55:04 -05:00
kennethreitz 9c222a9350 copy src 2016-12-19 15:53:04 -05:00
kennethreitz 7f4273f47f new replace script 2016-12-19 15:45:20 -05:00
kennethreitz dd707c21e3 re-write egg-links 2016-12-19 15:40:35 -05:00
kennethreitz 7833743f96 don't change to /app 2016-12-19 15:19:32 -05:00
kennethreitz 5a9155e311 build dir for pip 2016-12-19 15:04:57 -05:00
kennethreitz 857c47ad66 /app for pip 2016-12-19 15:02:14 -05:00
kennethreitz 87cf6073dc add note about /app/.heroku/src 2016-12-18 13:58:22 -05:00
kennethreitz 36dd089808 cleanup indentation 2016-12-18 13:57:30 -05:00
kennethreitz c58f52e06e remove purging of old virtualenvs
since old stacks aren't supported
2016-12-18 13:56:16 -05:00
kennethreitz 265a95d3b6 v88 2016-12-18 13:53:09 -05:00
kennethreitz 290c1377fb Revert "see if symlink works now"
This reverts commit 8e42040d01.
2016-12-18 13:51:03 -05:00
kennethreitz 8e42040d01 see if symlink works now 2016-12-18 13:48:48 -05:00
kennethreitz d8755e6791 be specific in pip install directory 2016-12-18 13:44:10 -05:00
kennethreitz 364a1fafd9 -e fixings 2016-12-18 13:31:22 -05:00
kennethreitz 251b7f7960 copy the -e directory instead of symlinking 2016-12-18 13:26:47 -05:00
kennethreitz 6d491f9f2b fix for -e 2016-12-18 13:16:49 -05:00
kennethreitz 7cfbce82fd remove bunk autoconf 2016-12-17 21:15:28 -05:00
kennethreitz d520ca4291 new pypys 2016-12-17 19:21:39 -05:00
kennethreitz bf252422fc attempted fix for pypy 2016-12-17 19:12:18 -05:00
kennethreitz d7874d583b move v87 notes 2016-12-17 18:59:44 -05:00
kennethreitz d32dc82e1c v87 2016-12-17 18:58:58 -05:00
kennethreitz bd048d50b5 update default python to 2.7.13 2016-12-17 18:58:51 -05:00
kennethreitz 26b2eeee20 update setuptools to v31.1.0 2016-12-17 18:58:32 -05:00
kennethreitz e527457ba3 Merge branch 'master' of heroku.com:python-builder-cedar-14 2016-12-17 18:48:19 -05:00
kennethreitz 1b7bd02bf2 Merge branch 'master' into docker-builds 2016-12-16 20:25:00 -05:00
kennethreitz de9b0b9383 v86 2016-12-16 20:24:07 -05:00
David Zülke 991f4126d7 Greatly simplify code copying (#340)
* drop duplicate mkdir for .heroku

* simplify linking and moving of python and source

* steps/python needs its own symlink setup

* fix symlink destinations for vendor and venv

* always symlink python
2016-12-16 17:13:57 -08:00
kennethreitz 076a457ad9 changes 2016-12-16 11:08:49 -05:00
kennethreitz 264f74d159 skip binaries for heroku-16 2016-12-15 16:10:37 -05:00
kennethreitz 9f89c4e744 bob-builder==0.0.5 2016-12-15 13:52:53 -05:00
kennethreitz 8d2788094b python-2.7.13 with UCS-4 2016-12-15 13:20:51 -05:00
kennethreitz e2f4fd442a dockerfile for bob-builder 2016-12-14 16:00:32 -05:00
kennethreitz 1bccc03b30 Update CHANGELOG.md 2016-11-18 15:45:17 -05:00
kennethreitz adac27fa9c Merge pull request #334 from cclauss/patch-3
Upgrade to pip-9.0.1 and setuptools-28.8.0
2016-11-15 09:39:41 -05:00
kennethreitz d1c30fd24b updated pip and setuptools 2016-11-15 09:39:29 -05:00
kennethreitz a1cfa41cb2 Merge pull request #328 from joshfriend/pypy-5.4
Add PyPy2 v5.6.0
2016-11-14 14:26:48 -05:00
cclauss 57e9bb0054 Upgrade to pip-9.0.1 and setuptools-28.8.0
This would REQUIRE that the latest versions are placed into:
https://github.com/heroku/heroku-buildpack-python/tree/master/vendor

https://pypi.python.org/pypi/pip
https://pypi.python.org/pypi/setuptools
2016-11-13 10:48:32 +01:00
Josh Friend 8e34179b1c Fix pypy2 v5.3.1 download url 2016-11-12 15:45:28 -05:00
Josh Friend c03cb26961 Add pypy2 v5.4.1 2016-11-12 15:45:28 -05:00
kennethreitz 127ff904d6 update changelog 2016-11-08 19:18:05 -05:00
kennethreitz 6c53bd1cd6 fix typo 2016-11-08 13:10:00 -05:00
kennethreitz d8307c29ba fix for requirements.txt 2016-11-02 14:24:20 -04:00
kennethreitz f526673903 no debug statement 2016-11-02 14:08:28 -04:00
kennethreitz 85f10b7d59 Merge branch 'ci' 2016-11-02 14:08:04 -04:00
kennethreitz bbbadc83e4 is /app 2016-11-02 14:06:50 -04:00
kennethreitz 9c2b033042 proper debug 2016-11-02 14:04:39 -04:00
kennethreitz e427d5111e debug 2016-11-02 14:00:07 -04:00
kennethreitz ab724138c1 another approach 2016-11-02 13:59:33 -04:00
kennethreitz e36b580615 Merge remote-tracking branch 'origin/master' 2016-11-02 13:54:53 -04:00
kennethreitz f8a1761165 export path fix 2016-11-02 11:20:09 -04:00
kennethreitz 521bb00247 export functionality 2016-11-01 13:18:53 -04:00
kennethreitz 5cd4245412 Skip copying the code if we're already in the right spot 2016-11-01 12:45:27 -04:00
kennethreitz 40daa84ccc syntax sugar and test-requirements.txt 2016-11-01 12:41:17 -04:00
kennethreitz f0ea766900 basic test-compile script 2016-11-01 12:35:25 -04:00
kennethreitz 89125df805 remove deprecated test script 2016-11-01 12:33:55 -04:00
kennethreitz 83ee7d90d7 update python3 2016-10-26 13:51:31 -04:00
kennethreitz bb87f5ed56 remove deprecated runtimes 2016-10-26 13:51:21 -04:00
kennethreitz 424e1c351d Merge branch 'master' of https://git.staging.herokudev.com/python-builder-cedar-16 2016-10-26 13:46:35 -04:00
kennethreitz 83bde7ccea Update README.md 2016-10-26 13:46:10 -04:00
kennethreitz 7fab8ce2c2 Update README.md 2016-10-26 13:44:50 -04:00
kennethreitz d4326fad0f Update README.md 2016-10-26 13:31:33 -04:00
kennethreitz a0d4da00e6 update pypy 2016-10-26 13:16:25 -04:00
kennethreitz f72c34a5dd Merge branch 'master' of https://git.staging.herokudev.com/python-builder-cedar-16 2016-10-26 12:29:59 -04:00
kennethreitz 2bc41d20b8 dummy change 2016-10-26 12:27:46 -04:00
kennethreitz 3cce589cec newline 2016-10-05 14:49:57 -04:00
kennethreitz 70758edd49 dummy procfile entry 2016-09-28 14:51:59 -04:00
kennethreitz ba7a9cd565 Update CHANGELOG.md 2016-09-16 14:23:20 -04:00
kennethreitz 37a7afbe2d Merge pull request #329 from jambonrose/add-argon2-to-cryptography-step
Add argon2 to crypotgraphy step
2016-09-16 14:22:36 -04:00
Andrew Pinkham b0138c26e6 Add argon2 to crypotgraphy step
- Add argon2-cffi
- Add django[argon2] option from Django docs:
  https://docs.djangoproject.com/en/1.10/topics/auth/passwords/#argon2-usage
2016-09-16 10:57:09 -04:00
kennethreitz d653377faf fix history 2016-08-24 16:11:23 -04:00
kennethreitz 0b87419166 changelog entry 2016-08-19 09:02:59 -04:00
kennethreitz d832b7425e update pypy formula 2016-08-19 09:02:59 -04:00
kennethreitz 2991dce623 pypi workaround 2016-08-19 09:02:59 -04:00
kennethreitz 28b67dd208 update pypy formula 2016-08-19 08:57:19 -04:00
kennethreitz 24f73fbc2d pypi workaround 2016-08-19 08:54:24 -04:00
Troels Thomsen ffd0bb57ee Revert "Merge branch 'apt'"
This reverts commit 75870dd412, reversing
changes made to 0cf2e2849d.
2016-08-17 11:19:11 +02:00
kennethreitz 75870dd412 Merge branch 'apt' 2016-08-17 02:07:01 -04:00
kennethreitz 831d73e302 cleanup debugging 2016-08-17 02:06:36 -04:00
kennethreitz 0cf2e2849d updated setuptools vendor 2016-08-17 02:01:39 -04:00
kennethreitz 6ba8d47927 Merge pull request #323 from cclauss/patch-2
Update setuptools
2016-08-17 02:01:16 -04:00
kennethreitz af940b5390 v81 2016-08-17 02:00:49 -04:00
kennethreitz 819bc2da5b Merge pull request #326 from tvuotila/hotfix/preserve-environment-variables
Preserve environment variables
2016-08-17 01:59:55 -04:00
Tero Vuotila 2dad2e73f3 Preserve environment variables
Preserve LIBRARY_PATH and LD_LIBRARY_PATH.
Related heroku/heroku-buildpack-python#287
2016-08-16 10:34:49 +03:00
cclauss e550b32ea8 setuptools v25.2.0 2016-08-13 09:28:17 +02:00
cclauss 6af8d81086 Update setuptools
Update setuptools from 23.x.x to 25.x.x.
2016-08-09 18:42:46 +02:00
kennethreitz 0ed4089cb9 Merge pull request #308 from edmorley/fix-pip8-support
Switch pip-pop back to using pip 8
2016-08-02 20:54:16 -04:00
kennethreitz f09191ec8b Merge pull request #319 from edmorley/library-vendoring-cleanup
Fixes to the library vendoring's 'already exists' checks
2016-08-02 20:04:28 -04:00
Ed Morley aef7b65b95 Don't skip the geo-libs vendoring step if only gdalserver present
Since if someone previously had `GDAL` in their requirements file, they
would already have the gdalserver binary present from `bin/steps/gdal`
but be missing the proj and geos vendor files. By checking for `proj`
instead, we ensure that the vendoring isn't incorrectly skipped in this
case.
2016-08-02 14:28:24 +01:00
Ed Morley 5438aab121 Make libffi vendoring check for existing directory in correct location
For both the cedar and cedar-14 stacks, the libffi directory is named
`libffi-3.1` not `libffi-3.1.1`, so the existing library wouldn't be
detected, causing it to be re-downloaded during every compile.
2016-08-02 14:28:19 +01:00
Ed Morley a259143c0b Avoid repetition of vendor library environment variable setting
Since we need to set it regardless of whether the vendored library
existed previously or not.
2016-08-02 14:13:20 +01:00
Ed Morley 0896d6a0c4 Fix files without blank newline 2016-08-02 14:12:31 +01:00
Ed Morley 39f2efe296 Remove vendored pip since pip-pop is now compatible with pip v8
This means pip-pop will use the buildpack-installed pip 8, which doesn't
fail when encountering requirements files that use the new hash syntax.

Fixes #302.
2016-07-11 10:48:49 +01:00
Ed Morley d047f26ad4 Import upstream pip-pop fix for pip 8 support
Is the fix from kennethreitz/pip-pop#12.
2016-07-11 10:48:49 +01:00
kennethreitz 998f996a32 proper setuptools version 2016-06-28 14:44:45 -04:00
kennethreitz c620980e5a Merge pull request #313 from cclauss/Python-3.5.2
Add Python 2.7.12, Python 3.5.2, Pypy 5.3.1, Pip 8.1.2, Setuptools 23.1.0 and remove release candidate
2016-06-28 14:43:10 -04:00
cclauss 2983fcfbea Update README.md to current versions of Python 2, Python 3, Pypy, and Requests 2016-06-28 11:27:53 +02:00
cclauss e3511e7202 Update and rename pypy-5.3.0 to pypy-5.3.1 2016-06-28 11:17:37 +02:00
cclauss 692f040618 Update default Python plus Pip and Setuptools
* $ curl
https://pypi.python.org/packages/e7/a8/7556133689add8d1a54c0b14aeff0acb0
3c64707ce100ecd53934da1aa13/pip-8.1.2.tar.gz -o pip-8.1.2.tar.gz
* $ curl
https://pypi.python.org/packages/9f/7c/0a33c528164f1b7ff8cf0684cf88c2e73
3c8ae0119ceca4a3955c7fc059d/setuptools-23.1.0.tar.gz -o
setuptools-23.1.0.tar.gz
* $ ls
* $ rm pip-8.1.1.tar.gz
* $ rm setuptools-20.4.tar.gz
2016-06-28 10:56:09 +02:00
cclauss 8645a965aa Add Python 2.7.12 and remove the release candidate 2016-06-28 09:07:38 +02:00
cclauss 3a483865e8 Python 3.5.2
https://www.python.org/downloads/release/python-352/
2016-06-27 06:36:44 +02:00
kennethreitz 6ea6a0ccaf debug 2016-06-24 15:51:28 -04:00
kennethreitz 6bc94eaf6e dont unset library path 2016-06-24 15:46:27 -04:00
kennethreitz 49e409cb64 try soft links 2016-06-24 15:42:55 -04:00
kennethreitz 2693de45c7 attempt to ln 2016-06-24 15:40:57 -04:00
kennethreitz 88f711b6e7 before sanitization 2016-06-24 15:24:31 -04:00
kennethreitz a7976fc177 Merge remote-tracking branch 'origin/master' 2016-06-24 15:18:09 -04:00
cclauss 8a837a23e7 Back to rc11 2016-06-20 23:56:41 +02:00
cclauss f37597ad9d Runtimes: Added pypy-5.3.0, mv python-2.7.11rc1 python-2.7.12rc1
Runtimes:
* Added pypy-5.3.0
* Moved python-2.7.11rc1 to python-2.7.12rc1
2016-06-16 19:32:22 +02:00
kennethreitz 928a664544 yes 2016-06-15 04:35:28 -04:00
kennethreitz 9fb715ef1c no 2016-06-15 04:33:01 -04:00
kennethreitz 3cff2e39fe Merge pull request #298 from whit537/preen-pip-grep
clean up pip-grep in the `not silent` case
2016-06-10 12:58:57 -07:00
kennethreitz 653a5be104 Merge pull request #297 from whit537/comment
remove Pylibmc reference in cryptography comment
2016-06-10 12:56:34 -07:00
kennethreitz 67ade52e95 Merge pull request #304 from tt/use-travis
Use Travis
2016-06-10 12:40:27 -07:00
Troels Thomsen ab3e365ff6 Show build status in readme 2016-05-25 10:37:34 +02:00
Troels Thomsen 902672e934 Add Travis configuration 2016-05-25 10:37:25 +02:00
Troels Thomsen 6207b3506b Rename readme file 2016-05-25 10:37:03 +02:00
kennethreitz 5446d448fd Merge pull request #301 from alex/patch-1
Added another package that relies on cffi
2016-05-13 13:25:49 -04:00
Alex Gaynor 366def6c16 Added another package that relies on cffi 2016-05-13 13:17:03 -04:00
Chad Whitacre a84fc7a248 clean up pip-pop in the not silent case
The extraneous `format` call is harmless in itself, but it's possible for `requirement.req` to be `None` here, which results in `AttributeError: 'NoneType' object has no attribute 'project_name'`.
2016-05-10 07:31:25 -04:00
Chad Whitacre e4aa40216b remove Pylibmc reference in cryptography comment 2016-05-10 07:12:55 -04:00
kennethreitz 87d03e62d7 Merge branch 'master' of heroku.com:python-builder-cedar-14 2016-05-05 16:32:09 -04:00
kennethreitz 92b4f5e8aa pypy v5.1.0 v5.1.1 2016-05-05 16:31:25 -04:00
kennethreitz 19cd447b83 Merge pull request #296 from edmorley/libffi-PyNaCl
Add PyNaCl to the list of packages that trigger libffi bootstrapping
2016-04-21 16:26:03 -04:00
Ed Morley 570182b6b7 Add PyNaCl to the list of packages that trigger libffi bootstrapping
To reduce confusion for users who have not explicitly listed cffi as a
dependency.

Fixes #142.
2016-04-21 10:37:45 +01:00
kennethreitz 0a6ed0de43 v80 2016-04-05 17:10:49 -04:00
kennethreitz 0b7a1fc14e use older pip for pip-pop 2016-03-31 18:08:49 -04:00
kennethreitz 2c69e3b98f setuptools v20.4 2016-03-30 18:20:04 -04:00
kennethreitz 4c9de740d2 chmod +x (grr) 2016-03-22 19:26:58 -04:00
102 changed files with 206 additions and 1451 deletions
+2
View File
@@ -0,0 +1,2 @@
sudo: false
script: exit 0
+53
View File
@@ -1,5 +1,58 @@
# Python Buildpack Changelog # Python Buildpack Changelog
## v89
Improved cache functionality and fix egg-links regression.
## v88
Fixed bug with editable pip installations.
## v87
Updated default Python 2.7.13.
- Python 2.7.13 uses UCS-4 build, more compatibile with linux wheels.
- Updated setuptools to v32.1.0.
## v86
Refactor and multi-buildpack compatibility.
## v85
Packaging fix.
## v84
Updated pip and setuptools.
- Updated pip to v9.0.1.
- Updated setuptools to v28.8.0.
## v83
Support for Heroku CI.
- Cffi support for argon2
## v82 (2016-08-22)
Update to library detection mechnisms (pip-pop).
- Updated setuptools to v25.5.0
## v81 (2016-06-28)
Updated default Python to 2.7.11.
- Updated pip to v8.1.2.
- Updated setuptools to v23.1.0.
## v80 (2016-04-05)
Improved pip-pop compatibility with latest pip releases.
## v79 (2016-03-22) ## v79 (2016-03-22)
Compatibility improvements with heroku-apt-buildpack. Compatibility improvements with heroku-apt-buildpack.
+11
View File
@@ -0,0 +1,11 @@
FROM heroku/heroku:16-build
WORKDIR /app
ENV WORKSPACE_DIR=/app/builds
RUN apt-get update && apt-get install -y python-pip
# Install bob-builder application
RUN pip install bob-builder==0.0.5
COPY . /app
+10 -10
View File
@@ -1,6 +1,7 @@
# Heroku Buildpack: Python
![python](https://cloud.githubusercontent.com/assets/51578/13712821/b68a42ce-e793-11e5-96b0-d8eb978137ba.png) ![python](https://cloud.githubusercontent.com/assets/51578/13712821/b68a42ce-e793-11e5-96b0-d8eb978137ba.png)
# Heroku Buildpack: Python
This is the official [Heroku buildpack](https://devcenter.heroku.com/articles/buildpacks) for Python apps, powered by [pip](https://pip.pypa.io/) and other excellent software. This is the official [Heroku buildpack](https://devcenter.heroku.com/articles/buildpacks) for Python apps, powered by [pip](https://pip.pypa.io/) and other excellent software.
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. 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.
@@ -20,12 +21,12 @@ Deploying a Python application couldn't be easier:
$ git push heroku master $ git push heroku master
... ...
-----> Python app detected -----> Python app detected
-----> Installing python-2.7.11 -----> Installing python-2.7.12
$ pip install -r requirements.txt $ pip install -r requirements.txt
Collecting requests (from -r requirements.txt (line 1)) Collecting requests (from -r requirements.txt (line 1))
Downloading requests-2.9.1-py2.py3-none-any.whl (501kB) Downloading requests-2.10.0-py2.py3-none-any.whl (501kB)
Installing collected packages: requests Installing collected packages: requests
Successfully installed requests-2.9.1 Successfully installed requests-2.10.0
-----> Discovering process types -----> Discovering process types
Procfile declares types -> (none) Procfile declares types -> (none)
@@ -43,12 +44,11 @@ Specify a Python Runtime
Specific versions of the Python runtime can be specified with a `runtime.txt` file: Specific versions of the Python runtime can be specified with a `runtime.txt` file:
$ cat runtime.txt $ cat runtime.txt
python-3.5.1 python-3.5.2
Runtime options include: Runtime options include:
- `python-2.7.11` - `python-2.7.12`
- `python-3.5.1` - `python-3.5.2`
- `pypy-5.0.1` (unsupported, experimental) - `pypy-5.3.1` (unsupported, experimental)
- `pypy3-2.4.0` (unsupported, experimental)
Other [unsupported runtimes](https://github.com/heroku/heroku-buildpack-python/tree/master/builds/runtimes) are available as well. Use at your own risk.
+47 -75
View File
@@ -27,15 +27,14 @@ BUILD_DIR=$1
CACHE_DIR=$2 CACHE_DIR=$2
ENV_DIR=$3 ENV_DIR=$3
# Static configurations for virtualenv caches. # Export path environment variables for sub-scripts.
VIRTUALENV_LOC=".heroku/venv" export BIN_DIR ROOT_DIR BUILD_DIR CACHE_DIR ENV_DIR
LEGACY_TRIGGER="lib/python2.7"
DEFAULT_PYTHON_VERSION="python-2.7.11" DEFAULT_PYTHON_VERSION="python-2.7.13"
DEFAULT_PYTHON_STACK="cedar-14" DEFAULT_PYTHON_STACK="cedar-14"
PYTHON_EXE="/app/.heroku/python/bin/python" PYTHON_EXE="/app/.heroku/python/bin/python"
PIP_VERSION="8.1.1" PIP_VERSION="9.0.1"
SETUPTOOLS_VERSION="20.3" SETUPTOOLS_VERSION="32.1.0"
# Common Problem Warnings # Common Problem Warnings
export WARNINGS_LOG=$(mktemp) export WARNINGS_LOG=$(mktemp)
@@ -56,14 +55,13 @@ export PATH=$PATH:$ROOT_DIR/vendor/pip-pop
[ ! "$STACK" ] && STACK=$DEFAULT_PYTHON_STACK [ ! "$STACK" ] && STACK=$DEFAULT_PYTHON_STACK
# Sanitizing environment variables. # Sanitizing environment variables.
unset GIT_DIR PYTHONHOME PYTHONPATH LD_LIBRARY_PATH LIBRARY_PATH unset GIT_DIR PYTHONHOME PYTHONPATH
unset RECEIVE_DATA RUN_KEY BUILD_INFO DEPLOY LOG_TOKEN DYNO unset RECEIVE_DATA RUN_KEY BUILD_INFO DEPLOY LOG_TOKEN DYNO
unset CYTOKINE_LOG_FILE GEM_PATH unset CYTOKINE_LOG_FILE GEM_PATH
# Setup buildpack instrumentation. # Setup buildpack instrumentation.
bpwatch init $LOGPLEX_KEY bpwatch init $LOGPLEX_KEY
bpwatch build python $BUILDPACK_VERSION $REQUEST_ID bpwatch build python $BUILDPACK_VERSION $REQUEST_ID
TMP_APP_DIR=$CACHE_DIR/tmp_app_dir
bpwatch start compile bpwatch start compile
@@ -73,50 +71,26 @@ source $BIN_DIR/utils
# Import collection of warnings. # Import collection of warnings.
source $BIN_DIR/warnings source $BIN_DIR/warnings
# Directory Hacks for path consistency. # we need to put a bunch of symlinks in there later
APP_DIR='/app' mkdir -p /app/.heroku
TMP_APP_DIR=$CACHE_DIR/tmp_app_dir
# Skip these steps for Docker.
if [[ ! "$DOCKER_BUILD" ]]; then
# Copy Anvil app dir to temporary storage...
bpwatch start anvil_appdir_stage
if [ "$SLUG_ID" ]; then
mkdir -p $TMP_APP_DIR
deep-mv $APP_DIR $TMP_APP_DIR
else
deep-rm $APP_DIR
fi
bpwatch stop anvil_appdir_stage
# Copy Application code in.
bpwatch start appdir_stage
deep-cp $BUILD_DIR $APP_DIR
bpwatch stop appdir_stage
fi
# Set new context.
ORIG_BUILD_DIR=$BUILD_DIR
BUILD_DIR=$APP_DIR
# Set up outputs under new context # Set up outputs under new context
PROFILE_PATH="$BUILD_DIR/.profile.d/python.sh" PROFILE_PATH="$BUILD_DIR/.profile.d/python.sh"
EXPORT_PATH="$BIN_DIR/../export"
GUNICORN_PROFILE_PATH="$BUILD_DIR/.profile.d/python.gunicorn.sh" GUNICORN_PROFILE_PATH="$BUILD_DIR/.profile.d/python.gunicorn.sh"
# We'll need to send these statics to other scripts we `source`. # We'll need to send these statics to other scripts we `source`.
export BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH export BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH EXPORT_PATH
# Prepend proper environment variables for Python use. # Prepend proper environment variables for Python use.
export PATH=$BUILD_DIR/.heroku/python/bin:$BUILD_DIR/.heroku/vendor/bin:$PATH export PATH=/app/.heroku/python/bin:/app/.heroku/vendor/bin:$PATH
export PYTHONUNBUFFERED=1 export PYTHONUNBUFFERED=1
export LANG=en_US.UTF-8 export LANG=en_US.UTF-8
export C_INCLUDE_PATH=/app/.heroku/vendor/include:$BUILD_DIR/.heroku/vendor/include:/app/.heroku/python/include:$C_INCLUDE_PATH export C_INCLUDE_PATH=/app/.heroku/vendor/include:/app/.heroku/python/include:$C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=/app/.heroku/vendor/include:$BUILD_DIR/.heroku/vendor/include:/app/.heroku/python/include:$CPLUS_INCLUDE_PATH export CPLUS_INCLUDE_PATH=/app/.heroku/vendor/include:/app/.heroku/python/include:$CPLUS_INCLUDE_PATH
export LIBRARY_PATH=/app/.heroku/vendor/lib:$BUILD_DIR/.heroku/vendor/lib:/app/.heroku/python/lib:$LIBRARY_PATH export LIBRARY_PATH=/app/.heroku/vendor/lib:/app/.heroku/python/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=/app/.heroku/vendor/lib:$BUILD_DIR/.heroku/vendor/lib:/app/.heroku/python/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/app/.heroku/vendor/lib:/app/.heroku/python/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/app/.heroku/vendor/lib/pkg-config:$BUILD_DIR/.heroku/vendor/lib/pkg-config:/app/.heroku/python/lib/pkg-config:$PKG_CONFIG_PATH export PKG_CONFIG_PATH=/app/.heroku/vendor/lib/pkg-config:/app/.heroku/python/lib/pkg-config:$PKG_CONFIG_PATH
# Switch to the repo's context. # Switch to the repo's context.
cd $BUILD_DIR cd $BUILD_DIR
@@ -158,31 +132,37 @@ fi
# Prepare the cache. # Prepare the cache.
mkdir -p $CACHE_DIR mkdir -p $CACHE_DIR
# Purge "old-style" virtualenvs.
bpwatch start clear_old_venvs
[ -d $CACHE_DIR/$LEGACY_TRIGGER ] && rm -fr $CACHE_DIR/.heroku/bin $CACHE_DIR/.heroku/lib $CACHE_DIR/.heroku/include
[ -d $CACHE_DIR/$VIRTUALENV_LOC ] && rm -fr $CACHE_DIR/.heroku/venv $CACHE_DIR/.heroku/src
bpwatch stop clear_old_venvs
# Restore old artifacts from the cache. # Restore old artifacts from the cache.
bpwatch start restore_cache bpwatch start restore_cache
mkdir -p .heroku mkdir -p .heroku
cp -R $CACHE_DIR/.heroku/python .heroku/ &> /dev/null || true
cp -R $CACHE_DIR/.heroku/python-stack .heroku/ &> /dev/null || true
cp -R $CACHE_DIR/.heroku/python-version .heroku/ &> /dev/null || true
cp -R $CACHE_DIR/.heroku/vendor .heroku/ &> /dev/null || true
cp -R $CACHE_DIR/.heroku/venv .heroku/ &> /dev/null || true
if [[ -d $CACHE_DIR/.heroku/src ]]; then
cp -R $CACHE_DIR/.heroku/src .heroku/ &> /dev/null || true
fi
cp -R $CACHE_DIR/.heroku/python .heroku/ &> /dev/null || true
cp -R $CACHE_DIR/.heroku/python-stack .heroku/ &> /dev/null || true
cp -R $CACHE_DIR/.heroku/python-version .heroku/ &> /dev/null || true
cp -R $CACHE_DIR/.heroku/vendor .heroku/ &> /dev/null || true
cp -R $CACHE_DIR/.heroku/venv .heroku/ &> /dev/null || true
bpwatch stop restore_cache bpwatch stop restore_cache
set +e
# Create set-aside `.heroku` folder.
mkdir .heroku &> /dev/null
set -e
mkdir -p $(dirname $PROFILE_PATH) mkdir -p $(dirname $PROFILE_PATH)
# Make the directory for -e pip installations.
mkdir -p /app/.heroku/src
if [[ $BUILD_DIR != '/app' ]]; then
# python expects to reside in /app, so set up symlinks
# we will not remove these later so subsequent buildpacks can still invoke it
ln -s $BUILD_DIR/.heroku/python /app/.heroku/python
ln -s $BUILD_DIR/.heroku/vendor /app/.heroku/vendor
ln -s $BUILD_DIR/.heroku/venv /app/.heroku/venv
# NOTE: /app/.heroku/src also exists, but is copied manually later.
fi
# Install Python. # Install Python.
source $BIN_DIR/steps/python source $BIN_DIR/steps/python
@@ -227,6 +207,11 @@ set-default-env PYTHONPATH /app/
# Install sane-default script for $WEB_CONCURRENCY and $FORWARDED_ALLOW_IPS. # Install sane-default script for $WEB_CONCURRENCY and $FORWARDED_ALLOW_IPS.
cp $ROOT_DIR/vendor/python.gunicorn.sh $GUNICORN_PROFILE_PATH cp $ROOT_DIR/vendor/python.gunicorn.sh $GUNICORN_PROFILE_PATH
# Symlink the directory for -e pip installations
if [[ $BUILD_DIR != '/app' ]]; then
mv /app/.heroku/src $BUILD_DIR/.heroku
ln -s /app/.heroku/src $BUILD_DIR/.heroku/src
fi
# Experimental post_compile hook. # Experimental post_compile hook.
bpwatch start post_compile bpwatch start post_compile
@@ -241,6 +226,7 @@ bpwatch start dump_cache
rm -rf $CACHE_DIR/.heroku/python-stack rm -rf $CACHE_DIR/.heroku/python-stack
rm -rf $CACHE_DIR/.heroku/vendor rm -rf $CACHE_DIR/.heroku/vendor
rm -rf $CACHE_DIR/.heroku/venv rm -rf $CACHE_DIR/.heroku/venv
rm -rf $CACHE_DIR/.heroku/src
mkdir -p $CACHE_DIR/.heroku mkdir -p $CACHE_DIR/.heroku
cp -R .heroku/python $CACHE_DIR/.heroku/ cp -R .heroku/python $CACHE_DIR/.heroku/
@@ -248,23 +234,9 @@ bpwatch start dump_cache
cp -R .heroku/python-stack $CACHE_DIR/.heroku/ &> /dev/null || true cp -R .heroku/python-stack $CACHE_DIR/.heroku/ &> /dev/null || true
cp -R .heroku/vendor $CACHE_DIR/.heroku/ &> /dev/null || true cp -R .heroku/vendor $CACHE_DIR/.heroku/ &> /dev/null || true
cp -R .heroku/venv $CACHE_DIR/.heroku/ &> /dev/null || true cp -R .heroku/venv $CACHE_DIR/.heroku/ &> /dev/null || true
cp -R .heroku/src $CACHE_DIR/.heroku/ &> /dev/null || true
bpwatch stop dump_cache bpwatch stop dump_cache
# Fin. # Fin.
if [[ ! "$DOCKER_BUILD" ]]; then bpwatch stop compile
bpwatch start appdir_commit
deep-rm $ORIG_BUILD_DIR
deep-mv $BUILD_DIR $ORIG_BUILD_DIR
bpwatch stop appdir_commit
bpwatch start anvil_appdir_commit
if [ "$SLUG_ID" ]; then
deep-mv $TMP_APP_DIR $APP_DIR
fi
bpwatch stop anvil_appdir_commit
bpwatch stop compile
fi
+5 -7
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# This script serves as the Pylibmc build step of the # This script serves as the Cryptography build step of the
# [**Python Buildpack**](https://github.com/heroku/heroku-buildpack-python) # [**Python Buildpack**](https://github.com/heroku/heroku-buildpack-python)
# compiler. # compiler.
# #
@@ -20,18 +20,16 @@ source $BIN_DIR/utils
bpwatch start libffi_install bpwatch start libffi_install
# If a package using cffi exists within requirements, use vendored libffi. # If a package using cffi exists within requirements, use vendored libffi.
if (pip-grep -s requirements.txt bcrypt cffi cryptography django[bcrypt] Django[bcrypt] pyOpenSSL PyOpenSSL requests[security] &> /dev/null) then if (pip-grep -s requirements.txt argon2-cffi bcrypt cffi cryptography django[argon2] Django[argon2] django[bcrypt] Django[bcrypt] PyNaCl pyOpenSSL PyOpenSSL requests[security] misaka &> /dev/null) then
if [ -d ".heroku/vendor/lib/libffi-3.1.1" ]; then if [ ! -d ".heroku/vendor/lib/libffi-3.1" ]; then
export LIBFFI=$(pwd)/vendor
else
echo "-----> Noticed cffi. Bootstrapping libffi." echo "-----> Noticed cffi. Bootstrapping libffi."
mkdir -p .heroku/vendor mkdir -p .heroku/vendor
# Download and extract libffi into target vendor directory. # Download and extract libffi into target vendor directory.
curl $VENDORED_LIBFFI -s | tar zxv -C .heroku/vendor &> /dev/null curl $VENDORED_LIBFFI -s | tar zxv -C .heroku/vendor &> /dev/null
export LIBFFI=$(pwd)/vendor
fi fi
export LIBFFI=$(pwd)/vendor
fi fi
bpwatch stop libffi_install bpwatch stop libffi_install
+3 -5
View File
@@ -22,16 +22,14 @@ bpwatch start gdal_install
# If GDAL exists within requirements, use vendored gdal. # If GDAL exists within requirements, use vendored gdal.
if (pip-grep -s requirements.txt GDAL gdal pygdal &> /dev/null) then if (pip-grep -s requirements.txt GDAL gdal pygdal &> /dev/null) then
if [ -f ".heroku/vendor/bin/gdalserver" ]; then if [ ! -f ".heroku/vendor/bin/gdalserver" ]; then
export GDAL=$(pwd)/vendor
else
echo "-----> Noticed GDAL. Bootstrapping gdal." echo "-----> Noticed GDAL. Bootstrapping gdal."
mkdir -p .heroku/vendor mkdir -p .heroku/vendor
# Download and extract cryptography into target vendor directory. # Download and extract cryptography into target vendor directory.
curl $VENDORED_GDAL -s | tar zxv -C .heroku/vendor &> /dev/null curl $VENDORED_GDAL -s | tar zxv -C .heroku/vendor &> /dev/null
export GDAL=$(pwd)/vendor
fi fi
export GDAL=$(pwd)/vendor
fi fi
bpwatch stop gdal_install bpwatch stop gdal_install
+3 -5
View File
@@ -24,18 +24,16 @@ bpwatch start geo_libs_install
# If GDAL exists within requirements, use vendored gdal. # If GDAL exists within requirements, use vendored gdal.
if [[ "$BUILD_WITH_GEO_LIBRARIES" ]]; then if [[ "$BUILD_WITH_GEO_LIBRARIES" ]]; then
if [ -f ".heroku/vendor/bin/gdalserver" ]; then if [ ! -f ".heroku/vendor/bin/proj" ]; then
export GDAL=$(pwd)/vendor
else
echo "-----> Bootstrapping gdal, geos, proj." echo "-----> Bootstrapping gdal, geos, proj."
mkdir -p .heroku/vendor mkdir -p .heroku/vendor
# Download and extract cryptography into target vendor directory. # Download and extract cryptography into target vendor directory.
curl $VENDORED_GDAL -s | tar zxv -C .heroku/vendor &> /dev/null curl $VENDORED_GDAL -s | tar zxv -C .heroku/vendor &> /dev/null
curl $VENDORED_GEOS -s | tar zxv -C .heroku/vendor &> /dev/null curl $VENDORED_GEOS -s | tar zxv -C .heroku/vendor &> /dev/null
curl $VENDORED_PROJ -s | tar zxv -C .heroku/vendor &> /dev/null curl $VENDORED_PROJ -s | tar zxv -C .heroku/vendor &> /dev/null
export GDAL=$(pwd)/vendor
fi fi
export GDAL=$(pwd)/vendor
fi fi
bpwatch stop geo_libs_install bpwatch stop geo_libs_install
+1 -1
View File
@@ -3,4 +3,4 @@ if (grep -Fiq "hg+" requirements.txt) then
bpwatch start mercurial_install bpwatch start mercurial_install
/app/.heroku/python/bin/pip install mercurial | cleanup | indent /app/.heroku/python/bin/pip install mercurial | cleanup | indent
bpwatch stop mercurial_install bpwatch stop mercurial_install
fi fi
+7 -1
View File
@@ -5,7 +5,7 @@ puts-cmd "pip install -r requirements.txt"
[ "$FRESH_PYTHON" ] && bpwatch start pip_install_first [ "$FRESH_PYTHON" ] && bpwatch start pip_install_first
set +e set +e
/app/.heroku/python/bin/pip install -r requirements.txt --exists-action=w --src=./.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee $WARNINGS_LOG | cleanup | indent /app/.heroku/python/bin/pip install -r $BUILD_DIR/requirements.txt --exists-action=w --src=/app/.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | tee $WARNINGS_LOG | cleanup | indent
PIP_STATUS="${PIPESTATUS[0]}" PIP_STATUS="${PIPESTATUS[0]}"
set -e set -e
@@ -20,6 +20,12 @@ fi
cp requirements.txt .heroku/python/requirements-declared.txt cp requirements.txt .heroku/python/requirements-declared.txt
/app/.heroku/python/bin/pip freeze --disable-pip-version-check > .heroku/python/requirements-installed.txt /app/.heroku/python/bin/pip freeze --disable-pip-version-check > .heroku/python/requirements-installed.txt
# Replace egg-links with new paths for /app.
# find .heroku/python/lib/python*/site-packages/ -name "*.egg-link" -print0 | xargs -0 cat
find .heroku/python/lib/python*/site-packages/ -name "*.egg-link" -print0 | xargs -r -0 -n 1 sed -i -e "s#$(pwd)/#./app/#"
find .heroku/python/lib/python*/site-packages/ -name "easy-install.pth" -print0 | xargs -r -0 -n 1 sed -i -e "s#$(pwd)/#/app/#"
[ ! "$FRESH_PYTHON" ] && bpwatch stop pip_install [ ! "$FRESH_PYTHON" ] && bpwatch stop pip_install
[ "$FRESH_PYTHON" ] && bpwatch stop pip_install_first [ "$FRESH_PYTHON" ] && bpwatch stop pip_install_first
+1 -1
View File
@@ -15,4 +15,4 @@ if [[ -f .heroku/python/requirements-declared.txt ]]; then
fi fi
fi fi
bpwatch stop pip_uninstall bpwatch stop pip_uninstall
set -e set -e
+3 -5
View File
@@ -21,16 +21,14 @@ bpwatch start pylibmc_install
# If pylibmc exists within requirements, use vendored libmemcached. # If pylibmc exists within requirements, use vendored libmemcached.
if (pip-grep -s requirements.txt pylibmc &> /dev/null) then if (pip-grep -s requirements.txt pylibmc &> /dev/null) then
if [ -d ".heroku/vendor/lib/sasl2" ]; then if [ ! -d ".heroku/vendor/lib/sasl2" ]; then
export LIBMEMCACHED=$(pwd)/vendor
else
echo "-----> Noticed pylibmc. Bootstrapping libmemcached." echo "-----> Noticed pylibmc. Bootstrapping libmemcached."
mkdir -p .heroku/vendor mkdir -p .heroku/vendor
# Download and extract libmemcached into target vendor directory. # Download and extract libmemcached into target vendor directory.
curl $VENDORED_MEMCACHED -s | tar zxv -C .heroku/vendor &> /dev/null curl $VENDORED_MEMCACHED -s | tar zxv -C .heroku/vendor &> /dev/null
export LIBMEMCACHED=$(pwd)/vendor
fi fi
export LIBMEMCACHED=$(pwd)/vendor
fi fi
bpwatch stop pylibmc_install bpwatch stop pylibmc_install
-106
View File
@@ -1,106 +0,0 @@
#!/usr/bin/env bash
#
# Create a Heroku app with the following buildpack:
# https://github.com/ddollar/buildpack-test
#
# Push this Python buildpack to that Heroku app to
# run the tests.
#
testDetectWithReqs() {
detect "simple-requirements"
assertCapturedEquals "Python"
assertCapturedSuccess
}
testDetectWithEmptyReqs() {
detect "empty-requirements"
assertCapturedEquals "Python"
assertCapturedSuccess
}
testDetectDjango16() {
detect "django-1.6-skeleton"
assertCapturedEquals "Python"
assertCapturedSuccess
}
testDetectDjango15() {
detect "django-1.5-skeleton"
assertCapturedEquals "Python"
assertCapturedSuccess
}
testDetectDjango14() {
detect "django-1.4-skeleton"
assertCapturedEquals "Python"
assertCapturedSuccess
}
testDetectDjango13() {
detect "django-1.3-skeleton"
assertCapturedEquals "Python"
assertCapturedSuccess
}
testDetectNotDjangoWithSettings() {
detect "not-django"
assertCapturedEquals "Python"
assertCapturedSuccess
}
testDetectWithSetupPy() {
detect "distutils"
assertCapturedEquals "Python"
assertCapturedSuccess
}
testDetectWithSetupRequires() {
detect "no-requirements"
assertCapturedEquals "Python"
assertCapturedSuccess
}
testDetectNotPython() {
detect "not-python"
assertNotCaptured "Python"
assertEquals "1" "${RETURN}"
}
testDetectSimpleRuntimePypy2() {
detect "simple-runtime-pypy2"
assertCapturedEquals "Python"
assertCapturedSuccess
}
testDetectSimpleRuntimePython2() {
detect "simple-runtime-python2"
assertCapturedEquals "Python"
assertCapturedSuccess
}
testDetectSimpleRuntimePython3() {
detect "simple-runtime" # should probably be renamed simple-runtime-python3
assertCapturedEquals "Python"
assertCapturedSuccess
}
## utils ########################################
pushd $(dirname 0) >/dev/null
BASE=$(pwd)
popd >/dev/null
source ${BASE}/vendor/test-utils
detect() {
capture ${BASE}/bin/detect ${BASE}/test/$1
}
compile() {
capture ${BASE}/bin/compile ${BASE}/test/$1
}
source ${BASE}/vendor/shunit2
+11
View File
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Syntax sugar.
BIN_DIR=$(cd $(dirname $0); pwd) # absolute path
source $BIN_DIR/utils
DISABLE_COLLECTSTATIC=1 "$(dirname ${0:-})/compile" "$1" "$2" "$3"
if [[ -f "$1/requirements-test.txt" ]]; then
/app/.heroku/python/bin/pip install -r "$1/requirements-test.txt" --exists-action=w --src=./.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | cleanup | indent
fi
+2
View File
@@ -39,11 +39,13 @@ puts-cmd() {
# Usage: $ set-env key value # Usage: $ set-env key value
set-env() { set-env() {
echo "export $1=$2" >> $PROFILE_PATH echo "export $1=$2" >> $PROFILE_PATH
echo "export $1=$2" >> $EXPORT_PATH
} }
# Usage: $ set-default-env key value # Usage: $ set-default-env key value
set-default-env() { set-default-env() {
echo "export $1=\${$1:-$2}" >> $PROFILE_PATH echo "export $1=\${$1:-$2}" >> $PROFILE_PATH
echo "export $1=\${$1:-$2}" >> $EXPORT_PATH
} }
# Usage: $ un-set-env key # Usage: $ un-set-env key
-15
View File
@@ -1,15 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
OUT_PREFIX=$1
echo "Building autoconf..."
SOURCE_TARBALL='https://ftp.gnu.org/gnu/autoconf/autoconf-2.68.tar.gz'
curl -L $SOURCE_TARBALL | tar xz
cd autoconf-2.68
./configure --prefix=$OUT_PREFIX
make
make install
+5
View File
@@ -3,6 +3,11 @@
OUT_PREFIX=$1 OUT_PREFIX=$1
# Skip the build for heroku-16.
if [[ $S3_PREFIX == "heroku-16" ]]; then
exit 0
fi
# Use new path, containing autoconf. # Use new path, containing autoconf.
export PATH="/app/.heroku/python/bin/:$PATH" export PATH="/app/.heroku/python/bin/:$PATH"
hash -r hash -r
+5
View File
@@ -3,6 +3,11 @@
OUT_PREFIX=$1 OUT_PREFIX=$1
# Skip the build for heroku-16.
if [[ $S3_PREFIX == "heroku-16" ]]; then
exit 0
fi
# fail hard # fail hard
set -o pipefail set -o pipefail
# fail harder # fail harder
-12
View File
@@ -1,12 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-1.7-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-1.7/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
-12
View File
@@ -1,12 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-1.8-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-1.8/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
-12
View File
@@ -1,12 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-1.9-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-1.9/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.0-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-2.0/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.2-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-2.2-linux64/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.2.1-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-2.2.1-linux64/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite, libraries/libffi
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.3-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-2.3-linux64/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.3.1-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-2.3.1-linux64/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.4.0-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-2.4.0-linux64/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.0-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-2.5.0-linux64/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.1-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-2.5.1-linux64/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.0-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-2.6.0-linux64/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.6.1-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-2.6.1-linux64/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-4.0.0-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-4.0.0-linux64/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-4.0.1-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-4.0.1-linux64/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.0-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-5.0.0-linux64/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-5.0.1-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-5.0.1-linux64/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
@@ -7,8 +7,8 @@
OUT_PREFIX=$1 OUT_PREFIX=$1
echo "Building PyPy..." echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.0.2-linux64.tar.bz2' SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.3.1-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-2.0.2/* $OUT_PREFIX cp -R pypy2-v5.3.1-linux64/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
@@ -7,8 +7,8 @@
OUT_PREFIX=$1 OUT_PREFIX=$1
echo "Building PyPy..." echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.1-linux64.tar.bz2' SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy2-v5.6.0-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-2.1/* $OUT_PREFIX cp -R pypy2-v5.6.0-linux64/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
-14
View File
@@ -1,14 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
# NOTICE: This formula only works for the cedar-14 stack, not cedar.
OUT_PREFIX=$1
echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy3-2.3.1-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
cp -R pypy3-2.3.1-linux64/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python
@@ -7,8 +7,8 @@
OUT_PREFIX=$1 OUT_PREFIX=$1
echo "Building PyPy..." echo "Building PyPy..."
SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy-2.0.1-linux64.tar.bz2' SOURCE_TARBALL='https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v5.5.0-alpha-linux64.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx curl -L $SOURCE_TARBALL | tar jx
cp -R pypy-2.0.1/* $OUT_PREFIX cp -R pypy3-v5.5.0-linux64/* $OUT_PREFIX
ln $OUT_PREFIX/bin/pypy $OUT_PREFIX/bin/python ln $OUT_PREFIX/bin/pypy3 $OUT_PREFIX/bin/python
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.4 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.4.4/Python-2.4.4.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.4.4 src
cd src
./configure --prefix=$OUT_PREFIX
make
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.4 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.4.5/Python-2.4.5.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.4.5 src
cd src
./configure --prefix=$OUT_PREFIX
make
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.4 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.4.6/Python-2.4.6.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.4.6 src
cd src
./configure --prefix=$OUT_PREFIX
make
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.5 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.5/Python-2.5.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.5 src
cd src
./configure --prefix=$OUT_PREFIX
make
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.5 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.5.1/Python-2.5.1.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.5.1 src
cd src
./configure --prefix=$OUT_PREFIX
make
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.5 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.5.2/Python-2.5.2.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.5.2 src
cd src
./configure --prefix=$OUT_PREFIX
make
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.5 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.5.3/Python-2.5.3.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.5.3 src
cd src
./configure --prefix=$OUT_PREFIX
make
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.5 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.5.4/Python-2.5.4.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.5.4 src
cd src
./configure --prefix=$OUT_PREFIX
make
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.6 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.5.5/Python-2.5.5.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.5.5 src
cd src
./configure --prefix=$OUT_PREFIX
make
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.5 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.5.6/Python-2.5.6.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.5.6 src
cd src
./configure --prefix=$OUT_PREFIX
make
make install
-20
View File
@@ -1,20 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
# NOTICE: This formula only works for the cedar stack, not cedar-14.
OUT_PREFIX=$1
# Protect 2.6 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://www.python.org/ftp/python/2.6/Python-2.6.tar.bz2'
curl -L $SOURCE_TARBALL | tar jx
mv Python-2.6 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
-20
View File
@@ -1,20 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
# NOTICE: This formula only works for the cedar stack, not cedar-14.
OUT_PREFIX=$1
# Protect 2.6 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.6.1/Python-2.6.1.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.6.1 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.6 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.6.2/Python-2.6.2.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.6.2 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.6 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.6.3/Python-2.6.3.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.6.3 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.6 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.6.4/Python-2.6.4.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.6.4 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.6 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.6.5/Python-2.6.5.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.6.5 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.6 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.6.6/Python-2.6.6.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.6.6 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.6 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.6.7/Python-2.6.7.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.6.7 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.6 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.6.8/Python-2.6.8.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.6.8 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
# Protect 2.6 builds from parent Python (causes segfault during build).
unset LANG PYTHONHOME PYTHONPATH
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.6.9/Python-2.6.9.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.6.9 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
-15
View File
@@ -1,15 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.7.1/Python-2.7.1.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.7.1 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
@@ -5,9 +5,9 @@
OUT_PREFIX=$1 OUT_PREFIX=$1
echo "Building Python..." echo "Building Python..."
SOURCE_TARBALL='https://www.python.org/ftp/python/2.7.11/Python-2.7.11rc1.tgz' SOURCE_TARBALL='https://python.org/ftp/python/2.7.12/Python-2.7.12.tgz'
curl -L $SOURCE_TARBALL | tar xz curl -L $SOURCE_TARBALL | tar xz
mv Python-2.7.11rc1 src mv Python-2.7.12 src
cd src cd src
./configure --prefix=$OUT_PREFIX --with-ensurepip=no ./configure --prefix=$OUT_PREFIX --with-ensurepip=no
@@ -5,11 +5,11 @@
OUT_PREFIX=$1 OUT_PREFIX=$1
echo "Building Python..." echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.7/Python-2.7.tgz' SOURCE_TARBALL='https://python.org/ftp/python/2.7.13/Python-2.7.13.tgz'
curl -L $SOURCE_TARBALL | tar xz curl -L $SOURCE_TARBALL | tar xz
mv Python-2.7 src mv Python-2.7.13 src
cd src cd src
./configure --prefix=$OUT_PREFIX --enable-shared ./configure --prefix=$OUT_PREFIX --enable-unicode=ucs4 --with-ensurepip=no
make make
make install make install
-15
View File
@@ -1,15 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.7.2/Python-2.7.2.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.7.2 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
-15
View File
@@ -1,15 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.7.3/Python-2.7.3.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.7.3 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
-15
View File
@@ -1,15 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.7.4/Python-2.7.4.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.7.4 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
-15
View File
@@ -1,15 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.7.5/Python-2.7.5.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.7.5 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
-15
View File
@@ -1,15 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.7.6/Python-2.7.6.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.7.6 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
-15
View File
@@ -1,15 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.7.7/Python-2.7.7.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.7.7 src
cd src
./configure --prefix=$OUT_PREFIX
make
make install
-15
View File
@@ -1,15 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.7.7/Python-2.7.7.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.7.7 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
-15
View File
@@ -1,15 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.7.8/Python-2.7.8.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.7.8 src
cd src
./configure --prefix=$OUT_PREFIX
make
make install
-15
View File
@@ -1,15 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/2.7.8/Python-2.7.8.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-2.7.8 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.1/Python-3.1.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.1 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.1.1/Python-3.1.1.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.1.1 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.1.2/Python-3.1.2.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.1.2 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.1.3/Python-3.1.3.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.1.3 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.1.4/Python-3.1.4.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.1.4 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.1.5/Python-3.1.5.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.1.5 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.2/Python-3.2.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.2 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.2.1/Python-3.2.1.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.2.1 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.2.2/Python-3.2.2.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.2.2 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.2.3/Python-3.2.3.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.2.3 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.2.4/Python-3.2.4.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.2.4 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.2.5/Python-3.2.5.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.2.5 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.3.0/Python-3.3.0.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.3.0 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.3.1/Python-3.3.1.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.3.1 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.3.2/Python-3.3.2.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.3.2 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.3.3/Python-3.3.3.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.3.3 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.3.4/Python-3.3.4.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.3.4 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.3.5/Python-3.3.5.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.3.5 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.3.6/Python-3.3.6.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.3.6 src
cd src
./configure --prefix=$OUT_PREFIX --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-17
View File
@@ -1,17 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.4.0/Python-3.4.0.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.4.0 src
cd src
./configure --prefix=$OUT_PREFIX --with-ensurepip=no --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.4.1/Python-3.4.1.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.4.1 src
cd src
./configure --prefix=$OUT_PREFIX --with-ensurepip=no --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.4.2/Python-3.4.2.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.4.2 src
cd src
./configure --prefix=$OUT_PREFIX --with-ensurepip=no --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.4.3/Python-3.4.3.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.4.3 src
cd src
./configure --prefix=$OUT_PREFIX --with-ensurepip=no --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
# Build Deps: libraries/sqlite
OUT_PREFIX=$1
echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.5.0/Python-3.5.0.tgz'
curl -L $SOURCE_TARBALL | tar xz
mv Python-3.5.0 src
cd src
./configure --prefix=$OUT_PREFIX --with-ensurepip=no --enable-shared
make
make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
@@ -5,14 +5,14 @@
OUT_PREFIX=$1 OUT_PREFIX=$1
echo "Building Python..." echo "Building Python..."
SOURCE_TARBALL='https://python.org/ftp/python/3.5.1/Python-3.5.1.tgz' SOURCE_TARBALL='https://python.org/ftp/python/3.5.2/Python-3.5.2.tgz'
curl -L $SOURCE_TARBALL | tar xz curl -L $SOURCE_TARBALL | tar xz
mv Python-3.5.1 src mv Python-3.5.2 src
cd src cd src
./configure --prefix=$OUT_PREFIX --with-ensurepip=no ./configure --prefix=$OUT_PREFIX --with-ensurepip=no
make make
make install make install
ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python # ln $OUT_PREFIX/bin/python3 $OUT_PREFIX/bin/python
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+10 -13
View File
@@ -18,6 +18,7 @@ from pip._vendor.requests import session
requests = session() requests = session()
class Requirements(object): class Requirements(object):
def __init__(self, reqfile=None): def __init__(self, reqfile=None):
super(Requirements, self).__init__() super(Requirements, self).__init__()
@@ -31,13 +32,15 @@ class Requirements(object):
return '<Requirements \'{}\'>'.format(self.path) return '<Requirements \'{}\'>'.format(self.path)
def load(self, reqfile): def load(self, reqfile):
if not os.path.exists(reqfile): if not os.path.exists(reqfile):
raise ValueError('The given requirements file does not exist.') raise ValueError('The given requirements file does not exist.')
finder = PackageFinder([], [], session=requests) finder = PackageFinder([], [], session=requests)
for requirement in parse_requirements(reqfile, finder=finder, session=requests): for requirement in parse_requirements(reqfile, finder=finder, session=requests):
if requirement.req: if requirement.req:
if not getattr(requirement.req, 'name', None):
# Prior to pip 8.1.2 the attribute `name` did not exist.
requirement.req.name = requirement.req.project_name
self.requirements.append(requirement.req) self.requirements.append(requirement.req)
@@ -48,24 +51,24 @@ class Requirements(object):
# Generate fresh packages. # Generate fresh packages.
other_reqs = ( other_reqs = (
[r.project_name for r in r1.requirements] [r.name for r in r1.requirements]
if ignore_versions else r1.requirements if ignore_versions else r1.requirements
) )
for req in r2.requirements: for req in r2.requirements:
r = req.project_name if ignore_versions else req r = req.name if ignore_versions else req
if r not in other_reqs and r not in excludes: if r not in other_reqs and r not in excludes:
results['fresh'].append(req) results['fresh'].append(req)
# Generate stale packages. # Generate stale packages.
other_reqs = ( other_reqs = (
[r.project_name for r in r2.requirements] [r.name for r in r2.requirements]
if ignore_versions else r2.requirements if ignore_versions else r2.requirements
) )
for req in r1.requirements: for req in r1.requirements:
r = req.project_name if ignore_versions else req r = req.name if ignore_versions else req
if r not in other_reqs and r not in excludes: if r not in other_reqs and r not in excludes:
results['stale'].append(req) results['stale'].append(req)
@@ -73,11 +76,7 @@ class Requirements(object):
return results return results
def diff(r1, r2, include_fresh=False, include_stale=False, excludes=None): def diff(r1, r2, include_fresh=False, include_stale=False, excludes=None):
include_versions = True if include_stale else False include_versions = True if include_stale else False
excludes = excludes if len(excludes) else [] excludes = excludes if len(excludes) else []
@@ -92,12 +91,11 @@ def diff(r1, r2, include_fresh=False, include_stale=False, excludes=None):
if include_fresh: if include_fresh:
for line in results['fresh']: for line in results['fresh']:
print(line.project_name if include_versions else line) print(line.name if include_versions else line)
if include_stale: if include_stale:
for line in results['stale']: for line in results['stale']:
print(line.project_name if include_versions else line) print(line.name if include_versions else line)
def main(): def main():
@@ -114,6 +112,5 @@ def main():
diff(**kwargs) diff(**kwargs)
if __name__ == '__main__': if __name__ == '__main__':
main() main()
+12 -20
View File
@@ -15,6 +15,7 @@ from pip._vendor.requests import session
requests = session() requests = session()
class Requirements(object): class Requirements(object):
def __init__(self, reqfile=None): def __init__(self, reqfile=None):
super(Requirements, self).__init__() super(Requirements, self).__init__()
@@ -28,41 +29,34 @@ class Requirements(object):
return '<Requirements \'{}\'>'.format(self.path) return '<Requirements \'{}\'>'.format(self.path)
def load(self, reqfile): def load(self, reqfile):
if not os.path.exists(reqfile): if not os.path.exists(reqfile):
raise ValueError('The given requirements file does not exist.') raise ValueError('The given requirements file does not exist.')
finder = PackageFinder([], [], session=requests) finder = PackageFinder([], [], session=requests)
for requirement in parse_requirements(reqfile, finder=finder, session=requests): for requirement in parse_requirements(reqfile, finder=finder, session=requests):
self.requirements.append(requirement) if requirement.req:
if not getattr(requirement.req, 'name', None):
# Prior to pip 8.1.2 the attribute `name` did not exist.
requirement.req.name = requirement.req.project_name
self.requirements.append(requirement.req)
def grep(reqfile, packages, silent=False): def grep(reqfile, packages, silent=False):
try: try:
r = Requirements(reqfile) r = Requirements(reqfile)
except ValueError: except ValueError:
if not silent: if not silent:
print('There was a problem loading the given requirement file.') print('There was a problem loading the given requirement file.')
exit(os.EX_NOINPUT) exit(os.EX_NOINPUT)
for requirement in r.requirements: for req in r.requirements:
if req.name in packages:
if requirement.req: if not silent:
print('Package {} found!'.format(req.name))
if requirement.req.project_name in packages: exit(0)
if not silent:
print('Package {} found!'.format(requirement.req.project_name))
exit(0)
if not silent: if not silent:
print('Not found.'.format(requirement.req.project_name)) print('Not found.')
exit(1) exit(1)
@@ -72,10 +66,8 @@ def main():
kwargs = {'reqfile': args['<reqfile>'], 'packages': args['<package>'], 'silent': args['-s']} kwargs = {'reqfile': args['<reqfile>'], 'packages': args['<package>'], 'silent': args['-s']}
grep(**kwargs) grep(**kwargs)
if __name__ == '__main__': if __name__ == '__main__':
main() main()

Some files were not shown because too many files have changed in this diff Show More