mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-08 11:33:49 -05:00
Compare commits
179 Commits
v2.0.0-rc1
...
v2.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
066c05336f | ||
|
|
1fa027af1e | ||
|
|
a0cc289d15 | ||
|
|
4bbf7d7bb0 | ||
|
|
4b82f575c7 | ||
|
|
c0d8b9cfe8 | ||
|
|
0388da7d0b | ||
|
|
13efdea9ab | ||
|
|
8db91d5516 | ||
|
|
a015760854 | ||
|
|
d4f45b0096 | ||
|
|
444088b1db | ||
|
|
09877f45cb | ||
|
|
f864294e0e | ||
|
|
5963dc4f61 | ||
|
|
0915c5b7b6 | ||
|
|
ed38af6409 | ||
|
|
208be7d6af | ||
|
|
07aa659dbb | ||
|
|
88c3404997 | ||
|
|
3a35f43eb4 | ||
|
|
9a42b48da4 | ||
|
|
f5cc25ed14 | ||
|
|
e0e3244015 | ||
|
|
9c72c27d76 | ||
|
|
483d95d6d2 | ||
|
|
05ca057bb2 | ||
|
|
108a10a198 | ||
|
|
979e6f0a61 | ||
|
|
2a9c18372a | ||
|
|
8315e1528b | ||
|
|
c81a28105f | ||
|
|
d601efa0d5 | ||
|
|
0688b17cc1 | ||
|
|
bb6a747c02 | ||
|
|
681d31bc36 | ||
|
|
3b1bc86031 | ||
|
|
6139b51af4 | ||
|
|
10a8c83888 | ||
|
|
9985f7b436 | ||
|
|
a7895e6ea8 | ||
|
|
7dd48d1665 | ||
|
|
11c54713bb | ||
|
|
3051d21004 | ||
|
|
9ecfdd1073 | ||
|
|
47d3dee0bb | ||
|
|
0a3b72d890 | ||
|
|
f018056165 | ||
|
|
af55330d37 | ||
|
|
0211c345f7 | ||
|
|
2f8c625a7d | ||
|
|
e28661c7e2 | ||
|
|
6882be06a6 | ||
|
|
c6c4e41eb9 | ||
|
|
f504b01818 | ||
|
|
876be1bb04 | ||
|
|
6185bb55e6 | ||
|
|
7f714c34ba | ||
|
|
848e56e992 | ||
|
|
8b07b92c37 | ||
|
|
3a20ce7555 | ||
|
|
0c6ad7c52b | ||
|
|
1bd397112a | ||
|
|
dcfd715603 | ||
|
|
474d7cc066 | ||
|
|
02c44942c6 | ||
|
|
76db37dbfa | ||
|
|
eb89256f59 | ||
|
|
19f74e41f0 | ||
|
|
6c74b616a5 | ||
|
|
8cce6e8dd2 | ||
|
|
03cabd88e9 | ||
|
|
e56962b357 | ||
|
|
cabdc45181 | ||
|
|
7f45f1eb9d | ||
|
|
acc949c27b | ||
|
|
4f689cdf83 | ||
|
|
26134d9b38 | ||
|
|
1c90a0f864 | ||
|
|
90d0d20508 | ||
|
|
58e2087967 | ||
|
|
a65af6570d | ||
|
|
70d7749584 | ||
|
|
9df4524c79 | ||
|
|
f7450587dc | ||
|
|
22e1aa6e9d | ||
|
|
2d64fb1cb9 | ||
|
|
a85875c39e | ||
|
|
8db5778b12 | ||
|
|
c7d8a1c33d | ||
|
|
44b7da194b | ||
|
|
b2eb2d28d1 | ||
|
|
8b60418361 | ||
|
|
e9c8dfc197 | ||
|
|
dfeda54079 | ||
|
|
4f8b15fecd | ||
|
|
07609cc579 | ||
|
|
3738c2a282 | ||
|
|
9668be8850 | ||
|
|
dc36c300e1 | ||
|
|
351ddb1095 | ||
|
|
d209e0612b | ||
|
|
825ef64995 | ||
|
|
65588f51d9 | ||
|
|
ab1a9d290c | ||
|
|
b40ef3c698 | ||
|
|
1427f80828 | ||
|
|
9db1193c2a | ||
|
|
1f906baae8 | ||
|
|
cef86ce462 | ||
|
|
52822a3d50 | ||
|
|
afc8031544 | ||
|
|
c435fde088 | ||
|
|
3773dfb4f1 | ||
|
|
abe0056b5f | ||
|
|
fd8854dea1 | ||
|
|
9b6377de23 | ||
|
|
8c251a5e9b | ||
|
|
a6d6ba8050 | ||
|
|
fc7560bcfd | ||
|
|
56fd6c3c51 | ||
|
|
db82c73391 | ||
|
|
d4d66b6183 | ||
|
|
0c287ffcf7 | ||
|
|
af59ef0088 | ||
|
|
ad8807543b | ||
|
|
aad74674cb | ||
|
|
f043f47c35 | ||
|
|
d769f22996 | ||
|
|
56fe98bfed | ||
|
|
041903c640 | ||
|
|
84a6535708 | ||
|
|
93dd6f1163 | ||
|
|
3a5a21ee05 | ||
|
|
ae29f86968 | ||
|
|
f7754ae6a4 | ||
|
|
673c73012d | ||
|
|
20df064204 | ||
|
|
1cce1cadbd | ||
|
|
fc83d32317 | ||
|
|
cb0402214e | ||
|
|
35e0b0e24a | ||
|
|
57f1c3b5b4 | ||
|
|
637fd914dc | ||
|
|
d2bd4c06ef | ||
|
|
5f75198569 | ||
|
|
bbcecc7561 | ||
|
|
e154693dc6 | ||
|
|
1706436fae | ||
|
|
859b260764 | ||
|
|
fadb3f3389 | ||
|
|
f81bffc95e | ||
|
|
d517315d25 | ||
|
|
70934bd635 | ||
|
|
b8686ffdad | ||
|
|
c95b1f2b95 | ||
|
|
c878150dac | ||
|
|
6633382417 | ||
|
|
83056fc404 | ||
|
|
cb1390cb49 | ||
|
|
159327ff25 | ||
|
|
e2125b2750 | ||
|
|
adca14a910 | ||
|
|
fa7bb12221 | ||
|
|
fa384f134e | ||
|
|
ca2032452b | ||
|
|
713cfea475 | ||
|
|
d73ae603c7 | ||
|
|
84486ceb70 | ||
|
|
1270ca6b0b | ||
|
|
c8abcd23f0 | ||
|
|
748a1ff0ec | ||
|
|
20a146ed6e | ||
|
|
ac4de22265 | ||
|
|
d02b929d07 | ||
|
|
b4511f0787 | ||
|
|
891dc31c92 | ||
|
|
8bff74dbd4 | ||
|
|
df671621e9 |
12
.github/FUNDING.yml
vendored
Normal file
12
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [pyenv] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: pyenv # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: ['https://www.bountysource.com/teams/yyuu-pyenv/issues'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
11
.github/ISSUE_TEMPLATE.md
vendored
11
.github/ISSUE_TEMPLATE.md
vendored
@@ -17,5 +17,12 @@ Make sure you have checked all steps below.
|
||||
- [ ] pyenv version:
|
||||
- [ ] Python version:
|
||||
- [ ] C Compiler information (e.g. gcc 7.3):
|
||||
- [ ] Please attach verbose build log as gist
|
||||
* You can turn on verbose debug logging using by setting `PYENV_DEBUG=1`, e.g. `env PYENV_DEBUG=1 pyenv install -v 3.6.4`
|
||||
- [ ] Please attach a debug trace log as gist
|
||||
* If the problem happens in a Pyenv invocation, you can turn on debug logging by setting `PYENV_DEBUG=1`, e.g. `env PYENV_DEBUG=1 pyenv install -v 3.6.4`
|
||||
* If the problem happens outside of a Pyenv invocation, get the debug log like this:
|
||||
```
|
||||
export PS4='+(${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
|
||||
set -x
|
||||
<reproduce the problem>
|
||||
set +x
|
||||
```
|
||||
|
||||
35
.github/workflows/pyenv_tests.yml
vendored
Normal file
35
.github/workflows/pyenv_tests.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: pyenv_tests
|
||||
on: [pull_request, push]
|
||||
jobs:
|
||||
pyenv_tests:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-20.04
|
||||
- ubuntu-18.04
|
||||
- macos-11
|
||||
- macos-10.15
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
# Normally, we would use the superbly maintained...
|
||||
# - uses: actions/setup-python@v2
|
||||
# with:
|
||||
# python-version: ${{ matrix.python-version }}
|
||||
# ... but in the repo, we want to test pyenv builds on Ubuntu
|
||||
# - run: |
|
||||
# sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \
|
||||
# libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
|
||||
# xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
|
||||
# https://github.com/pyenv/pyenv#installation
|
||||
- run: |
|
||||
if test "$RUNNER_OS" == "macOS"; then brew install coreutils; fi
|
||||
- run: pwd
|
||||
- env:
|
||||
PYENV_ROOT: /home/runner/work/pyenv/pyenv
|
||||
run: |
|
||||
echo $PYENV_ROOT
|
||||
echo "$PYENV_ROOT/shims:$PYENV_ROOT/bin" >> $GITHUB_PATH
|
||||
- run: |
|
||||
make test
|
||||
1
.github/workflows/ubuntu_tests.yml
vendored
1
.github/workflows/ubuntu_tests.yml
vendored
@@ -12,6 +12,7 @@ jobs:
|
||||
- 3.7.10
|
||||
- 3.8.10
|
||||
- 3.9.5
|
||||
- 3.10.0
|
||||
runs-on: Ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
94
CHANGELOG.md
94
CHANGELOG.md
@@ -1,5 +1,96 @@
|
||||
## Version History
|
||||
|
||||
## Release 2.2.0
|
||||
* Adding PyPy release 7.3.7 (Python 3.7 and 3.8). (#2132)
|
||||
* Append Homebrew custom prefix to search path (#1957)
|
||||
* Add documentation for init command (#2125)
|
||||
* Add setup instructions for the case when one installs Pyenv as part of a batch job (#2127)
|
||||
* Add documentation for completions command (#2126)
|
||||
* Default --with-universal-archs to universal2 on Apple Silicon (#2122)
|
||||
* Update README.md (#2120)
|
||||
* Add GraalPython 21.3.0 (#2117)
|
||||
* Pypy ver 7.3.6 - python 3.7 and python 3.8 (#2111)
|
||||
* Discover Tcl/Tk reliably and use active version (#2106)
|
||||
* Fish installation instructions (#2104)
|
||||
* Add CPython 3.11.0a1 (#2099)
|
||||
|
||||
## Release 2.1.0
|
||||
* Fix mambaforge-pypy3 build (#2096)
|
||||
* Add Python 3.10.0 (#2093)
|
||||
* Add documentation for exec command (#2090)
|
||||
* Add documentation for shims command (#2091)
|
||||
* Add documentation for hooks command (#2089)
|
||||
* Add documentation for root command (#2088)
|
||||
* Add documentaion for prefix command (#2087)
|
||||
* Update to Pyston's v2 package of the 2.3.1 release (#2078)
|
||||
* Add pyston-2.3.1 support (#2075)
|
||||
* Don't update conda when installing pip (#2074)
|
||||
* Improve `add_miniconda.py` (#2072)
|
||||
* GitHub actions tests (#2073)
|
||||
* Fix sed commands (#2071)
|
||||
* macOS: fix the build of Python 2.7.18 on macOS 11.5.2 (Big Sur) + Apple Silicon (#2061)
|
||||
|
||||
## Release 2.0.7
|
||||
* Update setup instructions in the Readme (#2067)
|
||||
* Allow tcl-tk as argument or try with homebrew by default (#1646)
|
||||
* Allow system Python in sbin (#2065)
|
||||
* Prevent addition of duplicate plugin dirs to PATH (#2045)
|
||||
* Disable coreutils on M1 Apple Silicon with arm64 (#2020)
|
||||
* Add Python 3.10.0rc2 (#2053)
|
||||
* Add space after `yes/no` prompt (#2040)
|
||||
* Add CPython v3.6.15 and v3.7.12 (#2052)
|
||||
* Add missing Python 2.6.x definitions and patches (#2051)
|
||||
* Fix build of ossaudiodev in Linux/FreeBSD for Python 2.6 (#2049)
|
||||
* Fix build of ossaudiodev in Linux/FreeBSD for Python 3.1 (#2047)
|
||||
|
||||
## Release 2.0.6
|
||||
* Add CPython 3.9.7 (#2044)
|
||||
* Add CPython v3.8.12 (#2043)
|
||||
* Adapt conda.bash for bash associative array (#2037)
|
||||
|
||||
## Release 2.0.5
|
||||
|
||||
* Move man page to location where it can be automatically found by man (#2032)
|
||||
* Update checksums for CPython 3.10.0rc1 (#2025)
|
||||
* Remove 3.9.3 (#2022)
|
||||
* Add CPython 3.10.0rc1(#2023)
|
||||
|
||||
## Release 2.0.4
|
||||
|
||||
- Added scripts for rolling releases of Miniforge (#2019)
|
||||
- Update pyston-2.3 (#2017)
|
||||
- Add GraalPython 21.2.0 (#2018)
|
||||
- Add CPython 3.10.0b4 (#2013), (#2005)
|
||||
- Add Pyston 2.3 (#2012)
|
||||
|
||||
## Release 2.0.3
|
||||
|
||||
* Remove PATH warning (#2001)
|
||||
* Add Python 3.6.14, 3.7.11, 3.8.11, and 3.9.6 (#1996)
|
||||
* Miniforge minor update to 4.10.1-5 (#1992)
|
||||
* Suggest that fish users init in interactive mode (#1991)
|
||||
|
||||
## Release 2.0.2
|
||||
|
||||
* Miniforge minor update to 4.10.1-5 (#1992)
|
||||
* Suggest that fish users init in interactive mode (#1991)
|
||||
* Add 3.10.0b3 (#1988)
|
||||
* Revert "Drop inferring version to install from `pyenv local`" (#1984)
|
||||
* Use system Python3 for tests (#1979)
|
||||
* Check for shims in path with pure Bash (#1978)
|
||||
* Update setup instructions for debian, ubuntu etc. (#1977)
|
||||
|
||||
## Release 2.0.1
|
||||
|
||||
* Drop inferring version to install from `pyenv local` (#1907)
|
||||
* Create mambaforge-4.10.1-4 (#1971)
|
||||
* Add 3.10.0b2 recipe (#1966)
|
||||
* Fix .bashrc `echo` install syntax error (#1965)
|
||||
* Add explicit Zsh instructions for MacOS (#1964)
|
||||
* Install pip with pyston (#1955)
|
||||
* Mention log file if an error happened before building, too (#1537)
|
||||
* Add pypy3.7-7.3.5 (#1950)
|
||||
|
||||
## Release 2.0.0
|
||||
|
||||
* Support for CPython 3.9.5 has been added.
|
||||
@@ -15,6 +106,9 @@
|
||||
* Full shell configuration instructions placed into `pyenv init`
|
||||
* Prevent build from installing MacOS apps globally
|
||||
* ldflags_dirs is not needed for Python and causes failures
|
||||
* Report cache filename at download
|
||||
* Add micropython 1.15
|
||||
* Correct URLs for Stackless builds and add Stackless 2.7.16
|
||||
|
||||
## Breaking changes
|
||||
* Split startup logic into PATH and everything else (https://github.com/pyenv/pyenv/issues/1649#issuecomment-694388530)
|
||||
|
||||
88
COMMANDS.md
88
COMMANDS.md
@@ -16,7 +16,13 @@ The most common subcommands are:
|
||||
* [`pyenv versions`](#pyenv-versions)
|
||||
* [`pyenv which`](#pyenv-which)
|
||||
* [`pyenv whence`](#pyenv-whence)
|
||||
|
||||
* [`pyenv exec`](#pyenv-exec)
|
||||
* [`pyenv root`](#pyenv-root)
|
||||
* [`pyenv prefix`](#pyenv-prefix)
|
||||
* [`pyenv hooks`](#pyenv-hooks)
|
||||
* [`pyenv shims`](#pyenv-shims)
|
||||
* [`pyenv init`](#pyenv-init)
|
||||
* [`pyenv completions`](#pyenv-completions)
|
||||
|
||||
## `pyenv commands`
|
||||
|
||||
@@ -278,3 +284,83 @@ Lists all Python versions with the given command installed.
|
||||
2.6.8
|
||||
2.7.6
|
||||
3.3.3
|
||||
|
||||
## `pyenv exec`
|
||||
|
||||
`Usage: pyenv exec <command> [arg1 arg2...]`
|
||||
|
||||
Runs an executable by first preparing PATH so that the selected Python
|
||||
version's `bin` directory is at the front.
|
||||
|
||||
For example, if the currently selected Python version is 3.9.7:
|
||||
|
||||
`pyenv exec pip install -r requirements.txt`
|
||||
|
||||
is equivalent to:
|
||||
|
||||
`PATH="$PYENV_ROOT/versions/3.9.7/bin:$PATH" pip install -r requirements.txt`
|
||||
|
||||
## `pyenv root`
|
||||
|
||||
Displays the root directory where versions and shims are kept.
|
||||
|
||||
$ pyenv root
|
||||
/home/user/.pyenv
|
||||
|
||||
## `pyenv prefix`
|
||||
|
||||
Displays the directory where a Python version is installed. If no
|
||||
version is given, `pyenv prefix` displays the location of the
|
||||
currently selected version.
|
||||
|
||||
$ pyenv prefix 3.9.7
|
||||
/home/user/.pyenv/versions/3.9.7
|
||||
|
||||
## `pyenv hooks`
|
||||
|
||||
Lists installed hook scripts for a given pyenv command.
|
||||
|
||||
Usage: pyenv hooks <command>
|
||||
|
||||
## `pyenv shims`
|
||||
|
||||
List existing pyenv shims.
|
||||
|
||||
Usage: pyenv shims [--short]
|
||||
|
||||
$ pyenv shims
|
||||
/home/user/.pyenv/shims/2to3
|
||||
/home/user/.pyenv/shims/2to3-3.9
|
||||
/home/user/.pyenv/shims/idle
|
||||
/home/user/.pyenv/shims/idle3
|
||||
/home/user/.pyenv/shims/idle3.9
|
||||
/home/user/.pyenv/shims/pip
|
||||
/home/user/.pyenv/shims/pip3
|
||||
/home/user/.pyenv/shims/pip3.9
|
||||
/home/user/.pyenv/shims/pydoc
|
||||
/home/user/.pyenv/shims/pydoc3
|
||||
/home/user/.pyenv/shims/pydoc3.9
|
||||
/home/user/.pyenv/shims/python
|
||||
/home/user/.pyenv/shims/python3
|
||||
/home/user/.pyenv/shims/python3.9
|
||||
/home/user/.pyenv/shims/python3.9-config
|
||||
/home/user/.pyenv/shims/python3.9-gdb.py
|
||||
/home/user/.pyenv/shims/python3-config
|
||||
/home/user/.pyenv/shims/python-config
|
||||
|
||||
## `pyenv init`
|
||||
|
||||
Configure the shell environment for pyenv
|
||||
|
||||
Usage: eval "$(pyenv init [-|--path] [--no-rehash] [<shell>])"
|
||||
|
||||
- Initialize shims directory, print PYENV_SHELL variable, completions path
|
||||
and shell function
|
||||
--path Print shims path
|
||||
--no-rehash Add no rehash command to output
|
||||
|
||||
## `pyenv completions`
|
||||
|
||||
Lists available completions for a given pyenv command.
|
||||
|
||||
Usage: pyenv completions <command> [arg1 arg2...]
|
||||
|
||||
324
README.md
324
README.md
@@ -2,8 +2,6 @@
|
||||
|
||||
[](https://gitter.im/yyuu/pyenv?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
[](https://travis-ci.org/pyenv/pyenv)
|
||||
|
||||
pyenv lets you easily switch between multiple versions of Python. It's
|
||||
simple, unobtrusive, and follows the UNIX tradition of single-purpose
|
||||
tools that do one thing well.
|
||||
@@ -14,13 +12,13 @@ This project was forked from [rbenv](https://github.com/rbenv/rbenv) and
|
||||

|
||||
|
||||
|
||||
### pyenv _does..._
|
||||
### what pyenv _does..._
|
||||
|
||||
* Let you **change the global Python version** on a per-user basis.
|
||||
* Provide support for **per-project Python versions**.
|
||||
* Allow you to **override the Python version** with an environment
|
||||
* Lets you **change the global Python version** on a per-user basis.
|
||||
* Provides support for **per-project Python versions**.
|
||||
* Allows you to **override the Python version** with an environment
|
||||
variable.
|
||||
* Search commands from **multiple versions of Python at a time**.
|
||||
* Searches for commands from **multiple versions of Python at a time**.
|
||||
This may be helpful to test across Python versions with [tox](https://pypi.python.org/pypi/tox).
|
||||
|
||||
|
||||
@@ -46,6 +44,10 @@ This project was forked from [rbenv](https://github.com/rbenv/rbenv) and
|
||||
* [Choosing the Python Version](#choosing-the-python-version)
|
||||
* [Locating the Python Installation](#locating-the-python-installation)
|
||||
* **[Installation](#installation)**
|
||||
* [Prerequisites](#prerequisites)
|
||||
* [Homebrew in macOS](#homebrew-in-macos)
|
||||
* [Windows](#windows)
|
||||
* [Automatic installer](#automatic-installer)
|
||||
* [Basic GitHub Checkout](#basic-github-checkout)
|
||||
* [Upgrading](#upgrading)
|
||||
* [Homebrew on macOS](#homebrew-on-macos)
|
||||
@@ -168,11 +170,11 @@ We'd recommend to install pyenv-virtualenv as well if you have some plan to play
|
||||
|
||||
## Installation
|
||||
|
||||
### Prerequisites:
|
||||
### Prerequisites
|
||||
|
||||
For pyenv to install python correctly you should [**install the Python build dependencies**](https://github.com/pyenv/pyenv/wiki#suggested-build-environment).
|
||||
|
||||
### Homebrew on macOS
|
||||
### Homebrew in macOS
|
||||
|
||||
1. Consider installing with [Homebrew](https://brew.sh):
|
||||
```sh
|
||||
@@ -181,9 +183,42 @@ For pyenv to install python correctly you should [**install the Python build dep
|
||||
```
|
||||
2. Then follow the rest of the post-installation steps under [Basic GitHub Checkout](https://github.com/pyenv/pyenv#basic-github-checkout), starting with #2 ("Configure your shell's environment for Pyenv").
|
||||
|
||||
If you're on Windows, consider using @kirankotari's [`pyenv-win`](https://github.com/pyenv-win/pyenv-win) fork. (Pyenv does not work in Windows outside the Windows Subsystem for Linux.)
|
||||
3. OPTIONAL. To fix `brew doctor`'s warning _""config" scripts exist outside your system or Homebrew directories"_
|
||||
|
||||
If you're going to build Homebrew formulae from source that link against `libpython`
|
||||
like Tkinter or NumPy
|
||||
_(This is only generally the case if you are a developer of such a formula,
|
||||
or if you have an EOL version of MacOS for which prebuilt bottles are no longer available
|
||||
and are using such a formula)._
|
||||
|
||||
To avoid them accidentally linking against a Pyenv-provided Python,
|
||||
add the following line into your interactive shell's configuration:
|
||||
|
||||
* Bash/Zsh:
|
||||
|
||||
~~~bash
|
||||
alias brew='env PATH="${PATH//$(pyenv root)\/shims:/}" brew'
|
||||
~~~
|
||||
|
||||
* Fish:
|
||||
|
||||
### The automatic installer
|
||||
~~~fish
|
||||
alias brew="env PATH=(string replace (pyenv root)/shims '' \"\$PATH\") brew"
|
||||
~~~
|
||||
|
||||
### Windows
|
||||
|
||||
Pyenv does not officially support Windows and does not work in Windows outside
|
||||
the Windows Subsystem for Linux.
|
||||
Moreover, even there, the Pythons it installs are not native Windows versions
|
||||
but rather Linux versions run through a compatibility layer --
|
||||
so you won't get Windows-specific functionality.
|
||||
|
||||
If you're in Windows, we recommend using @kirankotari's [`pyenv-win`](https://github.com/pyenv-win/pyenv-win) fork --
|
||||
which does install native Windows Python versions.
|
||||
|
||||
|
||||
### Automatic installer
|
||||
|
||||
Visit our other project:
|
||||
https://github.com/pyenv/pyenv-installer
|
||||
@@ -206,119 +241,168 @@ easy to fork and contribute any changes back upstream.
|
||||
|
||||
2. **Configure your shell's environment for Pyenv**
|
||||
|
||||
**Note:** The below instructions for specific shells are designed for common shell setups.
|
||||
If you have an uncommon setup and they don't work for you,
|
||||
use the guidance text and the [Advanced Configuration](#advanced-configuration)
|
||||
**Note:** The below instructions for specific shells are designed for common shell setups;
|
||||
they also install shell functions into interactive shells only.
|
||||
If you have an uncommon setup and/or needs and they don't work for you,
|
||||
use the [Advanced Configuration](#advanced-configuration)
|
||||
section below to figure out what you need to do in your specific case.
|
||||
|
||||
1. **Adjust the session-wide environment for your account.** Define
|
||||
the `PYENV_ROOT` environment variable to point to the path where
|
||||
you cloned the Pyenv repo, add the `pyenv` command-line utility to your `PATH`,
|
||||
run the output of `pyenv init --path` to enable shims.
|
||||
**General MacOS note:**
|
||||
[Make sure that your terminal app is configured to run the shell as a login shell](https://github.com/pyenv/pyenv/wiki/MacOS-login-shell)
|
||||
(especially if you're using an alternative terminal app and/or shell).
|
||||
The configuration samples for MacOS are written under this assumption and won't work otherwise.
|
||||
|
||||
These commands need to be added into your shell startup files in such a way
|
||||
that _they are executed only once per session, by its login shell._
|
||||
This typically means they need to be added into a per-user shell-specific
|
||||
`~/.*profile` file, _and_ into `~/.profile`, too, so that they are also
|
||||
run by GUI managers (which typically act as a `sh` login shell).
|
||||
- For **Bash**:
|
||||
|
||||
**MacOS note:** If you installed Pyenv with Homebrew, you don't need
|
||||
to add the `PYENV_ROOT=` and `PATH=` lines.
|
||||
You also don't need to add commands into `~/.profile` if your shell doesn't use it.
|
||||
|
||||
- For **bash**:
|
||||
- **If your `~/.profile` sources `~/.bashrc` (Debian, Ubuntu, Mint):**
|
||||
|
||||
~~~bash
|
||||
# the sed invocation inserts the lines at the start of the file
|
||||
# after any initial comment lines
|
||||
sed -Ei -e '/^([^#]|$)/ {a \
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
a \
|
||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
a \
|
||||
' -e ':a' -e '$!{n;ba};}' ~/.profile
|
||||
echo 'eval "$(pyenv init --path)"' >>~/.profile
|
||||
|
||||
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
|
||||
~~~
|
||||
|
||||
- **If your `~/.bash_profile` sources `~/.bashrc` (Red Hat, Fedora, CentOS):**
|
||||
|
||||
~~~ bash
|
||||
sed -Ei -e '/^([^#]|$)/ {a \
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
a \
|
||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
a \
|
||||
' -e ':a' -e '$!{n;ba};}' ~/.bash_profile
|
||||
echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile
|
||||
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
|
||||
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
|
||||
echo 'eval "$(pyenv init --path)"' >> ~/.profile
|
||||
|
||||
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
|
||||
~~~
|
||||
|
||||
- **If your `~/.profile` sources `~/.bashrc` (Debian, Ubuntu, Mint):**
|
||||
- **If you have no `~/.bash_profile` and your `/etc/profile` sources `~/.bashrc` (SUSE):**
|
||||
|
||||
Put these lines into `~/.profile` _before_ the part that sources `~/.bashrc`:
|
||||
~~~bash
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init --path)"
|
||||
~~~
|
||||
~~~bash
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
|
||||
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
|
||||
echo 'eval "$(pyenv init --path)"' >> ~/.profile
|
||||
|
||||
<!--This is an alternative option and needn't be replicated to `pyenv init`-->
|
||||
Alternatively, for an automated installation, you can run the following:
|
||||
~~~ bash
|
||||
echo -e 'if shopt -q login_shell; then' \
|
||||
'\n export PYENV_ROOT="$HOME/.pyenv"' \
|
||||
'\n export PATH="$PYENV_ROOT/bin:$PATH"' \
|
||||
'\n eval "$(pyenv init --path)"' \
|
||||
'\nfi' >> ~/.bashrc
|
||||
echo -e 'if [ -z "$BASH_VERSION" ]; then'\
|
||||
'\n export PYENV_ROOT="$HOME/.pyenv"'\
|
||||
'\n export PATH="$PYENV_ROOT/bin:$PATH"'\
|
||||
'\n eval "$(pyenv init --path)"'\
|
||||
'\nfi' >>~/.profile
|
||||
~~~
|
||||
echo 'if command -v pyenv >/dev/null; then eval "$(pyenv init -)"; fi' >> ~/.bashrc
|
||||
~~~
|
||||
|
||||
- **Otherwise if you have no stock `~/.profile` or `~/.bash_profile` (MacOS):**
|
||||
|
||||
~~~bash
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
|
||||
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
|
||||
echo 'eval "$(pyenv init --path)"' >> ~/.profile
|
||||
echo 'if [ -n "$PS1" -a -n "$BASH_VERSION" ]; then source ~/.bashrc; fi' >> ~/.profile
|
||||
|
||||
**Note:** If you have `~/.bash_profile`, make sure that it too executes the above-added commands,
|
||||
e.g. by copying them there or by `source`'ing `~/.profile`.
|
||||
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
|
||||
~~~
|
||||
|
||||
- For **Zsh**:
|
||||
In MacOS, make sure that your terminal app runs the shell as a login shell.
|
||||
|
||||
Same as for Bash above, but add the commands into both `~/.profile`
|
||||
and `~/.zprofile`.
|
||||
- **Temporary environments (CI, Docker, batch jobs):**
|
||||
|
||||
In CI/build environments, paths and the environment are usually already set up for you
|
||||
in one of the above ways.
|
||||
You may only need to install Pyenv as a shell function into the (noninteractive) shell
|
||||
that runs the batch script, and only if you need subcommands that require `pyenv`
|
||||
to be a shell function (e.g. `shell` and Pyenv-Virtualenv's `activate`).
|
||||
|
||||
~~~bash
|
||||
echo 'eval "$(pyenv init -)"'
|
||||
~~~
|
||||
|
||||
If you are installing Pyenv yourself as part of the batch job,
|
||||
after installing the files, run the following in the job's shell
|
||||
to be able to use it.
|
||||
|
||||
~~~bash
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
export PATH="$PYENV_ROOT/bin:$PATH" # if `pyenv` is not already on PATH
|
||||
eval "$(pyenv init --path)"
|
||||
eval "$(pyenv init -)"
|
||||
~~~
|
||||
|
||||
|
||||
**General Bash warning**: There are some systems where the `BASH_ENV` variable is configured
|
||||
to point to `.bashrc`. On such systems, you should almost certainly put the
|
||||
`eval "$(pyenv init -)"` line into `.bash_profile`, and **not** into `.bashrc`. Otherwise, you
|
||||
may observe strange behaviour, such as `pyenv` getting into an infinite loop.
|
||||
See [#264](https://github.com/pyenv/pyenv/issues/264) for details.
|
||||
|
||||
|
||||
- For **Zsh**:
|
||||
|
||||
- **MacOS, if Pyenv is installed with Homebrew:**
|
||||
|
||||
~~~ zsh
|
||||
echo 'eval "$(pyenv init --path)"' >> ~/.zprofile
|
||||
|
||||
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
|
||||
~~~
|
||||
|
||||
Make sure that your terminal app runs the shell as a login shell.
|
||||
|
||||
|
||||
- **MacOS, if Pyenv is installed with a Git checkout:**
|
||||
|
||||
~~~ zsh
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zprofile
|
||||
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zprofile
|
||||
echo 'eval "$(pyenv init --path)"' >> ~/.zprofile
|
||||
|
||||
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
|
||||
~~~
|
||||
|
||||
Make sure that your terminal app runs the shell as a login shell.
|
||||
|
||||
- **Other OSes:**
|
||||
|
||||
~~~ zsh
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zprofile
|
||||
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zprofile
|
||||
echo 'eval "$(pyenv init --path)"' >> ~/.zprofile
|
||||
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
|
||||
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
|
||||
echo 'eval "$(pyenv init --path)"' >> ~/.profile
|
||||
|
||||
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
|
||||
~~~
|
||||
|
||||
- For **Fish shell**:
|
||||
- For **Fish shell**:
|
||||
|
||||
Execute this interactively:
|
||||
|
||||
~~~ fish
|
||||
set -Ux PYENV_ROOT $HOME/.pyenv
|
||||
set -U fish_user_paths $PYENV_ROOT/bin $fish_user_paths
|
||||
~~~
|
||||
|
||||
And add this to `~/.config/fish/config.fish`:
|
||||
|
||||
~~~ fish
|
||||
status is-login; and pyenv init --path | source
|
||||
status is-interactive; and pyenv init - | source
|
||||
~~~
|
||||
|
||||
If Fish is not your login shell, also follow the Bash/Zsh instructions to add to `~/.profile`.
|
||||
|
||||
**Proxy note**: If you use a proxy, export `http_proxy` and `https_proxy`, too.
|
||||
|
||||
2. **Add `pyenv` into your shell** by running the output of `pyenv init -`
|
||||
to enable autocompletion and all subcommands.
|
||||
|
||||
This command needs to run at startup of any interactive shell instance.
|
||||
In an interactive login shell, it needs to run _after_ the commands
|
||||
from the previous step.
|
||||
|
||||
- For **bash**:
|
||||
~~~ bash
|
||||
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
|
||||
~~~
|
||||
|
||||
- **If your `/etc/profile` sources `~/.bashrc` (SUSE):**
|
||||
|
||||
~~~bash
|
||||
echo 'if command -v pyenv >/dev/null; then eval "$(pyenv init -)"; done' >> ~/.bashrc
|
||||
~~~
|
||||
|
||||
- For **Zsh**:
|
||||
~~~ zsh
|
||||
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
|
||||
~~~
|
||||
|
||||
- For **Fish shell**:
|
||||
Add this to `~/.config/fish/config.fish`:
|
||||
~~~ fish
|
||||
pyenv init - | source
|
||||
~~~
|
||||
|
||||
**General warning**: There are some systems where the `BASH_ENV` variable is configured
|
||||
to point to `.bashrc`. On such systems you should almost certainly put the above-mentioned line
|
||||
`eval "$(pyenv init -)"` into `.bash_profile`, and **not** into `.bashrc`. Otherwise you
|
||||
may observe strange behaviour, such as `pyenv` getting into an infinite loop.
|
||||
See [#264](https://github.com/pyenv/pyenv/issues/264) for details.
|
||||
|
||||
4. **Restart your login session for the changes to take effect.**
|
||||
4. **Restart your login session for the changes to profile files to take effect.**
|
||||
E.g. if you're in a GUI session, you need to fully log out and log back in.
|
||||
|
||||
In MacOS, restarting terminal windows is enough (because MacOS runs shells
|
||||
@@ -404,30 +488,52 @@ profile is doing.
|
||||
|
||||
`pyenv init` is the only command that crosses the line of loading
|
||||
extra commands into your shell. Coming from RVM, some of you might be
|
||||
opposed to this idea. Here's what `pyenv init` actually does.
|
||||
Step 1 is done by `eval "$(pyenv init --path)"`, the others are done by
|
||||
`eval "$(pyenv init -)"`.
|
||||
opposed to this idea.
|
||||
|
||||
Also see the [Environment variables](#environment-variables) section
|
||||
for the environment variables that control Pyenv's behavior.
|
||||
|
||||
|
||||
1. **Sets up your shims path.** This is the only requirement for pyenv to
|
||||
function properly. You can do this by hand by prepending
|
||||
`$(pyenv root)/shims` to your `$PATH`.
|
||||
* `eval "$(pyenv init --path)"`:
|
||||
|
||||
2. **Installs autocompletion.** This is entirely optional but pretty
|
||||
useful. Sourcing `$(pyenv root)/completions/pyenv.bash` will set that
|
||||
up. There is also a `$(pyenv root)/completions/pyenv.zsh` for Zsh
|
||||
users.
|
||||
1. **Sets up your shims path.** This is the only requirement for pyenv to
|
||||
function properly. You can do this by hand by prepending
|
||||
`$(pyenv root)/shims` to your `$PATH`.
|
||||
|
||||
`eval "$(pyenv init --path)"` is supposed to be run in your session's login
|
||||
shell startup script -- so that all processes in the session get access to
|
||||
Pyenv's functionality and it only runs once,
|
||||
avoiding breaking `PATH` in nested shells
|
||||
(e.g. shells started from editors/IDEs).
|
||||
|
||||
In Linux, GUI managers typically act as a `sh` login shell, running
|
||||
`/etc/profile` and `~/.profile` at their startup. MacOS' GUI doesn't do that,
|
||||
so its terminal emulator apps run their shells as login shells by default
|
||||
to compensate.
|
||||
|
||||
3. **Rehashes shims.** From time to time you'll need to rebuild your
|
||||
shim files. Doing this on init makes sure everything is up to
|
||||
date. You can always run `pyenv rehash` manually.
|
||||
|
||||
4. **Installs the sh dispatcher.** This bit is also optional, but allows
|
||||
pyenv and plugins to change variables in your current shell, making
|
||||
commands like `pyenv shell` possible. The sh dispatcher doesn't do
|
||||
anything crazy like override `cd` or hack your shell prompt, but if
|
||||
for some reason you need `pyenv` to be a real script rather than a
|
||||
shell function, you can safely skip it.
|
||||
* `eval "$(pyenv init -)"`:
|
||||
|
||||
1. **Installs autocompletion.** This is entirely optional but pretty
|
||||
useful. Sourcing `$(pyenv root)/completions/pyenv.bash` will set that
|
||||
up. There is also a `$(pyenv root)/completions/pyenv.zsh` for Zsh
|
||||
users.
|
||||
|
||||
2. **Rehashes shims.** From time to time you'll need to rebuild your
|
||||
shim files. Doing this on init makes sure everything is up to
|
||||
date. You can always run `pyenv rehash` manually.
|
||||
|
||||
3. **Installs `pyenv` into the current shell as a shell function.**
|
||||
This bit is also optional, but allows
|
||||
pyenv and plugins to change variables in your current shell, making
|
||||
commands like `pyenv shell` possible. The sh dispatcher doesn't do
|
||||
anything crazy like override `cd` or hack your shell prompt, but if
|
||||
for some reason you need `pyenv` to be a real script rather than a
|
||||
shell function, you can safely skip it.
|
||||
|
||||
`eval "$(pyenv init -)"` is supposed to run at any interactive shell's
|
||||
startup (including nested shells) so that you get completion and
|
||||
convenience shell functions.
|
||||
|
||||
To see exactly what happens under the hood for yourself, run `pyenv init -`
|
||||
or `pyenv init --path`.
|
||||
|
||||
@@ -80,9 +80,13 @@ bin_path="$(abs_dirname "$0")"
|
||||
for plugin_bin in "${bin_path%/*}"/plugins/*/bin; do
|
||||
PATH="${plugin_bin}:${PATH}"
|
||||
done
|
||||
for plugin_bin in "${PYENV_ROOT}"/plugins/*/bin; do
|
||||
PATH="${plugin_bin}:${PATH}"
|
||||
done
|
||||
# PYENV_ROOT can be set to anything, so it may happen to be equal to the base path above,
|
||||
# resulting in duplicate PATH entries
|
||||
if [ "${bin_path%/*}" != "$PYENV_ROOT" ]; then
|
||||
for plugin_bin in "${PYENV_ROOT}"/plugins/*/bin; do
|
||||
PATH="${plugin_bin}:${PATH}"
|
||||
done
|
||||
fi
|
||||
export PATH="${bin_path}:${PATH}"
|
||||
|
||||
PYENV_HOOK_PATH="${PYENV_HOOK_PATH}:${PYENV_ROOT}/pyenv.d"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
version="2.0.0-rc1"
|
||||
version="2.2.0"
|
||||
git_revision=""
|
||||
|
||||
if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q pyenv; then
|
||||
|
||||
@@ -44,8 +44,9 @@ extract_initial_comment_block() {
|
||||
}
|
||||
|
||||
collect_documentation() {
|
||||
# shellcheck disable=SC2016
|
||||
$(type -P gawk awk | head -1) '
|
||||
# `tail` prevents "broken pipe" errors due to `head` closing thge pipe without reading everything
|
||||
# https://superuser.com/questions/554855/how-can-i-fix-a-broken-pipe-error/642932#642932
|
||||
$(type -P gawk awk | tail -n +1 | head -1) '
|
||||
/^Summary:/ {
|
||||
summary = substr($0, 10)
|
||||
next
|
||||
|
||||
@@ -61,7 +61,6 @@ function main() {
|
||||
;;
|
||||
"print")
|
||||
init_dirs
|
||||
warn_path
|
||||
print_env
|
||||
print_completion
|
||||
print_shell_function
|
||||
@@ -94,68 +93,9 @@ function help_() {
|
||||
|
||||
{
|
||||
echo
|
||||
echo '# (The below instructions are intended for common'
|
||||
echo '# shell setups. See the README for more guidance'
|
||||
echo '# if they don'\''t apply and/or don'\''t work for you.)'
|
||||
echo '# See the README for instructions on how to set up'
|
||||
echo '# your shell environment for Pyenv.'
|
||||
echo
|
||||
case "$shell" in
|
||||
fish )
|
||||
echo "# Add pyenv executable to PATH by running"
|
||||
echo "# the following interactively:"
|
||||
echo
|
||||
echo 'set -Ux PYENV_ROOT $HOME/.pyenv'
|
||||
echo 'set -U fish_user_paths $PYENV_ROOT/bin $fish_user_paths'
|
||||
echo
|
||||
echo "# Load pyenv automatically by appending"
|
||||
echo "# the following to ~/.config/fish/config.fish:"
|
||||
echo
|
||||
echo 'status is-login; and pyenv init --path | source'
|
||||
echo 'pyenv init - | source'
|
||||
echo
|
||||
echo "# If fish is not your login shell,"
|
||||
echo "# add the following to ~/.profile:"
|
||||
echo
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv"'
|
||||
echo 'export PATH="$PYENV_ROOT/bin:$PATH"'
|
||||
echo 'eval "$(pyenv init --path)"'
|
||||
echo
|
||||
;;
|
||||
* )
|
||||
echo '# Add pyenv executable to PATH and'
|
||||
echo '# enable shims by adding the following'
|
||||
case "$shell" in
|
||||
bash|ksh )
|
||||
echo '# to ~/.profile:'
|
||||
;;
|
||||
* )
|
||||
echo '# to ~/.profile and '"${profile}"':'
|
||||
;;
|
||||
esac
|
||||
echo
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv"'
|
||||
echo 'export PATH="$PYENV_ROOT/bin:$PATH"'
|
||||
echo 'eval "$(pyenv init --path)"'
|
||||
echo
|
||||
if [[ $shell == "bash" ]]; then
|
||||
echo '# If your ~/.profile sources '"${rc}"','
|
||||
echo '# the lines need to be inserted before the part'
|
||||
echo '# that does that. See the README for another option.'
|
||||
echo
|
||||
echo '# If you have '"${profile}"', make sure that it'
|
||||
echo '# also executes the above lines -- e.g. by'
|
||||
echo '# copying them there or by sourcing ~/.profile'
|
||||
echo
|
||||
fi
|
||||
echo "# Load pyenv into the shell by adding"
|
||||
echo "# the following to ${rc}:"
|
||||
echo
|
||||
echo 'eval "$(pyenv init -)"'
|
||||
echo
|
||||
echo '# Make sure to restart your entire logon session'
|
||||
echo '# for changes to profile files to take effect.'
|
||||
echo
|
||||
;;
|
||||
esac
|
||||
} >&2
|
||||
}
|
||||
|
||||
@@ -175,13 +115,6 @@ function print_path() {
|
||||
esac
|
||||
}
|
||||
|
||||
function warn_path() {
|
||||
if ! perl -ls0x3A -e 'while (<>) { chomp; ($_ eq $d) && exit 0; } exit 1' -- -d="${PYENV_ROOT}/shims" <<<"$PATH" ; then
|
||||
echo 'echo '\''WARNING: `pyenv init -` no longer sets PATH.'\'
|
||||
echo 'echo '\''Run `pyenv init` to see the necessary changes to make to your configuration.'\'
|
||||
fi
|
||||
}
|
||||
|
||||
function print_env() {
|
||||
case "$shell" in
|
||||
fish )
|
||||
|
||||
@@ -33,7 +33,9 @@ OLDIFS="$IFS"
|
||||
if PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python 2>/dev/null)" || \
|
||||
PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python3 2>/dev/null)" || \
|
||||
PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python2 2>/dev/null)"; then
|
||||
PYENV_PREFIX_PATH="${PYTHON_PATH%/bin/*}"
|
||||
shopt -s extglob
|
||||
# In some distros (Arch), Python can be found in sbin as well as bin
|
||||
PYENV_PREFIX_PATH="${PYTHON_PATH%/?(s)bin/*}"
|
||||
PYENV_PREFIX_PATH="${PYENV_PREFIX_PATH:-/}"
|
||||
else
|
||||
echo "pyenv: system version not found in PATH" >&2
|
||||
|
||||
@@ -69,7 +69,7 @@ if [ -z "$FORCE" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
read -p "pyenv: remove $PREFIX? [y|N]"
|
||||
read -p "pyenv: remove $PREFIX? [y|N] "
|
||||
case "$REPLY" in
|
||||
y | Y | yes | YES ) ;;
|
||||
* ) exit 1 ;;
|
||||
|
||||
@@ -112,6 +112,13 @@ is_mac() {
|
||||
[ $# -eq 0 ] || [ "$(osx_version)" "$@" ]
|
||||
}
|
||||
|
||||
is_arm64_apple() {
|
||||
if [ "$(uname -s)" = "Darwin" ] && [ "$(uname -m)" = "arm64" ]; then
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
# 9.1 -> 901
|
||||
# 10.9 -> 1009
|
||||
# 10.10 -> 1010
|
||||
@@ -130,13 +137,13 @@ build_failed() {
|
||||
|
||||
if ! rmdir "${BUILD_PATH}" 2>/dev/null; then
|
||||
echo "Inspect or clean up the working tree at ${BUILD_PATH}"
|
||||
fi
|
||||
|
||||
if file_is_not_empty "$LOG_PATH"; then
|
||||
colorize 33 "Results logged to ${LOG_PATH}"
|
||||
printf "\n\n"
|
||||
echo "Last 10 log lines:"
|
||||
tail -n 10 "$LOG_PATH"
|
||||
fi
|
||||
if file_is_not_empty "$LOG_PATH"; then
|
||||
colorize 33 "Results logged to ${LOG_PATH}"
|
||||
printf "\n\n"
|
||||
echo "Last 10 log lines:"
|
||||
tail -n 10 "$LOG_PATH"
|
||||
fi
|
||||
} >&3
|
||||
exit 1
|
||||
@@ -417,8 +424,8 @@ fetch_tarball() {
|
||||
fi
|
||||
|
||||
if ! reuse_existing_tarball "$package_filename" "$checksum"; then
|
||||
local tarball_filename="$(basename "$package_url")"
|
||||
echo "Downloading ${tarball_filename}..." >&2
|
||||
# Report the cached file name -- sometimes, it's useful to know (#1743)
|
||||
echo "Downloading ${package_filename}..." >&2
|
||||
http head "$mirror_url" &&
|
||||
download_tarball "$mirror_url" "$package_filename" "$checksum" ||
|
||||
download_tarball "$package_url" "$package_filename" "$checksum"
|
||||
@@ -766,9 +773,13 @@ build_package_standard_build() {
|
||||
local PACKAGE_CFLAGS="${package_var_name}_CFLAGS"
|
||||
|
||||
if [ "$package_var_name" = "PYTHON" ]; then
|
||||
use_homebrew_readline || use_freebsd_pkg || true
|
||||
use_homebrew || true
|
||||
use_tcltk || true
|
||||
use_homebrew_readline || use_freebsd_pkg || true
|
||||
if is_mac -ge 1014; then
|
||||
use_xcode_sdk_zlib || use_homebrew_zlib || true
|
||||
else
|
||||
use_homebrew_zlib || true
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -850,8 +861,8 @@ build_package_jython_builder() {
|
||||
( cd "dist" && build_package_jython )
|
||||
}
|
||||
|
||||
build_package_pyston() {
|
||||
# currently supported version 2.2 and upper
|
||||
build_package_pyston2_2() {
|
||||
# currently supported version 2.2 and 2.3
|
||||
build_package_copy
|
||||
mkdir -p "${PREFIX_PATH}/bin" "${PREFIX_PATH}/lib"
|
||||
local bin
|
||||
@@ -868,6 +879,11 @@ build_package_pyston() {
|
||||
shopt -u nullglob
|
||||
}
|
||||
|
||||
build_package_pyston() {
|
||||
# currently supported version 2.3.1v2 and higher
|
||||
build_package_copy
|
||||
}
|
||||
|
||||
build_package_ironpython() {
|
||||
mkdir -p "${PREFIX_PATH}/bin"
|
||||
cp -fR . "${PREFIX_PATH}/bin"
|
||||
@@ -989,7 +1005,7 @@ activepython_architecture() {
|
||||
"Darwin" ) echo "macosx10.9-i386-x86_64" ;;
|
||||
"Linux" )
|
||||
case "$(uname -m)" in
|
||||
"i368" | "i486" | "i586" | "i686" | "i786" ) echo "linux-x86" ;;
|
||||
"i386" | "i486" | "i586" | "i686" | "i786" ) echo "linux-x86" ;;
|
||||
"x86_64" ) echo "linux-x86_64" ;;
|
||||
* ) return 1 ;;
|
||||
esac
|
||||
@@ -1034,7 +1050,9 @@ build_package_anaconda() {
|
||||
|
||||
build_package_miniconda() {
|
||||
build_package_anaconda "$@"
|
||||
"${PREFIX_PATH}/bin/conda" install --yes "pip"
|
||||
# Workaround to not upgrade conda when installing pip
|
||||
# see https://github.com/pyenv/pyenv/issues/2070
|
||||
"${PREFIX_PATH}/bin/conda" install --yes "pip" "conda=$(${PREFIX_PATH}/bin/conda --version | cut -d ' ' -f 2)"
|
||||
}
|
||||
|
||||
build_package_copy() {
|
||||
@@ -1310,6 +1328,19 @@ configured_with_package_dir() {
|
||||
return 1
|
||||
}
|
||||
|
||||
use_homebrew() {
|
||||
# unless Homebrew is at the default /usr/local, need to add its paths to
|
||||
# compiler search to be able to use non-keg-only deps from there
|
||||
if command -v brew &>/dev/null; then
|
||||
local brew_prefix="$(brew --prefix 2>/dev/null || true)"
|
||||
# /usr/local/lib:/usr/lib is the default library search path
|
||||
if [[ -n $brew_prefix && $brew_prefix != "/usr" && $brew_prefix != "/usr/local" ]]; then
|
||||
export CPPFLAGS="${CPPFLAGS:+${CPPFLAGS% } }-I${brew_prefix}/include"
|
||||
export LDFLAGS="${LDFLAGS:+${LDFLAGS% } }-L${brew_prefix}/lib"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
needs_yaml() {
|
||||
! configured_with_package_dir "python" "yaml.h" &&
|
||||
! use_homebrew_yaml
|
||||
@@ -1516,6 +1547,99 @@ use_xcode_sdk_zlib() {
|
||||
fi
|
||||
}
|
||||
|
||||
use_homebrew_tcltk() {
|
||||
# get the version from the folder that homebrew versions
|
||||
local tcltk_libdir="$(brew --prefix tcl-tk 2>/dev/null || true)"
|
||||
if [ -d "$tcltk_libdir" ]; then
|
||||
echo "python-build: use tcl-tk from homebrew"
|
||||
local tcltk_version="$(sh -c '. '"$tcltk_libdir"'/lib/tclConfig.sh; echo $TCL_VERSION')"
|
||||
package_option python configure --with-tcltk-libs="-L$tcltk_libdir/lib -ltcl$tcltk_version -ltk$tcltk_version"
|
||||
package_option python configure --with-tcltk-includes="-I$tcltk_libdir/include"
|
||||
fi
|
||||
}
|
||||
|
||||
# FIXME: this function is a workaround for #1125
|
||||
# once fixed, it should be removed.
|
||||
use_custom_tcltk() {
|
||||
local tcltk_ops="$1"
|
||||
local tcltk_ops_flag="--with-tcltk-libs="
|
||||
# get tcltk libs
|
||||
local tcltk_libs="${tcltk_ops//$tcltk_ops_flag/}"
|
||||
# remove tcltk-flag from configure_opts
|
||||
# this allows for weird input such as
|
||||
# --with-tcltk-libs=' -L/custom-tcl-tk/lib -ltcl8.6 -ltk8.4 '
|
||||
PYTHON_CONFIGURE_OPTS="${PYTHON_CONFIGURE_OPTS//"$tcltk_ops_flag"/}"
|
||||
PYTHON_CONFIGURE_OPTS="${PYTHON_CONFIGURE_OPTS//$tcltk_libs/}"
|
||||
|
||||
# remove quotes, because there mess up compilations
|
||||
PYTHON_CONFIGURE_OPTS="${PYTHON_CONFIGURE_OPTS//"''"/}"
|
||||
PYTHON_CONFIGURE_OPTS="${PYTHON_CONFIGURE_OPTS//'""'/}"
|
||||
|
||||
echo "python-build: use tcl-tk from \$PYTHON_CONFIGURE_OPTS"
|
||||
# echo "PYTHON_CONFIGURE_OPTS=${PYTHON_CONFIGURE_OPTS}"
|
||||
package_option python configure --with-tcltk-libs="${tcltk_libs}"
|
||||
# IFS="$OLDIFS"
|
||||
}
|
||||
|
||||
# FIXME: this function is a workaround for #1125
|
||||
# once fixed, it should be removed.
|
||||
# Get tcltk-flag and options from `$1`
|
||||
# expects one argument containing a string of configure opts, eg. `PYTHON_CONFIGURE_OPTS`
|
||||
# returns tcl_tk flag or an empty string if nothing was found.
|
||||
get_tcltk_flag_from() {
|
||||
IFS=$'\n'
|
||||
# parse input string into array
|
||||
local opts_arr=( $(xargs -n1 <<<"$1") )
|
||||
|
||||
# iterate through `opts_arr`, break if `--with-tcltk-libs=` was found.
|
||||
for opts in ${opts_arr[@]}; do
|
||||
# `--with-tcltk-libs=` must be the prefix.
|
||||
if [[ "$opts" == "--with-tcltk-libs="* ]]; then
|
||||
# return
|
||||
echo "$opts"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
IFS="$OLDIFS"
|
||||
}
|
||||
|
||||
use_tcltk() {
|
||||
local tcltk_libdir="$(brew --prefix tcl-tk 2>/dev/null || true)"
|
||||
local tcl_tk_libs="$(get_tcltk_flag_from "$PYTHON_CONFIGURE_OPTS")"
|
||||
|
||||
# if tcltk_ops_flag is in PYTHON_CONFIGURE_OPTS, use user provided tcltk
|
||||
# otherwise default to homebrew-installed tcl-tk, if installed
|
||||
if [[ -n "$tcl_tk_libs" ]]; then
|
||||
use_custom_tcltk "$tcl_tk_libs"
|
||||
elif [ -d "$tcltk_libdir" ]; then
|
||||
use_homebrew_tcltk
|
||||
fi
|
||||
}
|
||||
|
||||
# CPython 3.9.1+ and 3.8.10+ have old config.sub that doesn't support "arm64" arch
|
||||
# which is what Gnu uname (but not Apple uname) produces on Apple M1
|
||||
# (https://github.com/pyenv/pyenv/pull/2020#issuecomment-891911842)
|
||||
build_package_arm64_apple_disable_homebrew_coreutils() {
|
||||
if is_arm64_apple; then
|
||||
local brew_coreutils="$(brew --prefix coreutils 2>/dev/null || true)"
|
||||
if [ -d "$brew_coreutils" ]; then
|
||||
local after_list=()
|
||||
# Bash 3 ignores IFS set for command when doing expansions so have to set it separately
|
||||
IFS=':'; local -a list=(${PATH}); IFS="$OLDIFS"
|
||||
for str in "${list[@]}"; do
|
||||
if [[ "$str" != "$brew_coreutils"/* ]]; then
|
||||
after_list+=("$str")
|
||||
else
|
||||
echo "python-build: excluding \`$str' from PATH"
|
||||
fi
|
||||
done
|
||||
# Bash 3 ignores IFS set for command when doing expansions so have to set it separately
|
||||
IFS=':'; export PATH="${after_list[*]}"; IFS="$OLDIFS"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
build_package_enable_shared() {
|
||||
package_option python configure --enable-shared
|
||||
}
|
||||
@@ -1547,7 +1671,7 @@ apply_python_patch() {
|
||||
}
|
||||
|
||||
build_package_symlink_version_suffix() {
|
||||
if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then
|
||||
if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then
|
||||
if [ -e "${PREFIX_PATH}/bin" ]; then
|
||||
# Always create `bin` as symlink to framework path if the version was built with `--enable-frameowrk` (#590)
|
||||
rm -rf "${PREFIX_PATH}/bin.orig"
|
||||
@@ -1996,7 +2120,7 @@ fi
|
||||
package_option python configure --libdir="${PREFIX_PATH}/lib"
|
||||
|
||||
# python-build: Set `RPATH` if `--enable-shared` was given (#65, #66, #82)
|
||||
if [[ "$CONFIGURE_OPTS" == *"--enable-shared"* ]] || [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-shared"* ]]; then
|
||||
if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" == *"--enable-shared"* ]]; then
|
||||
# The ld on Darwin embeds the full paths to each dylib by default
|
||||
if [[ "$LDFLAGS" != *"-rpath="* ]] && ! is_mac; then
|
||||
export LDFLAGS="-Wl,-rpath=${PREFIX_PATH}/lib ${LDFLAGS}"
|
||||
@@ -2009,7 +2133,7 @@ if [[ "$PYPY_OPTS" == *"--shared"* ]]; then
|
||||
fi
|
||||
|
||||
# Add support for framework installation (`--enable-framework`) of CPython (#55, #99)
|
||||
if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then
|
||||
if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then
|
||||
if ! is_mac; then
|
||||
echo "python-build: framework installation is not supported." >&2
|
||||
exit 1
|
||||
@@ -2029,13 +2153,21 @@ if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-framework"* ]]; then
|
||||
package_option python configure --enable-framework="${PREFIX_PATH}/Library/Frameworks"
|
||||
fi
|
||||
|
||||
# Build against universal SDK (#219, #220)
|
||||
if [[ "$PYTHON_CONFIGURE_OPTS" == *"--enable-universalsdk"* ]]; then
|
||||
# Build against universal SDK
|
||||
if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" == *"--enable-universalsdk"* ]]; then
|
||||
if ! is_mac; then
|
||||
echo "python-build: universal installation is not supported." >&2
|
||||
exit 1
|
||||
fi
|
||||
package_option python configure --enable-universalsdk=/ --with-universal-archs=intel
|
||||
package_option python configure --enable-universalsdk=/
|
||||
if [[ "$CONFIGURE_OPTS $PYTHON_CONFIGURE_OPTS" != *"--enable-universal-archs"* ]]; then
|
||||
# in CPython's configure.ac, --with-universal-archs defaults to 'intel' which means i386 + x86_64
|
||||
# since 2.7.5 and 3.3.0 -- i.e. in all non-EOL versions
|
||||
# Apple Silicon cannot build these, in it, it rather makes sense to default to Universal2 binaries
|
||||
if [[ $(arch) == "arm64" ]]; then
|
||||
package_option python configure --with-universal-archs=universal2
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Compile with `--enable-unicode=ucs4` by default (#257)
|
||||
@@ -2053,19 +2185,6 @@ if [[ "$PYTHON_CONFIGURE_OPTS" != *"--enable-unicode="* ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# regex_to_match="(--with-tcltk-libs='([^']+)')"
|
||||
if [[ "$PYTHON_CONFIGURE_OPTS" =~ (--with-tcltk-libs=\'([^\']+)\') ]]; then
|
||||
tcltk_match="${BASH_REMATCH[1]}"
|
||||
tcltk_match_quoted="${tcltk_match//--with-tcltk-libs=/}"
|
||||
# remove it from PYTHON_CONFIGURE_OPTS since it will mess up compile
|
||||
PYTHON_CONFIGURE_OPTS="${PYTHON_CONFIGURE_OPTS//$tcltk_match/}"
|
||||
|
||||
# having issues passing the single quoted part, couldnt pass as single var and still work
|
||||
package_option python configure "--with-tcltk-libs='${tcltk_match_quoted}'"
|
||||
unset tcltk_match
|
||||
unset tcltk_match_quoted
|
||||
fi
|
||||
|
||||
# Unset `PIP_REQUIRE_VENV` during build (#216)
|
||||
unset PIP_REQUIRE_VENV
|
||||
unset PIP_REQUIRE_VIRTUALENV
|
||||
|
||||
@@ -44,7 +44,7 @@ esac
|
||||
|
||||
install_line_fmt = """
|
||||
"{os}-{arch}" )
|
||||
install_script "Miniconda{suffix}-{version_str}-{os}-{arch}" "{repo}/Miniconda{suffix}-{version_str}-{os}-{arch}.sh#{md5}" "miniconda" verify_{py_version}
|
||||
install_script "Miniconda{suffix}-{version_py_version}{version_str}-{os}-{arch}" "{repo}/Miniconda{suffix}-{version_py_version}{version_str}-{os}-{arch}.sh#{md5}" "miniconda" verify_{py_version}
|
||||
;;
|
||||
""".strip()
|
||||
|
||||
@@ -126,17 +126,29 @@ class VersionStr(str):
|
||||
class MinicondaVersion(NamedTuple):
|
||||
suffix: Suffix
|
||||
version_str: VersionStr
|
||||
py_version: Optional[PyVersion]
|
||||
|
||||
@classmethod
|
||||
def from_str(cls, s):
|
||||
miniconda_n, ver = s.split("-")
|
||||
return MinicondaVersion(Suffix(miniconda_n[-1]), VersionStr(ver))
|
||||
components = s.split("-")
|
||||
if len(components) == 3:
|
||||
miniconda_n, py_ver, ver = components
|
||||
py_ver = PyVersion(f"py{py_ver.replace('.', '')}")
|
||||
else:
|
||||
miniconda_n, ver = components
|
||||
py_ver = None
|
||||
return MinicondaVersion(Suffix(miniconda_n[-1]), VersionStr(ver), py_ver)
|
||||
|
||||
def to_filename(self):
|
||||
return f"miniconda{self.suffix}-{self.version_str}"
|
||||
if self.py_version:
|
||||
return f"miniconda{self.suffix}-{self.py_version.version()}-{self.version_str}"
|
||||
else:
|
||||
return f"miniconda{self.suffix}-{self.version_str}"
|
||||
|
||||
def default_py_version(self):
|
||||
if self.suffix == Suffix.TWO:
|
||||
if self.py_version:
|
||||
return self.py_version
|
||||
elif self.suffix == Suffix.TWO:
|
||||
return PyVersion.PY27
|
||||
elif self.version_str.info() < (4, 7):
|
||||
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-python.html
|
||||
@@ -146,7 +158,7 @@ class MinicondaVersion(NamedTuple):
|
||||
|
||||
def with_version_triple(self):
|
||||
return MinicondaVersion(
|
||||
self.suffix, VersionStr.from_info(self.version_str.info()[:3])
|
||||
self.suffix, VersionStr.from_info(self.version_str.info()[:3]), self.py_version
|
||||
)
|
||||
|
||||
|
||||
@@ -160,8 +172,13 @@ class MinicondaSpec(NamedTuple):
|
||||
@classmethod
|
||||
def from_filestem(cls, stem, md5, py_version=None):
|
||||
miniconda_n, ver, os, arch = stem.split("-")
|
||||
if ver.startswith("py"):
|
||||
py_ver, ver = ver.split("_", maxsplit=1)
|
||||
py_ver = PyVersion(py_ver)
|
||||
else:
|
||||
py_ver = None
|
||||
spec = MinicondaSpec(
|
||||
MinicondaVersion(Suffix(miniconda_n[-1]), VersionStr(ver)),
|
||||
MinicondaVersion(Suffix(miniconda_n[-1]), VersionStr(ver), py_ver),
|
||||
SupportedOS(os),
|
||||
SupportedArch(arch),
|
||||
md5,
|
||||
@@ -175,6 +192,7 @@ class MinicondaSpec(NamedTuple):
|
||||
repo=MINICONDA_REPO,
|
||||
suffix=self.version.suffix,
|
||||
version_str=self.version.version_str,
|
||||
version_py_version=f"{self.version.py_version}_" if self.version.py_version else "",
|
||||
os=self.os,
|
||||
arch=self.arch,
|
||||
md5=self.md5,
|
||||
@@ -250,7 +268,7 @@ if __name__ == "__main__":
|
||||
help="Do not write scripts, just report them to stdout",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-v", "--verbose", action="count",
|
||||
"-v", "--verbose", action="count", default=0,
|
||||
help="Increase verbosity of logging",
|
||||
)
|
||||
parsed = parser.parse_args()
|
||||
|
||||
4
plugins/python-build/share/python-build/2.6.0
Normal file
4
plugins/python-build/share/python-build/2.6.0
Normal file
@@ -0,0 +1,4 @@
|
||||
#require_gcc
|
||||
install_package "openssl-1.0.2k" "https://www.openssl.org/source/old/1.0.2/openssl-1.0.2k.tar.gz#6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
install_package "Python-2.6" "https://www.python.org/ftp/python/2.6/Python-2.6.tgz#7c2f21a968a737a59ed0729f4b1dc154dc3aa183c20be96055186fe43c6742d0" standard verify_py26 ensurepip
|
||||
4
plugins/python-build/share/python-build/2.6.1
Normal file
4
plugins/python-build/share/python-build/2.6.1
Normal file
@@ -0,0 +1,4 @@
|
||||
#require_gcc
|
||||
install_package "openssl-1.0.2k" "https://www.openssl.org/source/old/1.0.2/openssl-1.0.2k.tar.gz#6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
install_package "Python-2.6.1" "https://www.python.org/ftp/python/2.6.1/Python-2.6.1.tgz#fb65e93678e1327e3e8559cc56e1e00ed8c07162b21287a3502677892c5c515c" standard verify_py26 ensurepip
|
||||
4
plugins/python-build/share/python-build/2.6.2
Normal file
4
plugins/python-build/share/python-build/2.6.2
Normal file
@@ -0,0 +1,4 @@
|
||||
#require_gcc
|
||||
install_package "openssl-1.0.2k" "https://www.openssl.org/source/old/1.0.2/openssl-1.0.2k.tar.gz#6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
install_package "Python-2.6.2" "https://www.python.org/ftp/python/2.6.2/Python-2.6.2.tgz#e37ecdf249f248f4fea227adbca09c778670b64fcb5e45947ec3e093cbc12c86" standard verify_py26 ensurepip
|
||||
4
plugins/python-build/share/python-build/2.6.3
Normal file
4
plugins/python-build/share/python-build/2.6.3
Normal file
@@ -0,0 +1,4 @@
|
||||
#require_gcc
|
||||
install_package "openssl-1.0.2k" "https://www.openssl.org/source/old/1.0.2/openssl-1.0.2k.tar.gz#6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
install_package "Python-2.6.3" "https://www.python.org/ftp/python/2.6.3/Python-2.6.3.tgz#a71b55540690425fd82ab00819aeb92c1b23cbb4730a0ccd2e25c833b22a812e" standard verify_py26 ensurepip
|
||||
4
plugins/python-build/share/python-build/2.6.4
Normal file
4
plugins/python-build/share/python-build/2.6.4
Normal file
@@ -0,0 +1,4 @@
|
||||
#require_gcc
|
||||
install_package "openssl-1.0.2k" "https://www.openssl.org/source/old/1.0.2/openssl-1.0.2k.tar.gz#6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
install_package "Python-2.6.4" "https://www.python.org/ftp/python/2.6.4/Python-2.6.4.tgz#1a25a47506e4165704cfe2b07c0a064b0b5762a2d18b8fbdad5af688aeacd252" standard verify_py26 ensurepip
|
||||
4
plugins/python-build/share/python-build/2.6.5
Normal file
4
plugins/python-build/share/python-build/2.6.5
Normal file
@@ -0,0 +1,4 @@
|
||||
#require_gcc
|
||||
install_package "openssl-1.0.2k" "https://www.openssl.org/source/old/1.0.2/openssl-1.0.2k.tar.gz#6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
install_package "Python-2.6.5" "https://www.python.org/ftp/python/2.6.5/Python-2.6.5.tgz#b331dafdce3361834fee783795d4f68ae7cf7d379e9137c2d8e8531cea615ede" standard verify_py26 ensurepip
|
||||
@@ -4,7 +4,7 @@ export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1k" "https://www.openssl.org/source/openssl-1.1.1k.tar.gz#892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.9.3" "https://www.python.org/ftp/python/3.9.3/Python-3.9.3.tar.xz#30811039c65e04c14fc698e423947e464f9316e69fb44610bd38446046bb82b5" standard verify_py39 copy_python_gdb ensurepip
|
||||
install_package "Python-3.10.0" "https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tar.xz#5a99f8e7a6a11a7b98b4e75e0d1303d3832cada5534068f69c7b6222a7b1b002" standard verify_py310 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.9.3" "https://www.python.org/ftp/python/3.9.3/Python-3.9.3.tgz#3afeb61a45b5a2e6f1c0f621bd8cf925a4ff406099fdb3d8c97b993a5f43d048" standard verify_py39 copy_python_gdb ensurepip
|
||||
install_package "Python-3.10.0" "https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz#c4e0cbad57c90690cb813fb4663ef670b4d0f587d8171e2c42bd4c9245bd2758" standard verify_py310 copy_python_gdb ensurepip
|
||||
fi
|
||||
@@ -4,7 +4,7 @@ export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1k" "https://www.openssl.org/source/openssl-1.1.1k.tar.gz#892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.10.0b1" "https://www.python.org/ftp/python/3.10.0/Python-3.10.0b1.tar.xz#a30c55b26a91f4c76392ba2b2e87c2d591fdb2b36f7b58d39fe90bd400fef1a3" standard verify_py310 copy_python_gdb ensurepip
|
||||
install_package "Python-3.11.0a1" "https://www.python.org/ftp/python/3.11.0/Python-3.11.0a1.tar.xz#966319daafa40f337e4d85a0b26fbdd919135c321eb3961a9b3d758abbc95376" standard verify_py311 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.10.0b1" "https://www.python.org/ftp/python/3.10.0/Python-3.10.0b1.tgz#a44c4726948689fe22f3edf30f11bf361d4536b38738ca955747eb5860c2dc93" standard verify_py310 copy_python_gdb ensurepip
|
||||
install_package "Python-3.11.0a1" "https://www.python.org/ftp/python/3.11.0/Python-3.11.0a1.tgz#d2c83771a671d0755d1cda5d82aaea70ef32d337fe5bf87036bd113fc088edff" standard verify_py311 copy_python_gdb ensurepip
|
||||
fi
|
||||
9
plugins/python-build/share/python-build/3.6.14
Normal file
9
plugins/python-build/share/python-build/3.6.14
Normal file
@@ -0,0 +1,9 @@
|
||||
#require_gcc
|
||||
prefer_openssl11
|
||||
install_package "openssl-1.1.1k" "https://www.openssl.org/source/openssl-1.1.1k.tar.gz#892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.1" "https://ftpmirror.gnu.org/readline/readline-8.1.tar.gz#f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.6.14" "https://www.python.org/ftp/python/3.6.14/Python-3.6.14.tar.xz#2663a7a0cfbd00fc76269dce4317db0b54be53c0f4d705aabb32b87efa02d5ae" standard verify_py36 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.6.14" "https://www.python.org/ftp/python/3.6.14/Python-3.6.14.tgz#70064897bc434d6eae8bcc3e5678f282b5ea776d60e695da548a1219ccfd27a5" standard verify_py36 copy_python_gdb ensurepip
|
||||
fi
|
||||
10
plugins/python-build/share/python-build/3.6.15
Normal file
10
plugins/python-build/share/python-build/3.6.15
Normal file
@@ -0,0 +1,10 @@
|
||||
#require_gcc
|
||||
prefer_openssl11
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1k" "https://www.openssl.org/source/openssl-1.1.1k.tar.gz#892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.1" "https://ftpmirror.gnu.org/readline/readline-8.1.tar.gz#f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.6.15" "https://www.python.org/ftp/python/3.6.15/Python-3.6.15.tar.xz#6e28d7cdd6dd513dd190e49bca3972e20fcf455090ccf2ef3f1a227614135d91" standard verify_py36 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.6.15" "https://www.python.org/ftp/python/3.6.15/Python-3.6.15.tgz#54570b7e339e2cfd72b29c7e2fdb47c0b7b18b7412e61de5b463fc087c13b043" standard verify_py36 copy_python_gdb ensurepip
|
||||
fi
|
||||
10
plugins/python-build/share/python-build/3.7.11
Normal file
10
plugins/python-build/share/python-build/3.7.11
Normal file
@@ -0,0 +1,10 @@
|
||||
#require_gcc
|
||||
prefer_openssl11
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1k" "https://www.openssl.org/source/openssl-1.1.1k.tar.gz#892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.1" "https://ftpmirror.gnu.org/readline/readline-8.1.tar.gz#f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.7.11" "https://www.python.org/ftp/python/3.7.11/Python-3.7.11.tar.xz#ddb4196ab5c4f69e895920a422cb60d42b46e2de2b173ce7fd57f1435459a734" standard verify_py37 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.7.11" "https://www.python.org/ftp/python/3.7.11/Python-3.7.11.tgz#b4fba32182e16485d0a6022ba83c9251e6a1c14676ec243a9a07d3722cd4661a" standard verify_py37 copy_python_gdb ensurepip
|
||||
fi
|
||||
10
plugins/python-build/share/python-build/3.7.12
Normal file
10
plugins/python-build/share/python-build/3.7.12
Normal file
@@ -0,0 +1,10 @@
|
||||
#require_gcc
|
||||
prefer_openssl11
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1k" "https://www.openssl.org/source/openssl-1.1.1k.tar.gz#892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.1" "https://ftpmirror.gnu.org/readline/readline-8.1.tar.gz#f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.7.12" "https://www.python.org/ftp/python/3.7.12/Python-3.7.12.tar.xz#f77bf7fb47839f213e5cbf7827281078ea90de7e72b44f10d7ef385ea8c43210" standard verify_py37 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.7.12" "https://www.python.org/ftp/python/3.7.12/Python-3.7.12.tgz#33b4daaf831be19219659466d12645f87ecec6eb21d4d9f9711018a7b66cce46" standard verify_py37 copy_python_gdb ensurepip
|
||||
fi
|
||||
@@ -3,4 +3,4 @@ prefer_openssl11
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1k" "https://www.openssl.org/source/openssl-1.1.1k.tar.gz#892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
install_git "Python-3.8-dev" "https://github.com/python/cpython" "3.8" standard verify_py38 copy_python_gdb ensurepip
|
||||
install_git "Python-3.8-dev" "https://github.com/python/cpython" "3.8" arm64_apple_disable_homebrew_coreutils standard verify_py38 copy_python_gdb ensurepip
|
||||
|
||||
@@ -4,7 +4,7 @@ export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1k" "https://www.openssl.org/source/openssl-1.1.1k.tar.gz#892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.8.10" "https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tar.xz#6af24a66093dd840bcccf371d4044a3027e655cf24591ce26e48022bc79219d9" standard verify_py38 copy_python_gdb ensurepip
|
||||
install_package "Python-3.8.10" "https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tar.xz#6af24a66093dd840bcccf371d4044a3027e655cf24591ce26e48022bc79219d9" arm64_apple_disable_homebrew_coreutils standard verify_py38 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.8.10" "https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tgz#b37ac74d2cbad2590e7cd0dd2b3826c29afe89a734090a87bf8c03c45066cb65" standard verify_py38 copy_python_gdb ensurepip
|
||||
install_package "Python-3.8.10" "https://www.python.org/ftp/python/3.8.10/Python-3.8.10.tgz#b37ac74d2cbad2590e7cd0dd2b3826c29afe89a734090a87bf8c03c45066cb65" arm64_apple_disable_homebrew_coreutils standard verify_py38 copy_python_gdb ensurepip
|
||||
fi
|
||||
|
||||
10
plugins/python-build/share/python-build/3.8.11
Normal file
10
plugins/python-build/share/python-build/3.8.11
Normal file
@@ -0,0 +1,10 @@
|
||||
#require_gcc
|
||||
prefer_openssl11
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1k" "https://www.openssl.org/source/openssl-1.1.1k.tar.gz#892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.1" "https://ftpmirror.gnu.org/readline/readline-8.1.tar.gz#f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.8.11" "https://www.python.org/ftp/python/3.8.11/Python-3.8.11.tar.xz#fb1a1114ebfe9e97199603c6083e20b236a0e007a2c51f29283ffb50c1420fb2" arm64_apple_disable_homebrew_coreutils standard verify_py38 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.8.11" "https://www.python.org/ftp/python/3.8.11/Python-3.8.11.tgz#b77464ea80cec14581b86aeb7fb2ff02830e0abc7bcdc752b7b4bdfcd8f3e393" arm64_apple_disable_homebrew_coreutils standard verify_py38 copy_python_gdb ensurepip
|
||||
fi
|
||||
10
plugins/python-build/share/python-build/3.8.12
Normal file
10
plugins/python-build/share/python-build/3.8.12
Normal file
@@ -0,0 +1,10 @@
|
||||
#require_gcc
|
||||
prefer_openssl11
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1k" "https://www.openssl.org/source/openssl-1.1.1k.tar.gz#892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.1" "https://ftpmirror.gnu.org/readline/readline-8.1.tar.gz#f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.8.12" "https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz#b1d3a76420375343b5e8a22fceb1ac65b77193e9ed27146524f0a9db058728ea" standard verify_py38 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.8.12" "https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz#316aa33f3b7707d041e73f246efedb297a70898c4b91f127f66dc8d80c596f1a" standard verify_py38 copy_python_gdb ensurepip
|
||||
fi
|
||||
@@ -3,4 +3,4 @@ prefer_openssl11
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1k" "https://www.openssl.org/source/openssl-1.1.1k.tar.gz#892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
install_git "Python-3.9-dev" "https://github.com/python/cpython" 3.9 standard verify_py39 copy_python_gdb ensurepip
|
||||
install_git "Python-3.9-dev" "https://github.com/python/cpython" 3.9 arm64_apple_disable_homebrew_coreutils standard verify_py39 copy_python_gdb ensurepip
|
||||
|
||||
@@ -4,8 +4,8 @@ export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1k" "https://www.openssl.org/source/openssl-1.1.1k.tar.gz#892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.9.1" "https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tar.xz#991c3f8ac97992f3d308fefeb03a64db462574eadbff34ce8bc5bb583d9903ff" standard verify_py39 copy_python_gdb ensurepip
|
||||
install_package "Python-3.9.1" "https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tar.xz#991c3f8ac97992f3d308fefeb03a64db462574eadbff34ce8bc5bb583d9903ff" arm64_apple_disable_homebrew_coreutils standard verify_py39 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.9.1" "https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tgz#29cb91ba038346da0bd9ab84a0a55a845d872c341a4da6879f462e94c741f117" standard verify_py39 copy_python_gdb ensurepip
|
||||
install_package "Python-3.9.1" "https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tgz#29cb91ba038346da0bd9ab84a0a55a845d872c341a4da6879f462e94c741f117" arm64_apple_disable_homebrew_coreutils standard verify_py39 copy_python_gdb ensurepip
|
||||
fi
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1i" "https://www.openssl.org/source/old/1.1.1/openssl-1.1.1i.tar.gz#e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.9.2" "https://www.python.org/ftp/python/3.9.2/Python-3.9.2.tar.xz#3c2034c54f811448f516668dce09d24008a0716c3a794dd8639b5388cbde247d" standard verify_py39 copy_python_gdb ensurepip
|
||||
install_package "Python-3.9.2" "https://www.python.org/ftp/python/3.9.2/Python-3.9.2.tar.xz#3c2034c54f811448f516668dce09d24008a0716c3a794dd8639b5388cbde247d" arm64_apple_disable_homebrew_coreutils standard verify_py39 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.9.2" "https://www.python.org/ftp/python/3.9.2/Python-3.9.2.tgz#7899e8a6f7946748830d66739f2d8f2b30214dad956e56b9ba216b3de5581519" standard verify_py39 copy_python_gdb ensurepip
|
||||
install_package "Python-3.9.2" "https://www.python.org/ftp/python/3.9.2/Python-3.9.2.tgz#7899e8a6f7946748830d66739f2d8f2b30214dad956e56b9ba216b3de5581519" arm64_apple_disable_homebrew_coreutils standard verify_py39 copy_python_gdb ensurepip
|
||||
fi
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1k" "https://www.openssl.org/source/openssl-1.1.1k.tar.gz#892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.9.4" "https://www.python.org/ftp/python/3.9.4/Python-3.9.4.tar.xz#4b0e6644a76f8df864ae24ac500a51bbf68bd098f6a173e27d3b61cdca9aa134" standard verify_py39 copy_python_gdb ensurepip
|
||||
install_package "Python-3.9.4" "https://www.python.org/ftp/python/3.9.4/Python-3.9.4.tar.xz#4b0e6644a76f8df864ae24ac500a51bbf68bd098f6a173e27d3b61cdca9aa134" arm64_apple_disable_homebrew_coreutils standard verify_py39 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.9.4" "https://www.python.org/ftp/python/3.9.4/Python-3.9.4.tgz#66c4de16daa74a825cf9da9ddae1fe020b72c3854b73b1762011cc33f9e4592f" standard verify_py39 copy_python_gdb ensurepip
|
||||
install_package "Python-3.9.4" "https://www.python.org/ftp/python/3.9.4/Python-3.9.4.tgz#66c4de16daa74a825cf9da9ddae1fe020b72c3854b73b1762011cc33f9e4592f" arm64_apple_disable_homebrew_coreutils standard verify_py39 copy_python_gdb ensurepip
|
||||
fi
|
||||
|
||||
@@ -4,7 +4,7 @@ export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1k" "https://www.openssl.org/source/openssl-1.1.1k.tar.gz#892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.9.5" "https://www.python.org/ftp/python/3.9.5/Python-3.9.5.tar.xz#0c5a140665436ec3dbfbb79e2dfb6d192655f26ef4a29aeffcb6d1820d716d83" standard verify_py39 copy_python_gdb ensurepip
|
||||
install_package "Python-3.9.5" "https://www.python.org/ftp/python/3.9.5/Python-3.9.5.tar.xz#0c5a140665436ec3dbfbb79e2dfb6d192655f26ef4a29aeffcb6d1820d716d83" arm64_apple_disable_homebrew_coreutils standard verify_py39 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.9.5" "https://www.python.org/ftp/python/3.9.5/Python-3.9.5.tgz#e0fbd5b6e1ee242524430dee3c91baf4cbbaba4a72dd1674b90fda87b713c7ab" standard verify_py39 copy_python_gdb ensurepip
|
||||
install_package "Python-3.9.5" "https://www.python.org/ftp/python/3.9.5/Python-3.9.5.tgz#e0fbd5b6e1ee242524430dee3c91baf4cbbaba4a72dd1674b90fda87b713c7ab" arm64_apple_disable_homebrew_coreutils standard verify_py39 copy_python_gdb ensurepip
|
||||
fi
|
||||
|
||||
10
plugins/python-build/share/python-build/3.9.6
Normal file
10
plugins/python-build/share/python-build/3.9.6
Normal file
@@ -0,0 +1,10 @@
|
||||
#require_gcc
|
||||
prefer_openssl11
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1k" "https://www.openssl.org/source/openssl-1.1.1k.tar.gz#892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.1" "https://ftpmirror.gnu.org/readline/readline-8.1.tar.gz#f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.9.6" "https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tar.xz#397920af33efc5b97f2e0b57e91923512ef89fc5b3c1d21dbfc8c4828ce0108a" arm64_apple_disable_homebrew_coreutils standard verify_py39 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.9.6" "https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz#d0a35182e19e416fc8eae25a3dcd4d02d4997333e4ad1f2eee6010aadc3fe866" arm64_apple_disable_homebrew_coreutils standard verify_py39 copy_python_gdb ensurepip
|
||||
fi
|
||||
10
plugins/python-build/share/python-build/3.9.7
Normal file
10
plugins/python-build/share/python-build/3.9.7
Normal file
@@ -0,0 +1,10 @@
|
||||
#require_gcc
|
||||
prefer_openssl11
|
||||
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
|
||||
install_package "openssl-1.1.1k" "https://www.openssl.org/source/openssl-1.1.1k.tar.gz#892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "readline-8.1" "https://ftpmirror.gnu.org/readline/readline-8.1.tar.gz#f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" mac_readline --if has_broken_mac_readline
|
||||
if has_tar_xz_support; then
|
||||
install_package "Python-3.9.7" "https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tar.xz#f8145616e68c00041d1a6399b76387390388f8359581abc24432bb969b5e3c57" standard verify_py39 copy_python_gdb ensurepip
|
||||
else
|
||||
install_package "Python-3.9.7" "https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tgz#a838d3f9360d157040142b715db34f0218e535333696a5569dc6f854604eb9d1" standard verify_py39 copy_python_gdb ensurepip
|
||||
fi
|
||||
48
plugins/python-build/share/python-build/graalpython-21.2.0
Normal file
48
plugins/python-build/share/python-build/graalpython-21.2.0
Normal file
@@ -0,0 +1,48 @@
|
||||
# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
# of the Software, and to permit persons to whom the Software is furnished to do
|
||||
# so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
VERSION='21.2.0'
|
||||
BUILD=''
|
||||
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
"linux64" )
|
||||
graalpython_arch="linux"
|
||||
checksum="17399e168743ae8b7b3faa9870ce24213fb514a04a8966bd4bd10844baf039da"
|
||||
;;
|
||||
"osx64" )
|
||||
graalpython_arch="macos"
|
||||
checksum="b365278cba49d6e2e0c018d1f5a1e81fa0304be5fe6c086532630443c605b8c0"
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": No binary distribution of GraalPython is available for $(pypy_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "${BUILD}" ]; then
|
||||
urlprefix="https://github.com/graalvm/graalvm-ce-dev-builds/releases/download/${VERSION}-${BUILD}"
|
||||
else
|
||||
urlprefix="https://github.com/oracle/graalpython/releases/download/vm-${VERSION}"
|
||||
fi
|
||||
|
||||
install_package "graalpython-${VERSION}${BUILD}" "${urlprefix}/graalpython-${VERSION}-${graalpython_arch}-amd64.tar.gz#${checksum}" "graalpython" ensurepip
|
||||
48
plugins/python-build/share/python-build/graalpython-21.3.0
Normal file
48
plugins/python-build/share/python-build/graalpython-21.3.0
Normal file
@@ -0,0 +1,48 @@
|
||||
# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
# of the Software, and to permit persons to whom the Software is furnished to do
|
||||
# so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
VERSION='21.3.0'
|
||||
BUILD=''
|
||||
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
"linux64" )
|
||||
graalpython_arch="linux"
|
||||
checksum="b17bbc9753fb04f03290660952acfd212020676603970323780f190509b061b9"
|
||||
;;
|
||||
"osx64" )
|
||||
graalpython_arch="macos"
|
||||
checksum="feecbd2567a43aeaeb5ca6a7385ef3d5bd2c94e563b64afee7dcce0c8f87a1c9"
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": No binary distribution of GraalPython is available for $(pypy_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "${BUILD}" ]; then
|
||||
urlprefix="https://github.com/graalvm/graalvm-ce-dev-builds/releases/download/${VERSION}-${BUILD}"
|
||||
else
|
||||
urlprefix="https://github.com/oracle/graalpython/releases/download/vm-${VERSION}"
|
||||
fi
|
||||
|
||||
install_package "graalpython-${VERSION}${BUILD}" "${urlprefix}/graalpython-${VERSION}-${graalpython_arch}-amd64.tar.gz#${checksum}" "graalpython" ensurepip
|
||||
25
plugins/python-build/share/python-build/mambaforge
Normal file
25
plugins/python-build/share/python-build/mambaforge
Normal file
@@ -0,0 +1,25 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-ppc64le" )
|
||||
install_script "Mambaforge-Linux-ppc64le" "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-ppc64le.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Mambaforge-Linux-x86_64" "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
"Linux-aarch64" )
|
||||
install_script "Mambaforge-Linux-aarch64" "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-aarch64.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Mambaforge-MacOSX-arm64" "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-arm64.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Mambaforge-MacOSX-x86_64" "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-MacOSX-x86_64.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Mambaforge3 is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
22
plugins/python-build/share/python-build/mambaforge-4.10.1-4
Normal file
22
plugins/python-build/share/python-build/mambaforge-4.10.1-4
Normal file
@@ -0,0 +1,22 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-x86_64" )
|
||||
install_script "Mambaforge-4.10.1-4-Linux-x86_64" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-4/Mambaforge-4.10.1-4-Linux-x86_64.sh#9eb335cb559644a6e462c077ebc129af51b7329817574fb707b994dafdddf2af" "miniconda" verify_py38
|
||||
;;
|
||||
"Linux-aarch64" )
|
||||
install_script "Mambaforge-4.10.1-4-Linux-aarch64" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-4/Mambaforge-4.10.1-4-Linux-aarch64.sh#eb7d10c758afbd59432a8f08294bc3ac053e747e1997ff5d6a1141a276b6d0e5" "miniconda" verify_py38
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Mambaforge-4.10.1-4-MacOSX-arm64" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-4/Mambaforge-4.10.1-4-MacOSX-arm64.sh#90a75e9fa9fedfe991a9eaf65cae62ef5cdb6a8fda9375654f31b3b6cf99ef06" "miniconda" verify_py39
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Mambaforge-4.10.1-4-MacOSX-x86_64" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-4/Mambaforge-4.10.1-4-MacOSX-x86_64.sh#b8a849f0cf2923940a2fcda47a5f7181fa855dfc5c1b59134ac7e8b3735e0f71" "miniconda" verify_py38
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Miniforge is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
22
plugins/python-build/share/python-build/mambaforge-4.10.1-5
Normal file
22
plugins/python-build/share/python-build/mambaforge-4.10.1-5
Normal file
@@ -0,0 +1,22 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-x86_64" )
|
||||
install_script "Mambaforge-4.10.1-5-Linux-x86_64" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-5/Mambaforge-4.10.1-5-Linux-x86_64.sh#069e151cae85ed4747721e938e7974aa00889a1ae87cff33ddbdde9530fc4c6d" "miniconda" verify_py38
|
||||
;;
|
||||
"Linux-aarch64" )
|
||||
install_script "Mambaforge-4.10.1-5-Linux-aarch64" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-5/Mambaforge-4.10.1-5-Linux-aarch64.sh#64739b6eb0108ff3873d4edb32d2760db166cc822797234654c888c0f7063b9d" "miniconda" verify_py38
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Mambaforge-4.10.1-5-MacOSX-arm64" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-5/Mambaforge-4.10.1-5-MacOSX-arm64.sh#20553cd410ae250cd1cabce04e7478f57439ab1d55cb1c6a157998d96bee1b7d" "miniconda" verify_py39
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Mambaforge-4.10.1-5-MacOSX-x86_64" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-5/Mambaforge-4.10.1-5-MacOSX-x86_64.sh#871fc6471ff8de7aa609db5f1a8e99bfaea6dabbbd2c41fa61c26ef82daa6832" "miniconda" verify_py38
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Miniforge is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
22
plugins/python-build/share/python-build/mambaforge-pypy3
Normal file
22
plugins/python-build/share/python-build/mambaforge-pypy3
Normal file
@@ -0,0 +1,22 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-ppc64le" )
|
||||
install_script "Mambaforge-pypy3-Linux-ppc64le" "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-pypy3-Linux-ppc64le.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Mambaforge-pypy3-Linux-x86_64" "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-pypy3-Linux-x86_64.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
"Linux-aarch64" )
|
||||
install_script "Mambaforge-pypy3-Linux-aarch64" "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-pypy3-Linux-aarch64.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Mambaforge-pypy3-MacOSX-x86_64" "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-pypy3-MacOSX-x86_64.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Mambaforge with PyPy3 is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
4
plugins/python-build/share/python-build/micropython-1.15
Normal file
4
plugins/python-build/share/python-build/micropython-1.15
Normal file
@@ -0,0 +1,4 @@
|
||||
has_tar_xz_support \
|
||||
&& { install=install_package; src="https://micropython.org/resources/source/micropython-1.15.tar.xz#52d020b3adef6c2bd2b6c8aba672f381c3c99d2b90130ac8d0d7414999cb4e13"; } \
|
||||
|| { install=install_zip; src="https://micropython.org/resources/source/micropython-1.15.zip#8a0c6b5914a1d1eaf63f4b3c226db5049107f1bc1c6046e4dda8d4c5c4657e97"; }
|
||||
$install micropython-1.15 "$src" micropython
|
||||
19
plugins/python-build/share/python-build/miniconda2-2.7-4.8.3
Normal file
19
plugins/python-build/share/python-build/miniconda2-2.7-4.8.3
Normal file
@@ -0,0 +1,19 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-ppc64le" )
|
||||
install_script "Miniconda2-py27_4.8.3-Linux-ppc64le" "https://repo.anaconda.com/miniconda/Miniconda2-py27_4.8.3-Linux-ppc64le.sh#120b300120b1362831f2075cc0bd452f" "miniconda" verify_py27
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniconda2-py27_4.8.3-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda2-py27_4.8.3-Linux-x86_64.sh#19ce7d0039ab349914d928e7f32b1c1b" "miniconda" verify_py27
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniconda2-py27_4.8.3-MacOSX-x86_64" "https://repo.anaconda.com/miniconda/Miniconda2-py27_4.8.3-MacOSX-x86_64.sh#14e2d294decc5a48a449b588f5819c10" "miniconda" verify_py27
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,19 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-ppc64le" )
|
||||
install_script "Miniconda3-py37_4.10.3-Linux-ppc64le" "https://repo.anaconda.com/miniconda/Miniconda3-py37_4.10.3-Linux-ppc64le.sh#a926bbaf28d59ac1264799e3ca770a44" "miniconda" verify_py37
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniconda3-py37_4.10.3-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py37_4.10.3-Linux-x86_64.sh#9f186c1d86c266acc47dbc1603f0e2ed" "miniconda" verify_py37
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniconda3-py37_4.10.3-MacOSX-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py37_4.10.3-MacOSX-x86_64.sh#b88a2eb66917c55a6bd1973fabaf05b3" "miniconda" verify_py37
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,19 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-ppc64le" )
|
||||
install_script "Miniconda3-py38_4.10.3-Linux-ppc64le" "https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-ppc64le.sh#12ddb1b94f30f8fc633c3223b0398d2f" "miniconda" verify_py38
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniconda3-py38_4.10.3-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh#14da4a9a44b337f7ccb8363537f65b9c" "miniconda" verify_py38
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniconda3-py38_4.10.3-MacOSX-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-MacOSX-x86_64.sh#cb609591c280423e999fc421cdb779d3" "miniconda" verify_py38
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,19 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-ppc64le" )
|
||||
install_script "Miniconda3-py39_4.10.3-Linux-ppc64le" "https://repo.anaconda.com/miniconda/Miniconda3-py39_4.10.3-Linux-ppc64le.sh#07ea41c691bdcc7d9c71cae1a1a88151" "miniconda" verify_py39
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniconda3-py39_4.10.3-Linux-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh#8c69f65a4ae27fb41df0fe552b4a8a3b" "miniconda" verify_py39
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniconda3-py39_4.10.3-MacOSX-x86_64" "https://repo.anaconda.com/miniconda/Miniconda3-py39_4.10.3-MacOSX-x86_64.sh#09bb30a9204ced74ce3c06762cb442fc" "miniconda" verify_py39
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Miniconda is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
23
plugins/python-build/share/python-build/miniforge-pypy3
Normal file
23
plugins/python-build/share/python-build/miniforge-pypy3
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-ppc64le" )
|
||||
install_script "Miniforge-pypy3-Linux-ppc64le" "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge-pypy3-Linux-ppc64le.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniforge-pypy3-Linux-x86_64" "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge-pypy3-Linux-x86_64.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniforge-pypy3-Linux-aarch64" "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge-pypy3-Linux-aarch64.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniforge-pypy3-MacOSX-x86_64" "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge-pypy3-MacOSX-x86_64.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Miniforge with PyPy3 is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
25
plugins/python-build/share/python-build/miniforge3
Normal file
25
plugins/python-build/share/python-build/miniforge3
Normal file
@@ -0,0 +1,25 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-ppc64le" )
|
||||
install_script "Miniforge3-Linux-ppc64le" "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-ppc64le.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniforge3-Linux-x86_64" "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniforge3-Linux-aarch64" "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniforge3-MacOSX-arm64" "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniforge3-MacOSX-x86_64" "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh" "miniconda" verify_py3_latest
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Miniforge3 is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
25
plugins/python-build/share/python-build/miniforge3-4.10.1-3
Normal file
25
plugins/python-build/share/python-build/miniforge3-4.10.1-3
Normal file
@@ -0,0 +1,25 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-ppc64le" )
|
||||
install_script "Miniforge3-4.10.1-3-Linux-ppc64le" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-3/Miniforge3-4.10.1-3-Linux-ppc64le.sh#650083e39c5b3910600debfce07a3644b5906621be72d16847d1ca05f4f5b4f8" "miniconda" verify_py38
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniforge3-4.10.1-3-Linux-x86_64" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-3/Miniforge3-4.10.1-3-Linux-x86_64.sh#0ab2d494557ce8dfb4344bd960eb98c92d02f25d174c77029a459b20884e0e26" "miniconda" verify_py38
|
||||
;;
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniforge3-4.10.1-3-Linux-aarch64" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-3/Miniforge3-4.10.1-3-Linux-aarch64.sh#8bb5e5885c4b4e9bed0621740a40ceb428c4894b339050227b25690181da2794" "miniconda" verify_py38
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniforge3-4.10.1-3-MacOSX-arm64" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-3/Miniforge3-4.10.1-3-MacOSX-arm64.sh#ea7fd5565debe13f484f15236651da88f0137e99b27c36d9001373f13621e393" "miniconda" verify_py39
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniforge3-4.10.1-3-MacOSX-x86_64" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-3/Miniforge3-4.10.1-3-MacOSX-x86_64.sh#1b85ece22e2d35565db90dfc9121e15fcd4eb179e948983662157e7a9fad2201" "miniconda" verify_py38
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Miniforge is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
25
plugins/python-build/share/python-build/miniforge3-4.10.1-5
Normal file
25
plugins/python-build/share/python-build/miniforge3-4.10.1-5
Normal file
@@ -0,0 +1,25 @@
|
||||
case "$(anaconda_architecture 2>/dev/null || true)" in
|
||||
"Linux-ppc64le" )
|
||||
install_script "Miniforge3-4.10.1-5-Linux-ppc64le" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-5/Miniforge3-4.10.1-5-Linux-ppc64le.sh#0b23d9c25582dbd2cf8171366f5fb0ef5d5e7f8262eb670094f33400e88f3726" "miniconda" verify_py38
|
||||
;;
|
||||
"Linux-x86_64" )
|
||||
install_script "Miniforge3-4.10.1-5-Linux-x86_64" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-5/Miniforge3-4.10.1-5-Linux-x86_64.sh#f47637e899258d4fa568aa866c37ecf19a2dacc50fa64a5ebc65443ccdf73243" "miniconda" verify_py38
|
||||
;;
|
||||
"Linux-aarch64" )
|
||||
install_script "Miniforge3-4.10.1-5-Linux-aarch64" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-5/Miniforge3-4.10.1-5-Linux-aarch64.sh#d582c3bf289dc5c2f86dde9182b27e49b095d00da40842f3e379a113b12ce7cb" "miniconda" verify_py38
|
||||
;;
|
||||
"MacOSX-arm64" )
|
||||
install_script "Miniforge3-4.10.1-5-MacOSX-arm64" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-5/Miniforge3-4.10.1-5-MacOSX-arm64.sh#29fee39691dfe84cf3222c61fce0c8357d933eefcc0d49041b48153efe91f345" "miniconda" verify_py39
|
||||
;;
|
||||
"MacOSX-x86_64" )
|
||||
install_script "Miniforge3-4.10.1-5-MacOSX-x86_64" "https://github.com/conda-forge/miniforge/releases/download/4.10.1-5/Miniforge3-4.10.1-5-MacOSX-x86_64.sh#f67dfc4d5e3dea173e31267eb0890733098f0fd2d42944282d17f27a1bc3f8cc" "miniconda" verify_py38
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of Miniforge is not available for $(anaconda_architecture 2>/dev/null || true)."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,71 @@
|
||||
|
||||
# HG changeset patch
|
||||
# User Barry Warsaw <barry@python.org>
|
||||
# Date 1302190091 14400
|
||||
# Node ID bd0f73a9538e05f526feaf05821e68bdcff498fa
|
||||
# Parent 2e4cdaffe493e879fb5367a4aa454491de451137
|
||||
Backport for Python 2.7 of issue 11715 support for building Python on
|
||||
multiarch Debian/Ubuntu.
|
||||
|
||||
diff -r -u setup.py setup.py
|
||||
--- setup.py.orig
|
||||
+++ setup.py
|
||||
@@ -15,6 +15,7 @@
|
||||
from distutils.command.build_ext import build_ext
|
||||
from distutils.command.install import install
|
||||
from distutils.command.install_lib import install_lib
|
||||
+from distutils.spawn import find_executable
|
||||
|
||||
# This global variable is used to hold the list of modules to be disabled.
|
||||
disabled_module_list = []
|
||||
@@ -308,10 +309,33 @@ class PyBuildExt(build_ext):
|
||||
return platform
|
||||
return sys.platform
|
||||
|
||||
+ def add_multiarch_paths(self):
|
||||
+ # Debian/Ubuntu multiarch support.
|
||||
+ # https://wiki.ubuntu.com/MultiarchSpec
|
||||
+ if not find_executable('dpkg-architecture'):
|
||||
+ return
|
||||
+ tmpfile = os.path.join(self.build_temp, 'multiarch')
|
||||
+ if not os.path.exists(self.build_temp):
|
||||
+ os.makedirs(self.build_temp)
|
||||
+ ret = os.system(
|
||||
+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
|
||||
+ tmpfile)
|
||||
+ try:
|
||||
+ if ret >> 8 == 0:
|
||||
+ with open(tmpfile) as fp:
|
||||
+ multiarch_path_component = fp.readline().strip()
|
||||
+ add_dir_to_list(self.compiler.library_dirs,
|
||||
+ '/usr/lib/' + multiarch_path_component)
|
||||
+ add_dir_to_list(self.compiler.include_dirs,
|
||||
+ '/usr/include/' + multiarch_path_component)
|
||||
+ finally:
|
||||
+ os.unlink(tmpfile)
|
||||
+
|
||||
def detect_modules(self):
|
||||
# Ensure that /usr/local is always used
|
||||
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||
+ self.add_multiarch_paths()
|
||||
|
||||
# Add paths specified in the environment variables LDFLAGS and
|
||||
# CPPFLAGS for header and library files.
|
||||
@@ -1308,14 +1332,13 @@
|
||||
|
||||
|
||||
# Platform-specific libraries
|
||||
- if platform == 'linux2':
|
||||
+ if platform.startswith('linux'):
|
||||
# Linux-specific modules
|
||||
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
|
||||
else:
|
||||
missing.append('linuxaudiodev')
|
||||
|
||||
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8'):
|
||||
+ if platform.startswith('linux') or platform.startswith('freebsd'):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
@@ -0,0 +1,61 @@
|
||||
diff -r -u ../Python-2.6.orig/Modules/readline.c ./Modules/readline.c
|
||||
--- ../Python-2.6.orig/Modules/readline.c 2013-11-10 16:36:41.000000000 +0900
|
||||
+++ ./Modules/readline.c 2014-03-29 16:17:48.643305752 +0900
|
||||
@@ -174,8 +174,7 @@
|
||||
if (!PyArg_ParseTuple(args, buf, &function))
|
||||
return NULL;
|
||||
if (function == Py_None) {
|
||||
- Py_XDECREF(*hook_var);
|
||||
- *hook_var = NULL;
|
||||
+ Py_CLEAR(*hook_var);
|
||||
}
|
||||
else if (PyCallable_Check(function)) {
|
||||
PyObject *tmp = *hook_var;
|
||||
@@ -647,14 +646,22 @@
|
||||
}
|
||||
|
||||
static int
|
||||
+#if defined(_RL_FUNCTION_TYPEDEF)
|
||||
on_startup_hook(void)
|
||||
+#else
|
||||
+on_startup_hook()
|
||||
+#endif
|
||||
{
|
||||
return on_hook(startup_hook);
|
||||
}
|
||||
|
||||
#ifdef HAVE_RL_PRE_INPUT_HOOK
|
||||
static int
|
||||
+#if defined(_RL_FUNCTION_TYPEDEF)
|
||||
on_pre_input_hook(void)
|
||||
+#else
|
||||
+on_pre_input_hook()
|
||||
+#endif
|
||||
{
|
||||
return on_hook(pre_input_hook);
|
||||
}
|
||||
@@ -749,7 +756,7 @@
|
||||
* before calling the normal completer */
|
||||
|
||||
static char **
|
||||
-flex_complete(char *text, int start, int end)
|
||||
+flex_complete(const char *text, int start, int end)
|
||||
{
|
||||
Py_XDECREF(begidx);
|
||||
Py_XDECREF(endidx);
|
||||
@@ -783,12 +790,12 @@
|
||||
rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
|
||||
rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
|
||||
/* Set our hook functions */
|
||||
- rl_startup_hook = (Function *)on_startup_hook;
|
||||
+ rl_startup_hook = on_startup_hook;
|
||||
#ifdef HAVE_RL_PRE_INPUT_HOOK
|
||||
- rl_pre_input_hook = (Function *)on_pre_input_hook;
|
||||
+ rl_pre_input_hook = on_pre_input_hook;
|
||||
#endif
|
||||
/* Set our completion function */
|
||||
- rl_attempted_completion_function = (CPPFunction *)flex_complete;
|
||||
+ rl_attempted_completion_function = flex_complete;
|
||||
/* Set Python word break characters */
|
||||
rl_completer_word_break_characters =
|
||||
strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?");
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -r -u ../Python-2.6.orig/setup.py ./setup.py
|
||||
--- ../Python-2.6.orig/setup.py 2013-10-30 00:04:39.000000000 +0900
|
||||
+++ ./setup.py 2014-04-03 22:28:49.122061684 +0900
|
||||
@@ -1541,7 +1541,7 @@
|
||||
# The versions with dots are used on Unix, and the versions without
|
||||
# dots on Windows, for detection by cygwin.
|
||||
tcllib = tklib = tcl_includes = tk_includes = None
|
||||
- for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2',
|
||||
+ for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83',
|
||||
'82', '8.1', '81', '8.0', '80']:
|
||||
tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
|
||||
tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)
|
||||
@@ -0,0 +1,95 @@
|
||||
diff -r -u ../Python-2.6.4.orig/Lib/ssl.py ./Lib/ssl.py
|
||||
--- ../Python-2.6.4.orig/Lib/ssl.py 2012-04-10 15:32:06.000000000 +0000
|
||||
+++ ./Lib/ssl.py 2015-12-18 14:46:36.487188331 +0000
|
||||
@@ -61,18 +61,24 @@
|
||||
|
||||
from _ssl import SSLError
|
||||
from _ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED
|
||||
-from _ssl import PROTOCOL_SSLv2, PROTOCOL_SSLv3, PROTOCOL_SSLv23, PROTOCOL_TLSv1
|
||||
-from _ssl import RAND_status, RAND_egd, RAND_add
|
||||
-from _ssl import \
|
||||
- SSL_ERROR_ZERO_RETURN, \
|
||||
- SSL_ERROR_WANT_READ, \
|
||||
- SSL_ERROR_WANT_WRITE, \
|
||||
- SSL_ERROR_WANT_X509_LOOKUP, \
|
||||
- SSL_ERROR_SYSCALL, \
|
||||
- SSL_ERROR_SSL, \
|
||||
- SSL_ERROR_WANT_CONNECT, \
|
||||
- SSL_ERROR_EOF, \
|
||||
- SSL_ERROR_INVALID_ERROR_CODE
|
||||
+from _ssl import RAND_status, RAND_add
|
||||
+try:
|
||||
+ from _ssl import RAND_egd
|
||||
+except ImportError:
|
||||
+ # LibreSSL does not provide RAND_egd
|
||||
+ pass
|
||||
+
|
||||
+def _import_symbols(prefix):
|
||||
+ for n in dir(_ssl):
|
||||
+ if n.startswith(prefix):
|
||||
+ globals()[n] = getattr(_ssl, n)
|
||||
+
|
||||
+_import_symbols('OP_')
|
||||
+_import_symbols('ALERT_DESCRIPTION_')
|
||||
+_import_symbols('SSL_ERROR_')
|
||||
+_import_symbols('PROTOCOL_')
|
||||
+
|
||||
+_PROTOCOL_NAMES = dict([(value, name) for name, value in globals().items() if name.startswith('PROTOCOL_')])
|
||||
|
||||
from socket import socket, _fileobject
|
||||
from socket import getnameinfo as _getnameinfo
|
||||
@@ -394,7 +400,7 @@
|
||||
d = pem_cert_string.strip()[len(PEM_HEADER):-len(PEM_FOOTER)]
|
||||
return base64.decodestring(d)
|
||||
|
||||
-def get_server_certificate (addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
|
||||
+def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None):
|
||||
|
||||
"""Retrieve the certificate from the server at the specified address,
|
||||
and return it as a PEM-encoded string.
|
||||
diff -r -u ../Python-2.6.4.orig/Modules/_ssl.c ./Modules/_ssl.c
|
||||
--- ../Python-2.6.4.orig/Modules/_ssl.c 2012-04-10 15:32:09.000000000 +0000
|
||||
+++ ./Modules/_ssl.c 2015-12-18 14:45:30.419597074 +0000
|
||||
@@ -61,8 +61,12 @@
|
||||
};
|
||||
|
||||
enum py_ssl_version {
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
PY_SSL_VERSION_SSL2,
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
PY_SSL_VERSION_SSL3,
|
||||
+#endif
|
||||
PY_SSL_VERSION_SSL23,
|
||||
PY_SSL_VERSION_TLS1,
|
||||
};
|
||||
@@ -298,10 +302,14 @@
|
||||
PySSL_BEGIN_ALLOW_THREADS
|
||||
if (proto_version == PY_SSL_VERSION_TLS1)
|
||||
self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
else if (proto_version == PY_SSL_VERSION_SSL3)
|
||||
self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
else if (proto_version == PY_SSL_VERSION_SSL2)
|
||||
self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
|
||||
+#endif
|
||||
else if (proto_version == PY_SSL_VERSION_SSL23)
|
||||
self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */
|
||||
PySSL_END_ALLOW_THREADS
|
||||
@@ -1627,10 +1635,14 @@
|
||||
PY_SSL_CERT_REQUIRED);
|
||||
|
||||
/* protocol versions */
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv2",
|
||||
PY_SSL_VERSION_SSL2);
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv3",
|
||||
PY_SSL_VERSION_SSL3);
|
||||
+#endif
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv23",
|
||||
PY_SSL_VERSION_SSL23);
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_TLSv1",
|
||||
@@ -0,0 +1,71 @@
|
||||
|
||||
# HG changeset patch
|
||||
# User Barry Warsaw <barry@python.org>
|
||||
# Date 1302190091 14400
|
||||
# Node ID bd0f73a9538e05f526feaf05821e68bdcff498fa
|
||||
# Parent 2e4cdaffe493e879fb5367a4aa454491de451137
|
||||
Backport for Python 2.7 of issue 11715 support for building Python on
|
||||
multiarch Debian/Ubuntu.
|
||||
|
||||
diff -r -u setup.py setup.py
|
||||
--- setup.py.orig
|
||||
+++ setup.py
|
||||
@@ -15,6 +15,7 @@
|
||||
from distutils.command.build_ext import build_ext
|
||||
from distutils.command.install import install
|
||||
from distutils.command.install_lib import install_lib
|
||||
+from distutils.spawn import find_executable
|
||||
|
||||
# This global variable is used to hold the list of modules to be disabled.
|
||||
disabled_module_list = []
|
||||
@@ -308,10 +309,33 @@ class PyBuildExt(build_ext):
|
||||
return platform
|
||||
return sys.platform
|
||||
|
||||
+ def add_multiarch_paths(self):
|
||||
+ # Debian/Ubuntu multiarch support.
|
||||
+ # https://wiki.ubuntu.com/MultiarchSpec
|
||||
+ if not find_executable('dpkg-architecture'):
|
||||
+ return
|
||||
+ tmpfile = os.path.join(self.build_temp, 'multiarch')
|
||||
+ if not os.path.exists(self.build_temp):
|
||||
+ os.makedirs(self.build_temp)
|
||||
+ ret = os.system(
|
||||
+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
|
||||
+ tmpfile)
|
||||
+ try:
|
||||
+ if ret >> 8 == 0:
|
||||
+ with open(tmpfile) as fp:
|
||||
+ multiarch_path_component = fp.readline().strip()
|
||||
+ add_dir_to_list(self.compiler.library_dirs,
|
||||
+ '/usr/lib/' + multiarch_path_component)
|
||||
+ add_dir_to_list(self.compiler.include_dirs,
|
||||
+ '/usr/include/' + multiarch_path_component)
|
||||
+ finally:
|
||||
+ os.unlink(tmpfile)
|
||||
+
|
||||
def detect_modules(self):
|
||||
# Ensure that /usr/local is always used
|
||||
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||
+ self.add_multiarch_paths()
|
||||
|
||||
# Add paths specified in the environment variables LDFLAGS and
|
||||
# CPPFLAGS for header and library files.
|
||||
@@ -1310,14 +1334,13 @@
|
||||
|
||||
|
||||
# Platform-specific libraries
|
||||
- if platform == 'linux2':
|
||||
+ if platform.startswith('linux'):
|
||||
# Linux-specific modules
|
||||
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
|
||||
else:
|
||||
missing.append('linuxaudiodev')
|
||||
|
||||
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8'):
|
||||
+ if platform.startswith('linux') or platform.startswith('freebsd'):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
@@ -0,0 +1,61 @@
|
||||
diff -r -u ../Python-2.6.4.orig/Modules/readline.c ./Modules/readline.c
|
||||
--- ../Python-2.6.4.orig/Modules/readline.c 2013-11-10 16:36:41.000000000 +0900
|
||||
+++ ./Modules/readline.c 2014-03-29 16:17:48.643305752 +0900
|
||||
@@ -178,8 +178,7 @@
|
||||
if (!PyArg_ParseTuple(args, buf, &function))
|
||||
return NULL;
|
||||
if (function == Py_None) {
|
||||
- Py_XDECREF(*hook_var);
|
||||
- *hook_var = NULL;
|
||||
+ Py_CLEAR(*hook_var);
|
||||
}
|
||||
else if (PyCallable_Check(function)) {
|
||||
PyObject *tmp = *hook_var;
|
||||
@@ -655,14 +655,22 @@
|
||||
}
|
||||
|
||||
static int
|
||||
+#if defined(_RL_FUNCTION_TYPEDEF)
|
||||
on_startup_hook(void)
|
||||
+#else
|
||||
+on_startup_hook()
|
||||
+#endif
|
||||
{
|
||||
return on_hook(startup_hook);
|
||||
}
|
||||
|
||||
#ifdef HAVE_RL_PRE_INPUT_HOOK
|
||||
static int
|
||||
+#if defined(_RL_FUNCTION_TYPEDEF)
|
||||
on_pre_input_hook(void)
|
||||
+#else
|
||||
+on_pre_input_hook()
|
||||
+#endif
|
||||
{
|
||||
return on_hook(pre_input_hook);
|
||||
}
|
||||
@@ -757,7 +757,7 @@
|
||||
* before calling the normal completer */
|
||||
|
||||
static char **
|
||||
-flex_complete(char *text, int start, int end)
|
||||
+flex_complete(const char *text, int start, int end)
|
||||
{
|
||||
Py_XDECREF(begidx);
|
||||
Py_XDECREF(endidx);
|
||||
@@ -791,12 +791,12 @@
|
||||
rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
|
||||
rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
|
||||
/* Set our hook functions */
|
||||
- rl_startup_hook = (Function *)on_startup_hook;
|
||||
+ rl_startup_hook = on_startup_hook;
|
||||
#ifdef HAVE_RL_PRE_INPUT_HOOK
|
||||
- rl_pre_input_hook = (Function *)on_pre_input_hook;
|
||||
+ rl_pre_input_hook = on_pre_input_hook;
|
||||
#endif
|
||||
/* Set our completion function */
|
||||
- rl_attempted_completion_function = (CPPFunction *)flex_complete;
|
||||
+ rl_attempted_completion_function = flex_complete;
|
||||
/* Set Python word break characters */
|
||||
rl_completer_word_break_characters =
|
||||
strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?");
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -r -u ../Python-2.6.1.orig/setup.py ./setup.py
|
||||
--- ../Python-2.6.1.orig/setup.py 2013-10-30 00:04:39.000000000 +0900
|
||||
+++ ./setup.py 2014-04-03 22:28:49.122061684 +0900
|
||||
@@ -1543,7 +1543,7 @@
|
||||
# The versions with dots are used on Unix, and the versions without
|
||||
# dots on Windows, for detection by cygwin.
|
||||
tcllib = tklib = tcl_includes = tk_includes = None
|
||||
- for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2',
|
||||
+ for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83',
|
||||
'82', '8.1', '81', '8.0', '80']:
|
||||
tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
|
||||
tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)
|
||||
@@ -0,0 +1,95 @@
|
||||
diff -r -u ../Python-2.6.4.orig/Lib/ssl.py ./Lib/ssl.py
|
||||
--- ../Python-2.6.4.orig/Lib/ssl.py 2012-04-10 15:32:06.000000000 +0000
|
||||
+++ ./Lib/ssl.py 2015-12-18 14:46:36.487188331 +0000
|
||||
@@ -61,18 +61,24 @@
|
||||
|
||||
from _ssl import SSLError
|
||||
from _ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED
|
||||
-from _ssl import PROTOCOL_SSLv2, PROTOCOL_SSLv3, PROTOCOL_SSLv23, PROTOCOL_TLSv1
|
||||
-from _ssl import RAND_status, RAND_egd, RAND_add
|
||||
-from _ssl import \
|
||||
- SSL_ERROR_ZERO_RETURN, \
|
||||
- SSL_ERROR_WANT_READ, \
|
||||
- SSL_ERROR_WANT_WRITE, \
|
||||
- SSL_ERROR_WANT_X509_LOOKUP, \
|
||||
- SSL_ERROR_SYSCALL, \
|
||||
- SSL_ERROR_SSL, \
|
||||
- SSL_ERROR_WANT_CONNECT, \
|
||||
- SSL_ERROR_EOF, \
|
||||
- SSL_ERROR_INVALID_ERROR_CODE
|
||||
+from _ssl import RAND_status, RAND_add
|
||||
+try:
|
||||
+ from _ssl import RAND_egd
|
||||
+except ImportError:
|
||||
+ # LibreSSL does not provide RAND_egd
|
||||
+ pass
|
||||
+
|
||||
+def _import_symbols(prefix):
|
||||
+ for n in dir(_ssl):
|
||||
+ if n.startswith(prefix):
|
||||
+ globals()[n] = getattr(_ssl, n)
|
||||
+
|
||||
+_import_symbols('OP_')
|
||||
+_import_symbols('ALERT_DESCRIPTION_')
|
||||
+_import_symbols('SSL_ERROR_')
|
||||
+_import_symbols('PROTOCOL_')
|
||||
+
|
||||
+_PROTOCOL_NAMES = dict([(value, name) for name, value in globals().items() if name.startswith('PROTOCOL_')])
|
||||
|
||||
from socket import socket, _fileobject
|
||||
from socket import getnameinfo as _getnameinfo
|
||||
@@ -394,7 +400,7 @@
|
||||
d = pem_cert_string.strip()[len(PEM_HEADER):-len(PEM_FOOTER)]
|
||||
return base64.decodestring(d)
|
||||
|
||||
-def get_server_certificate (addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
|
||||
+def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None):
|
||||
|
||||
"""Retrieve the certificate from the server at the specified address,
|
||||
and return it as a PEM-encoded string.
|
||||
diff -r -u ../Python-2.6.4.orig/Modules/_ssl.c ./Modules/_ssl.c
|
||||
--- ../Python-2.6.4.orig/Modules/_ssl.c 2012-04-10 15:32:09.000000000 +0000
|
||||
+++ ./Modules/_ssl.c 2015-12-18 14:45:30.419597074 +0000
|
||||
@@ -61,8 +61,12 @@
|
||||
};
|
||||
|
||||
enum py_ssl_version {
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
PY_SSL_VERSION_SSL2,
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
PY_SSL_VERSION_SSL3,
|
||||
+#endif
|
||||
PY_SSL_VERSION_SSL23,
|
||||
PY_SSL_VERSION_TLS1,
|
||||
};
|
||||
@@ -298,10 +302,14 @@
|
||||
PySSL_BEGIN_ALLOW_THREADS
|
||||
if (proto_version == PY_SSL_VERSION_TLS1)
|
||||
self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
else if (proto_version == PY_SSL_VERSION_SSL3)
|
||||
self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
else if (proto_version == PY_SSL_VERSION_SSL2)
|
||||
self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
|
||||
+#endif
|
||||
else if (proto_version == PY_SSL_VERSION_SSL23)
|
||||
self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */
|
||||
PySSL_END_ALLOW_THREADS
|
||||
@@ -1627,10 +1635,14 @@
|
||||
PY_SSL_CERT_REQUIRED);
|
||||
|
||||
/* protocol versions */
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv2",
|
||||
PY_SSL_VERSION_SSL2);
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv3",
|
||||
PY_SSL_VERSION_SSL3);
|
||||
+#endif
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv23",
|
||||
PY_SSL_VERSION_SSL23);
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_TLSv1",
|
||||
@@ -0,0 +1,71 @@
|
||||
|
||||
# HG changeset patch
|
||||
# User Barry Warsaw <barry@python.org>
|
||||
# Date 1302190091 14400
|
||||
# Node ID bd0f73a9538e05f526feaf05821e68bdcff498fa
|
||||
# Parent 2e4cdaffe493e879fb5367a4aa454491de451137
|
||||
Backport for Python 2.7 of issue 11715 support for building Python on
|
||||
multiarch Debian/Ubuntu.
|
||||
|
||||
diff -r -u setup.py setup.py
|
||||
--- setup.py.orig
|
||||
+++ setup.py
|
||||
@@ -15,6 +15,7 @@
|
||||
from distutils.command.build_ext import build_ext
|
||||
from distutils.command.install import install
|
||||
from distutils.command.install_lib import install_lib
|
||||
+from distutils.spawn import find_executable
|
||||
|
||||
# This global variable is used to hold the list of modules to be disabled.
|
||||
disabled_module_list = []
|
||||
@@ -308,10 +309,33 @@ class PyBuildExt(build_ext):
|
||||
return platform
|
||||
return sys.platform
|
||||
|
||||
+ def add_multiarch_paths(self):
|
||||
+ # Debian/Ubuntu multiarch support.
|
||||
+ # https://wiki.ubuntu.com/MultiarchSpec
|
||||
+ if not find_executable('dpkg-architecture'):
|
||||
+ return
|
||||
+ tmpfile = os.path.join(self.build_temp, 'multiarch')
|
||||
+ if not os.path.exists(self.build_temp):
|
||||
+ os.makedirs(self.build_temp)
|
||||
+ ret = os.system(
|
||||
+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
|
||||
+ tmpfile)
|
||||
+ try:
|
||||
+ if ret >> 8 == 0:
|
||||
+ with open(tmpfile) as fp:
|
||||
+ multiarch_path_component = fp.readline().strip()
|
||||
+ add_dir_to_list(self.compiler.library_dirs,
|
||||
+ '/usr/lib/' + multiarch_path_component)
|
||||
+ add_dir_to_list(self.compiler.include_dirs,
|
||||
+ '/usr/include/' + multiarch_path_component)
|
||||
+ finally:
|
||||
+ os.unlink(tmpfile)
|
||||
+
|
||||
def detect_modules(self):
|
||||
# Ensure that /usr/local is always used
|
||||
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||
+ self.add_multiarch_paths()
|
||||
|
||||
# Add paths specified in the environment variables LDFLAGS and
|
||||
# CPPFLAGS for header and library files.
|
||||
@@ -1331,14 +1355,13 @@
|
||||
|
||||
|
||||
# Platform-specific libraries
|
||||
- if platform == 'linux2':
|
||||
+ if platform.startswith('linux'):
|
||||
# Linux-specific modules
|
||||
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
|
||||
else:
|
||||
missing.append('linuxaudiodev')
|
||||
|
||||
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8'):
|
||||
+ if platform.startswith('linux') or platform.startswith('freebsd'):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
@@ -0,0 +1,61 @@
|
||||
diff -r -u ../Python-2.6.4.orig/Modules/readline.c ./Modules/readline.c
|
||||
--- ../Python-2.6.4.orig/Modules/readline.c 2013-11-10 16:36:41.000000000 +0900
|
||||
+++ ./Modules/readline.c 2014-03-29 16:17:48.643305752 +0900
|
||||
@@ -178,8 +178,7 @@
|
||||
if (!PyArg_ParseTuple(args, buf, &function))
|
||||
return NULL;
|
||||
if (function == Py_None) {
|
||||
- Py_XDECREF(*hook_var);
|
||||
- *hook_var = NULL;
|
||||
+ Py_CLEAR(*hook_var);
|
||||
}
|
||||
else if (PyCallable_Check(function)) {
|
||||
PyObject *tmp = *hook_var;
|
||||
@@ -655,14 +654,22 @@
|
||||
}
|
||||
|
||||
static int
|
||||
+#if defined(_RL_FUNCTION_TYPEDEF)
|
||||
on_startup_hook(void)
|
||||
+#else
|
||||
+on_startup_hook()
|
||||
+#endif
|
||||
{
|
||||
return on_hook(startup_hook);
|
||||
}
|
||||
|
||||
#ifdef HAVE_RL_PRE_INPUT_HOOK
|
||||
static int
|
||||
+#if defined(_RL_FUNCTION_TYPEDEF)
|
||||
on_pre_input_hook(void)
|
||||
+#else
|
||||
+on_pre_input_hook()
|
||||
+#endif
|
||||
{
|
||||
return on_hook(pre_input_hook);
|
||||
}
|
||||
@@ -757,7 +764,7 @@
|
||||
* before calling the normal completer */
|
||||
|
||||
static char **
|
||||
-flex_complete(char *text, int start, int end)
|
||||
+flex_complete(const char *text, int start, int end)
|
||||
{
|
||||
Py_XDECREF(begidx);
|
||||
Py_XDECREF(endidx);
|
||||
@@ -791,12 +798,12 @@
|
||||
rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
|
||||
rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
|
||||
/* Set our hook functions */
|
||||
- rl_startup_hook = (Function *)on_startup_hook;
|
||||
+ rl_startup_hook = on_startup_hook;
|
||||
#ifdef HAVE_RL_PRE_INPUT_HOOK
|
||||
- rl_pre_input_hook = (Function *)on_pre_input_hook;
|
||||
+ rl_pre_input_hook = on_pre_input_hook;
|
||||
#endif
|
||||
/* Set our completion function */
|
||||
- rl_attempted_completion_function = (CPPFunction *)flex_complete;
|
||||
+ rl_attempted_completion_function = flex_complete;
|
||||
/* Set Python word break characters */
|
||||
rl_completer_word_break_characters =
|
||||
strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?");
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -r -u ../Python-2.6.2.orig/setup.py ./setup.py
|
||||
--- ../Python-2.6.2.orig/setup.py 2013-10-30 00:04:39.000000000 +0900
|
||||
+++ ./setup.py 2014-04-03 22:28:49.122061684 +0900
|
||||
@@ -1564,7 +1564,7 @@
|
||||
# The versions with dots are used on Unix, and the versions without
|
||||
# dots on Windows, for detection by cygwin.
|
||||
tcllib = tklib = tcl_includes = tk_includes = None
|
||||
- for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2',
|
||||
+ for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83',
|
||||
'82', '8.1', '81', '8.0', '80']:
|
||||
tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
|
||||
tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)
|
||||
@@ -0,0 +1,95 @@
|
||||
diff -r -u ../Python-2.6.4.orig/Lib/ssl.py ./Lib/ssl.py
|
||||
--- ../Python-2.6.4.orig/Lib/ssl.py 2012-04-10 15:32:06.000000000 +0000
|
||||
+++ ./Lib/ssl.py 2015-12-18 14:46:36.487188331 +0000
|
||||
@@ -61,18 +61,24 @@
|
||||
|
||||
from _ssl import SSLError
|
||||
from _ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED
|
||||
-from _ssl import PROTOCOL_SSLv2, PROTOCOL_SSLv3, PROTOCOL_SSLv23, PROTOCOL_TLSv1
|
||||
-from _ssl import RAND_status, RAND_egd, RAND_add
|
||||
-from _ssl import \
|
||||
- SSL_ERROR_ZERO_RETURN, \
|
||||
- SSL_ERROR_WANT_READ, \
|
||||
- SSL_ERROR_WANT_WRITE, \
|
||||
- SSL_ERROR_WANT_X509_LOOKUP, \
|
||||
- SSL_ERROR_SYSCALL, \
|
||||
- SSL_ERROR_SSL, \
|
||||
- SSL_ERROR_WANT_CONNECT, \
|
||||
- SSL_ERROR_EOF, \
|
||||
- SSL_ERROR_INVALID_ERROR_CODE
|
||||
+from _ssl import RAND_status, RAND_add
|
||||
+try:
|
||||
+ from _ssl import RAND_egd
|
||||
+except ImportError:
|
||||
+ # LibreSSL does not provide RAND_egd
|
||||
+ pass
|
||||
+
|
||||
+def _import_symbols(prefix):
|
||||
+ for n in dir(_ssl):
|
||||
+ if n.startswith(prefix):
|
||||
+ globals()[n] = getattr(_ssl, n)
|
||||
+
|
||||
+_import_symbols('OP_')
|
||||
+_import_symbols('ALERT_DESCRIPTION_')
|
||||
+_import_symbols('SSL_ERROR_')
|
||||
+_import_symbols('PROTOCOL_')
|
||||
+
|
||||
+_PROTOCOL_NAMES = dict([(value, name) for name, value in globals().items() if name.startswith('PROTOCOL_')])
|
||||
|
||||
from socket import socket, _fileobject
|
||||
from socket import getnameinfo as _getnameinfo
|
||||
@@ -394,7 +400,7 @@
|
||||
d = pem_cert_string.strip()[len(PEM_HEADER):-len(PEM_FOOTER)]
|
||||
return base64.decodestring(d)
|
||||
|
||||
-def get_server_certificate (addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
|
||||
+def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None):
|
||||
|
||||
"""Retrieve the certificate from the server at the specified address,
|
||||
and return it as a PEM-encoded string.
|
||||
diff -r -u ../Python-2.6.4.orig/Modules/_ssl.c ./Modules/_ssl.c
|
||||
--- ../Python-2.6.4.orig/Modules/_ssl.c 2012-04-10 15:32:09.000000000 +0000
|
||||
+++ ./Modules/_ssl.c 2015-12-18 14:45:30.419597074 +0000
|
||||
@@ -61,8 +61,12 @@
|
||||
};
|
||||
|
||||
enum py_ssl_version {
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
PY_SSL_VERSION_SSL2,
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
PY_SSL_VERSION_SSL3,
|
||||
+#endif
|
||||
PY_SSL_VERSION_SSL23,
|
||||
PY_SSL_VERSION_TLS1,
|
||||
};
|
||||
@@ -298,10 +302,14 @@
|
||||
PySSL_BEGIN_ALLOW_THREADS
|
||||
if (proto_version == PY_SSL_VERSION_TLS1)
|
||||
self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
else if (proto_version == PY_SSL_VERSION_SSL3)
|
||||
self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
else if (proto_version == PY_SSL_VERSION_SSL2)
|
||||
self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
|
||||
+#endif
|
||||
else if (proto_version == PY_SSL_VERSION_SSL23)
|
||||
self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */
|
||||
PySSL_END_ALLOW_THREADS
|
||||
@@ -1627,10 +1635,14 @@
|
||||
PY_SSL_CERT_REQUIRED);
|
||||
|
||||
/* protocol versions */
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv2",
|
||||
PY_SSL_VERSION_SSL2);
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv3",
|
||||
PY_SSL_VERSION_SSL3);
|
||||
+#endif
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv23",
|
||||
PY_SSL_VERSION_SSL23);
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_TLSv1",
|
||||
@@ -0,0 +1,71 @@
|
||||
|
||||
# HG changeset patch
|
||||
# User Barry Warsaw <barry@python.org>
|
||||
# Date 1302190091 14400
|
||||
# Node ID bd0f73a9538e05f526feaf05821e68bdcff498fa
|
||||
# Parent 2e4cdaffe493e879fb5367a4aa454491de451137
|
||||
Backport for Python 2.7 of issue 11715 support for building Python on
|
||||
multiarch Debian/Ubuntu.
|
||||
|
||||
diff -r -u setup.py setup.py
|
||||
--- setup.py.orig
|
||||
+++ setup.py
|
||||
@@ -15,6 +15,7 @@
|
||||
from distutils.command.build_ext import build_ext
|
||||
from distutils.command.install import install
|
||||
from distutils.command.install_lib import install_lib
|
||||
+from distutils.spawn import find_executable
|
||||
|
||||
# This global variable is used to hold the list of modules to be disabled.
|
||||
disabled_module_list = []
|
||||
@@ -308,10 +309,33 @@ class PyBuildExt(build_ext):
|
||||
return platform
|
||||
return sys.platform
|
||||
|
||||
+ def add_multiarch_paths(self):
|
||||
+ # Debian/Ubuntu multiarch support.
|
||||
+ # https://wiki.ubuntu.com/MultiarchSpec
|
||||
+ if not find_executable('dpkg-architecture'):
|
||||
+ return
|
||||
+ tmpfile = os.path.join(self.build_temp, 'multiarch')
|
||||
+ if not os.path.exists(self.build_temp):
|
||||
+ os.makedirs(self.build_temp)
|
||||
+ ret = os.system(
|
||||
+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
|
||||
+ tmpfile)
|
||||
+ try:
|
||||
+ if ret >> 8 == 0:
|
||||
+ with open(tmpfile) as fp:
|
||||
+ multiarch_path_component = fp.readline().strip()
|
||||
+ add_dir_to_list(self.compiler.library_dirs,
|
||||
+ '/usr/lib/' + multiarch_path_component)
|
||||
+ add_dir_to_list(self.compiler.include_dirs,
|
||||
+ '/usr/include/' + multiarch_path_component)
|
||||
+ finally:
|
||||
+ os.unlink(tmpfile)
|
||||
+
|
||||
def detect_modules(self):
|
||||
# Ensure that /usr/local is always used
|
||||
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||
+ self.add_multiarch_paths()
|
||||
|
||||
# Add paths specified in the environment variables LDFLAGS and
|
||||
# CPPFLAGS for header and library files.
|
||||
@@ -1331,14 +1355,13 @@
|
||||
|
||||
|
||||
# Platform-specific libraries
|
||||
- if platform == 'linux2':
|
||||
+ if platform.startswith('linux'):
|
||||
# Linux-specific modules
|
||||
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
|
||||
else:
|
||||
missing.append('linuxaudiodev')
|
||||
|
||||
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8'):
|
||||
+ if platform.startswith('linux') or platform.startswith('freebsd'):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
@@ -0,0 +1,61 @@
|
||||
diff -r -u ../Python-2.6.4.orig/Modules/readline.c ./Modules/readline.c
|
||||
--- ../Python-2.6.4.orig/Modules/readline.c 2013-11-10 16:36:41.000000000 +0900
|
||||
+++ ./Modules/readline.c 2014-03-29 16:17:48.643305752 +0900
|
||||
@@ -178,8 +178,7 @@
|
||||
if (!PyArg_ParseTuple(args, buf, &function))
|
||||
return NULL;
|
||||
if (function == Py_None) {
|
||||
- Py_XDECREF(*hook_var);
|
||||
- *hook_var = NULL;
|
||||
+ Py_CLEAR(*hook_var);
|
||||
}
|
||||
else if (PyCallable_Check(function)) {
|
||||
PyObject *tmp = *hook_var;
|
||||
@@ -655,14 +654,22 @@
|
||||
}
|
||||
|
||||
static int
|
||||
+#if defined(_RL_FUNCTION_TYPEDEF)
|
||||
on_startup_hook(void)
|
||||
+#else
|
||||
+on_startup_hook()
|
||||
+#endif
|
||||
{
|
||||
return on_hook(startup_hook);
|
||||
}
|
||||
|
||||
#ifdef HAVE_RL_PRE_INPUT_HOOK
|
||||
static int
|
||||
+#if defined(_RL_FUNCTION_TYPEDEF)
|
||||
on_pre_input_hook(void)
|
||||
+#else
|
||||
+on_pre_input_hook()
|
||||
+#endif
|
||||
{
|
||||
return on_hook(pre_input_hook);
|
||||
}
|
||||
@@ -757,7 +764,7 @@
|
||||
* before calling the normal completer */
|
||||
|
||||
static char **
|
||||
-flex_complete(char *text, int start, int end)
|
||||
+flex_complete(const char *text, int start, int end)
|
||||
{
|
||||
Py_XDECREF(begidx);
|
||||
Py_XDECREF(endidx);
|
||||
@@ -791,12 +798,12 @@
|
||||
rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
|
||||
rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
|
||||
/* Set our hook functions */
|
||||
- rl_startup_hook = (Function *)on_startup_hook;
|
||||
+ rl_startup_hook = on_startup_hook;
|
||||
#ifdef HAVE_RL_PRE_INPUT_HOOK
|
||||
- rl_pre_input_hook = (Function *)on_pre_input_hook;
|
||||
+ rl_pre_input_hook = on_pre_input_hook;
|
||||
#endif
|
||||
/* Set our completion function */
|
||||
- rl_attempted_completion_function = (CPPFunction *)flex_complete;
|
||||
+ rl_attempted_completion_function = flex_complete;
|
||||
/* Set Python word break characters */
|
||||
rl_completer_word_break_characters =
|
||||
strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?");
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -r -u ../Python-2.6.4.orig/setup.py ./setup.py
|
||||
--- ../Python-2.6.4.orig/setup.py 2013-10-30 00:04:39.000000000 +0900
|
||||
+++ ./setup.py 2014-04-03 22:28:49.122061684 +0900
|
||||
@@ -1573,7 +1573,7 @@
|
||||
# The versions with dots are used on Unix, and the versions without
|
||||
# dots on Windows, for detection by cygwin.
|
||||
tcllib = tklib = tcl_includes = tk_includes = None
|
||||
- for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2',
|
||||
+ for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83',
|
||||
'82', '8.1', '81', '8.0', '80']:
|
||||
tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
|
||||
tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)
|
||||
@@ -0,0 +1,95 @@
|
||||
diff -r -u ../Python-2.6.4.orig/Lib/ssl.py ./Lib/ssl.py
|
||||
--- ../Python-2.6.4.orig/Lib/ssl.py 2012-04-10 15:32:06.000000000 +0000
|
||||
+++ ./Lib/ssl.py 2015-12-18 14:46:36.487188331 +0000
|
||||
@@ -61,18 +61,24 @@
|
||||
|
||||
from _ssl import SSLError
|
||||
from _ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED
|
||||
-from _ssl import PROTOCOL_SSLv2, PROTOCOL_SSLv3, PROTOCOL_SSLv23, PROTOCOL_TLSv1
|
||||
-from _ssl import RAND_status, RAND_egd, RAND_add
|
||||
-from _ssl import \
|
||||
- SSL_ERROR_ZERO_RETURN, \
|
||||
- SSL_ERROR_WANT_READ, \
|
||||
- SSL_ERROR_WANT_WRITE, \
|
||||
- SSL_ERROR_WANT_X509_LOOKUP, \
|
||||
- SSL_ERROR_SYSCALL, \
|
||||
- SSL_ERROR_SSL, \
|
||||
- SSL_ERROR_WANT_CONNECT, \
|
||||
- SSL_ERROR_EOF, \
|
||||
- SSL_ERROR_INVALID_ERROR_CODE
|
||||
+from _ssl import RAND_status, RAND_add
|
||||
+try:
|
||||
+ from _ssl import RAND_egd
|
||||
+except ImportError:
|
||||
+ # LibreSSL does not provide RAND_egd
|
||||
+ pass
|
||||
+
|
||||
+def _import_symbols(prefix):
|
||||
+ for n in dir(_ssl):
|
||||
+ if n.startswith(prefix):
|
||||
+ globals()[n] = getattr(_ssl, n)
|
||||
+
|
||||
+_import_symbols('OP_')
|
||||
+_import_symbols('ALERT_DESCRIPTION_')
|
||||
+_import_symbols('SSL_ERROR_')
|
||||
+_import_symbols('PROTOCOL_')
|
||||
+
|
||||
+_PROTOCOL_NAMES = dict([(value, name) for name, value in globals().items() if name.startswith('PROTOCOL_')])
|
||||
|
||||
from socket import socket, _fileobject
|
||||
from socket import getnameinfo as _getnameinfo
|
||||
@@ -394,7 +400,7 @@
|
||||
d = pem_cert_string.strip()[len(PEM_HEADER):-len(PEM_FOOTER)]
|
||||
return base64.decodestring(d)
|
||||
|
||||
-def get_server_certificate (addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
|
||||
+def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None):
|
||||
|
||||
"""Retrieve the certificate from the server at the specified address,
|
||||
and return it as a PEM-encoded string.
|
||||
diff -r -u ../Python-2.6.4.orig/Modules/_ssl.c ./Modules/_ssl.c
|
||||
--- ../Python-2.6.4.orig/Modules/_ssl.c 2012-04-10 15:32:09.000000000 +0000
|
||||
+++ ./Modules/_ssl.c 2015-12-18 14:45:30.419597074 +0000
|
||||
@@ -61,8 +61,12 @@
|
||||
};
|
||||
|
||||
enum py_ssl_version {
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
PY_SSL_VERSION_SSL2,
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
PY_SSL_VERSION_SSL3,
|
||||
+#endif
|
||||
PY_SSL_VERSION_SSL23,
|
||||
PY_SSL_VERSION_TLS1,
|
||||
};
|
||||
@@ -298,10 +302,14 @@
|
||||
PySSL_BEGIN_ALLOW_THREADS
|
||||
if (proto_version == PY_SSL_VERSION_TLS1)
|
||||
self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
else if (proto_version == PY_SSL_VERSION_SSL3)
|
||||
self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
else if (proto_version == PY_SSL_VERSION_SSL2)
|
||||
self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
|
||||
+#endif
|
||||
else if (proto_version == PY_SSL_VERSION_SSL23)
|
||||
self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */
|
||||
PySSL_END_ALLOW_THREADS
|
||||
@@ -1627,10 +1635,14 @@
|
||||
PY_SSL_CERT_REQUIRED);
|
||||
|
||||
/* protocol versions */
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv2",
|
||||
PY_SSL_VERSION_SSL2);
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv3",
|
||||
PY_SSL_VERSION_SSL3);
|
||||
+#endif
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv23",
|
||||
PY_SSL_VERSION_SSL23);
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_TLSv1",
|
||||
@@ -0,0 +1,71 @@
|
||||
|
||||
# HG changeset patch
|
||||
# User Barry Warsaw <barry@python.org>
|
||||
# Date 1302190091 14400
|
||||
# Node ID bd0f73a9538e05f526feaf05821e68bdcff498fa
|
||||
# Parent 2e4cdaffe493e879fb5367a4aa454491de451137
|
||||
Backport for Python 2.7 of issue 11715 support for building Python on
|
||||
multiarch Debian/Ubuntu.
|
||||
|
||||
diff -r -u setup.py setup.py
|
||||
--- setup.py.orig
|
||||
+++ setup.py
|
||||
@@ -15,6 +15,7 @@
|
||||
from distutils.command.build_ext import build_ext
|
||||
from distutils.command.install import install
|
||||
from distutils.command.install_lib import install_lib
|
||||
+from distutils.spawn import find_executable
|
||||
|
||||
# This global variable is used to hold the list of modules to be disabled.
|
||||
disabled_module_list = []
|
||||
@@ -308,10 +309,33 @@ class PyBuildExt(build_ext):
|
||||
return platform
|
||||
return sys.platform
|
||||
|
||||
+ def add_multiarch_paths(self):
|
||||
+ # Debian/Ubuntu multiarch support.
|
||||
+ # https://wiki.ubuntu.com/MultiarchSpec
|
||||
+ if not find_executable('dpkg-architecture'):
|
||||
+ return
|
||||
+ tmpfile = os.path.join(self.build_temp, 'multiarch')
|
||||
+ if not os.path.exists(self.build_temp):
|
||||
+ os.makedirs(self.build_temp)
|
||||
+ ret = os.system(
|
||||
+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
|
||||
+ tmpfile)
|
||||
+ try:
|
||||
+ if ret >> 8 == 0:
|
||||
+ with open(tmpfile) as fp:
|
||||
+ multiarch_path_component = fp.readline().strip()
|
||||
+ add_dir_to_list(self.compiler.library_dirs,
|
||||
+ '/usr/lib/' + multiarch_path_component)
|
||||
+ add_dir_to_list(self.compiler.include_dirs,
|
||||
+ '/usr/include/' + multiarch_path_component)
|
||||
+ finally:
|
||||
+ os.unlink(tmpfile)
|
||||
+
|
||||
def detect_modules(self):
|
||||
# Ensure that /usr/local is always used
|
||||
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||
+ self.add_multiarch_paths()
|
||||
|
||||
# Add paths specified in the environment variables LDFLAGS and
|
||||
# CPPFLAGS for header and library files.
|
||||
@@ -1331,14 +1355,13 @@
|
||||
|
||||
|
||||
# Platform-specific libraries
|
||||
- if platform == 'linux2':
|
||||
+ if platform.startswith('linux'):
|
||||
# Linux-specific modules
|
||||
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
|
||||
else:
|
||||
missing.append('linuxaudiodev')
|
||||
|
||||
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8'):
|
||||
+ if platform.startswith('linux') or platform.startswith('freebsd'):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
@@ -0,0 +1,61 @@
|
||||
diff -r -u ../Python-2.6.4.orig/Modules/readline.c ./Modules/readline.c
|
||||
--- ../Python-2.6.4.orig/Modules/readline.c 2013-11-10 16:36:41.000000000 +0900
|
||||
+++ ./Modules/readline.c 2014-03-29 16:17:48.643305752 +0900
|
||||
@@ -178,8 +178,7 @@
|
||||
if (!PyArg_ParseTuple(args, buf, &function))
|
||||
return NULL;
|
||||
if (function == Py_None) {
|
||||
- Py_XDECREF(*hook_var);
|
||||
- *hook_var = NULL;
|
||||
+ Py_CLEAR(*hook_var);
|
||||
}
|
||||
else if (PyCallable_Check(function)) {
|
||||
PyObject *tmp = *hook_var;
|
||||
@@ -655,14 +654,22 @@
|
||||
}
|
||||
|
||||
static int
|
||||
+#if defined(_RL_FUNCTION_TYPEDEF)
|
||||
on_startup_hook(void)
|
||||
+#else
|
||||
+on_startup_hook()
|
||||
+#endif
|
||||
{
|
||||
return on_hook(startup_hook);
|
||||
}
|
||||
|
||||
#ifdef HAVE_RL_PRE_INPUT_HOOK
|
||||
static int
|
||||
+#if defined(_RL_FUNCTION_TYPEDEF)
|
||||
on_pre_input_hook(void)
|
||||
+#else
|
||||
+on_pre_input_hook()
|
||||
+#endif
|
||||
{
|
||||
return on_hook(pre_input_hook);
|
||||
}
|
||||
@@ -757,7 +764,7 @@
|
||||
* before calling the normal completer */
|
||||
|
||||
static char **
|
||||
-flex_complete(char *text, int start, int end)
|
||||
+flex_complete(const char *text, int start, int end)
|
||||
{
|
||||
Py_XDECREF(begidx);
|
||||
Py_XDECREF(endidx);
|
||||
@@ -791,12 +798,12 @@
|
||||
rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
|
||||
rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
|
||||
/* Set our hook functions */
|
||||
- rl_startup_hook = (Function *)on_startup_hook;
|
||||
+ rl_startup_hook = on_startup_hook;
|
||||
#ifdef HAVE_RL_PRE_INPUT_HOOK
|
||||
- rl_pre_input_hook = (Function *)on_pre_input_hook;
|
||||
+ rl_pre_input_hook = on_pre_input_hook;
|
||||
#endif
|
||||
/* Set our completion function */
|
||||
- rl_attempted_completion_function = (CPPFunction *)flex_complete;
|
||||
+ rl_attempted_completion_function = flex_complete;
|
||||
/* Set Python word break characters */
|
||||
rl_completer_word_break_characters =
|
||||
strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?");
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -r -u ../Python-2.6.4.orig/setup.py ./setup.py
|
||||
--- ../Python-2.6.4.orig/setup.py 2013-10-30 00:04:39.000000000 +0900
|
||||
+++ ./setup.py 2014-04-03 22:28:49.122061684 +0900
|
||||
@@ -1573,7 +1573,7 @@
|
||||
# The versions with dots are used on Unix, and the versions without
|
||||
# dots on Windows, for detection by cygwin.
|
||||
tcllib = tklib = tcl_includes = tk_includes = None
|
||||
- for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2',
|
||||
+ for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83',
|
||||
'82', '8.1', '81', '8.0', '80']:
|
||||
tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
|
||||
tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)
|
||||
@@ -0,0 +1,95 @@
|
||||
diff -r -u ../Python-2.6.4.orig/Lib/ssl.py ./Lib/ssl.py
|
||||
--- ../Python-2.6.4.orig/Lib/ssl.py 2012-04-10 15:32:06.000000000 +0000
|
||||
+++ ./Lib/ssl.py 2015-12-18 14:46:36.487188331 +0000
|
||||
@@ -61,18 +61,24 @@
|
||||
|
||||
from _ssl import SSLError
|
||||
from _ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED
|
||||
-from _ssl import PROTOCOL_SSLv2, PROTOCOL_SSLv3, PROTOCOL_SSLv23, PROTOCOL_TLSv1
|
||||
-from _ssl import RAND_status, RAND_egd, RAND_add
|
||||
-from _ssl import \
|
||||
- SSL_ERROR_ZERO_RETURN, \
|
||||
- SSL_ERROR_WANT_READ, \
|
||||
- SSL_ERROR_WANT_WRITE, \
|
||||
- SSL_ERROR_WANT_X509_LOOKUP, \
|
||||
- SSL_ERROR_SYSCALL, \
|
||||
- SSL_ERROR_SSL, \
|
||||
- SSL_ERROR_WANT_CONNECT, \
|
||||
- SSL_ERROR_EOF, \
|
||||
- SSL_ERROR_INVALID_ERROR_CODE
|
||||
+from _ssl import RAND_status, RAND_add
|
||||
+try:
|
||||
+ from _ssl import RAND_egd
|
||||
+except ImportError:
|
||||
+ # LibreSSL does not provide RAND_egd
|
||||
+ pass
|
||||
+
|
||||
+def _import_symbols(prefix):
|
||||
+ for n in dir(_ssl):
|
||||
+ if n.startswith(prefix):
|
||||
+ globals()[n] = getattr(_ssl, n)
|
||||
+
|
||||
+_import_symbols('OP_')
|
||||
+_import_symbols('ALERT_DESCRIPTION_')
|
||||
+_import_symbols('SSL_ERROR_')
|
||||
+_import_symbols('PROTOCOL_')
|
||||
+
|
||||
+_PROTOCOL_NAMES = dict([(value, name) for name, value in globals().items() if name.startswith('PROTOCOL_')])
|
||||
|
||||
from socket import socket, _fileobject
|
||||
from socket import getnameinfo as _getnameinfo
|
||||
@@ -394,7 +400,7 @@
|
||||
d = pem_cert_string.strip()[len(PEM_HEADER):-len(PEM_FOOTER)]
|
||||
return base64.decodestring(d)
|
||||
|
||||
-def get_server_certificate (addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
|
||||
+def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None):
|
||||
|
||||
"""Retrieve the certificate from the server at the specified address,
|
||||
and return it as a PEM-encoded string.
|
||||
diff -r -u ../Python-2.6.4.orig/Modules/_ssl.c ./Modules/_ssl.c
|
||||
--- ../Python-2.6.4.orig/Modules/_ssl.c 2012-04-10 15:32:09.000000000 +0000
|
||||
+++ ./Modules/_ssl.c 2015-12-18 14:45:30.419597074 +0000
|
||||
@@ -61,8 +61,12 @@
|
||||
};
|
||||
|
||||
enum py_ssl_version {
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
PY_SSL_VERSION_SSL2,
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
PY_SSL_VERSION_SSL3,
|
||||
+#endif
|
||||
PY_SSL_VERSION_SSL23,
|
||||
PY_SSL_VERSION_TLS1,
|
||||
};
|
||||
@@ -298,10 +302,14 @@
|
||||
PySSL_BEGIN_ALLOW_THREADS
|
||||
if (proto_version == PY_SSL_VERSION_TLS1)
|
||||
self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
else if (proto_version == PY_SSL_VERSION_SSL3)
|
||||
self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
else if (proto_version == PY_SSL_VERSION_SSL2)
|
||||
self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
|
||||
+#endif
|
||||
else if (proto_version == PY_SSL_VERSION_SSL23)
|
||||
self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */
|
||||
PySSL_END_ALLOW_THREADS
|
||||
@@ -1627,10 +1635,14 @@
|
||||
PY_SSL_CERT_REQUIRED);
|
||||
|
||||
/* protocol versions */
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv2",
|
||||
PY_SSL_VERSION_SSL2);
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv3",
|
||||
PY_SSL_VERSION_SSL3);
|
||||
+#endif
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv23",
|
||||
PY_SSL_VERSION_SSL23);
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_TLSv1",
|
||||
@@ -0,0 +1,71 @@
|
||||
|
||||
# HG changeset patch
|
||||
# User Barry Warsaw <barry@python.org>
|
||||
# Date 1302190091 14400
|
||||
# Node ID bd0f73a9538e05f526feaf05821e68bdcff498fa
|
||||
# Parent 2e4cdaffe493e879fb5367a4aa454491de451137
|
||||
Backport for Python 2.7 of issue 11715 support for building Python on
|
||||
multiarch Debian/Ubuntu.
|
||||
|
||||
diff -r -u setup.py setup.py
|
||||
--- setup.py.orig
|
||||
+++ setup.py
|
||||
@@ -15,6 +15,7 @@
|
||||
from distutils.command.build_ext import build_ext
|
||||
from distutils.command.install import install
|
||||
from distutils.command.install_lib import install_lib
|
||||
+from distutils.spawn import find_executable
|
||||
|
||||
# This global variable is used to hold the list of modules to be disabled.
|
||||
disabled_module_list = []
|
||||
@@ -308,10 +309,33 @@ class PyBuildExt(build_ext):
|
||||
return platform
|
||||
return sys.platform
|
||||
|
||||
+ def add_multiarch_paths(self):
|
||||
+ # Debian/Ubuntu multiarch support.
|
||||
+ # https://wiki.ubuntu.com/MultiarchSpec
|
||||
+ if not find_executable('dpkg-architecture'):
|
||||
+ return
|
||||
+ tmpfile = os.path.join(self.build_temp, 'multiarch')
|
||||
+ if not os.path.exists(self.build_temp):
|
||||
+ os.makedirs(self.build_temp)
|
||||
+ ret = os.system(
|
||||
+ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
|
||||
+ tmpfile)
|
||||
+ try:
|
||||
+ if ret >> 8 == 0:
|
||||
+ with open(tmpfile) as fp:
|
||||
+ multiarch_path_component = fp.readline().strip()
|
||||
+ add_dir_to_list(self.compiler.library_dirs,
|
||||
+ '/usr/lib/' + multiarch_path_component)
|
||||
+ add_dir_to_list(self.compiler.include_dirs,
|
||||
+ '/usr/include/' + multiarch_path_component)
|
||||
+ finally:
|
||||
+ os.unlink(tmpfile)
|
||||
+
|
||||
def detect_modules(self):
|
||||
# Ensure that /usr/local is always used
|
||||
add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||
+ self.add_multiarch_paths()
|
||||
|
||||
# Add paths specified in the environment variables LDFLAGS and
|
||||
# CPPFLAGS for header and library files.
|
||||
@@ -1339,14 +1363,13 @@
|
||||
|
||||
|
||||
# Platform-specific libraries
|
||||
- if platform == 'linux2':
|
||||
+ if platform.startswith('linux'):
|
||||
# Linux-specific modules
|
||||
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
|
||||
else:
|
||||
missing.append('linuxaudiodev')
|
||||
|
||||
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8'):
|
||||
+ if platform.startswith('linux') or platform.startswith('freebsd'):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
@@ -0,0 +1,61 @@
|
||||
diff -r -u ../Python-2.6.5.orig/Modules/readline.c ./Modules/readline.c
|
||||
--- ../Python-2.6.5.orig/Modules/readline.c 2013-11-10 16:36:41.000000000 +0900
|
||||
+++ ./Modules/readline.c 2014-03-29 16:17:48.643305752 +0900
|
||||
@@ -199,8 +199,7 @@
|
||||
if (!PyArg_ParseTuple(args, buf, &function))
|
||||
return NULL;
|
||||
if (function == Py_None) {
|
||||
- Py_XDECREF(*hook_var);
|
||||
- *hook_var = NULL;
|
||||
+ Py_CLEAR(*hook_var);
|
||||
}
|
||||
else if (PyCallable_Check(function)) {
|
||||
PyObject *tmp = *hook_var;
|
||||
@@ -699,14 +698,22 @@
|
||||
}
|
||||
|
||||
static int
|
||||
+#if defined(_RL_FUNCTION_TYPEDEF)
|
||||
on_startup_hook(void)
|
||||
+#else
|
||||
+on_startup_hook()
|
||||
+#endif
|
||||
{
|
||||
return on_hook(startup_hook);
|
||||
}
|
||||
|
||||
#ifdef HAVE_RL_PRE_INPUT_HOOK
|
||||
static int
|
||||
+#if defined(_RL_FUNCTION_TYPEDEF)
|
||||
on_pre_input_hook(void)
|
||||
+#else
|
||||
+on_pre_input_hook()
|
||||
+#endif
|
||||
{
|
||||
return on_hook(pre_input_hook);
|
||||
}
|
||||
@@ -801,7 +808,7 @@
|
||||
* before calling the normal completer */
|
||||
|
||||
static char **
|
||||
-flex_complete(char *text, int start, int end)
|
||||
+flex_complete(const char *text, int start, int end)
|
||||
{
|
||||
#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
|
||||
rl_completion_append_character ='\0';
|
||||
@@ -841,12 +848,12 @@
|
||||
rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
|
||||
rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
|
||||
/* Set our hook functions */
|
||||
- rl_startup_hook = (Function *)on_startup_hook;
|
||||
+ rl_startup_hook = on_startup_hook;
|
||||
#ifdef HAVE_RL_PRE_INPUT_HOOK
|
||||
- rl_pre_input_hook = (Function *)on_pre_input_hook;
|
||||
+ rl_pre_input_hook = on_pre_input_hook;
|
||||
#endif
|
||||
/* Set our completion function */
|
||||
- rl_attempted_completion_function = (CPPFunction *)flex_complete;
|
||||
+ rl_attempted_completion_function = flex_complete;
|
||||
/* Set Python word break characters */
|
||||
rl_completer_word_break_characters =
|
||||
strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?");
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -r -u ../Python-2.6.5.orig/setup.py ./setup.py
|
||||
--- ../Python-2.6.5.orig/setup.py 2013-10-30 00:04:39.000000000 +0900
|
||||
+++ ./setup.py 2014-04-03 22:28:49.122061684 +0900
|
||||
@@ -1581,7 +1581,7 @@
|
||||
# The versions with dots are used on Unix, and the versions without
|
||||
# dots on Windows, for detection by cygwin.
|
||||
tcllib = tklib = tcl_includes = tk_includes = None
|
||||
- for version in ['8.5', '85', '8.4', '84', '8.3', '83', '8.2',
|
||||
+ for version in ['8.6', '86', '8.5', '85', '8.4', '84', '8.3', '83',
|
||||
'82', '8.1', '81', '8.0', '80']:
|
||||
tklib = self.compiler.find_library_file(lib_dirs, 'tk' + version)
|
||||
tcllib = self.compiler.find_library_file(lib_dirs, 'tcl' + version)
|
||||
@@ -0,0 +1,95 @@
|
||||
diff -r -u ../Python-2.6.5.orig/Lib/ssl.py ./Lib/ssl.py
|
||||
--- ../Python-2.6.5.orig/Lib/ssl.py 2012-04-10 15:32:06.000000000 +0000
|
||||
+++ ./Lib/ssl.py 2015-12-18 14:46:36.487188331 +0000
|
||||
@@ -61,18 +61,24 @@
|
||||
|
||||
from _ssl import SSLError
|
||||
from _ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED
|
||||
-from _ssl import PROTOCOL_SSLv2, PROTOCOL_SSLv3, PROTOCOL_SSLv23, PROTOCOL_TLSv1
|
||||
-from _ssl import RAND_status, RAND_egd, RAND_add
|
||||
-from _ssl import \
|
||||
- SSL_ERROR_ZERO_RETURN, \
|
||||
- SSL_ERROR_WANT_READ, \
|
||||
- SSL_ERROR_WANT_WRITE, \
|
||||
- SSL_ERROR_WANT_X509_LOOKUP, \
|
||||
- SSL_ERROR_SYSCALL, \
|
||||
- SSL_ERROR_SSL, \
|
||||
- SSL_ERROR_WANT_CONNECT, \
|
||||
- SSL_ERROR_EOF, \
|
||||
- SSL_ERROR_INVALID_ERROR_CODE
|
||||
+from _ssl import RAND_status, RAND_add
|
||||
+try:
|
||||
+ from _ssl import RAND_egd
|
||||
+except ImportError:
|
||||
+ # LibreSSL does not provide RAND_egd
|
||||
+ pass
|
||||
+
|
||||
+def _import_symbols(prefix):
|
||||
+ for n in dir(_ssl):
|
||||
+ if n.startswith(prefix):
|
||||
+ globals()[n] = getattr(_ssl, n)
|
||||
+
|
||||
+_import_symbols('OP_')
|
||||
+_import_symbols('ALERT_DESCRIPTION_')
|
||||
+_import_symbols('SSL_ERROR_')
|
||||
+_import_symbols('PROTOCOL_')
|
||||
+
|
||||
+_PROTOCOL_NAMES = dict([(value, name) for name, value in globals().items() if name.startswith('PROTOCOL_')])
|
||||
|
||||
from socket import socket, _fileobject
|
||||
from socket import getnameinfo as _getnameinfo
|
||||
@@ -394,7 +400,7 @@
|
||||
d = pem_cert_string.strip()[len(PEM_HEADER):-len(PEM_FOOTER)]
|
||||
return base64.decodestring(d)
|
||||
|
||||
-def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
|
||||
+def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None):
|
||||
|
||||
"""Retrieve the certificate from the server at the specified address,
|
||||
and return it as a PEM-encoded string.
|
||||
diff -r -u ../Python-2.6.5.orig/Modules/_ssl.c ./Modules/_ssl.c
|
||||
--- ../Python-2.6.5.orig/Modules/_ssl.c 2012-04-10 15:32:09.000000000 +0000
|
||||
+++ ./Modules/_ssl.c 2015-12-18 14:45:30.419597074 +0000
|
||||
@@ -61,8 +61,12 @@
|
||||
};
|
||||
|
||||
enum py_ssl_version {
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
PY_SSL_VERSION_SSL2,
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
PY_SSL_VERSION_SSL3,
|
||||
+#endif
|
||||
PY_SSL_VERSION_SSL23,
|
||||
PY_SSL_VERSION_TLS1,
|
||||
};
|
||||
@@ -298,10 +302,14 @@
|
||||
PySSL_BEGIN_ALLOW_THREADS
|
||||
if (proto_version == PY_SSL_VERSION_TLS1)
|
||||
self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
else if (proto_version == PY_SSL_VERSION_SSL3)
|
||||
self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
else if (proto_version == PY_SSL_VERSION_SSL2)
|
||||
self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
|
||||
+#endif
|
||||
else if (proto_version == PY_SSL_VERSION_SSL23)
|
||||
self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */
|
||||
PySSL_END_ALLOW_THREADS
|
||||
@@ -1627,10 +1635,14 @@
|
||||
PY_SSL_CERT_REQUIRED);
|
||||
|
||||
/* protocol versions */
|
||||
+#ifndef OPENSSL_NO_SSL2
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv2",
|
||||
PY_SSL_VERSION_SSL2);
|
||||
+#endif
|
||||
+#ifndef OPENSSL_NO_SSL3
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv3",
|
||||
PY_SSL_VERSION_SSL3);
|
||||
+#endif
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_SSLv23",
|
||||
PY_SSL_VERSION_SSL23);
|
||||
PyModule_AddIntConstant(m, "PROTOCOL_TLSv1",
|
||||
@@ -44,4 +44,20 @@ diff -r -u setup.py setup.py
|
||||
|
||||
# Add paths specified in the environment variables LDFLAGS and
|
||||
# CPPFLAGS for header and library files.
|
||||
|
||||
@@ -1443,14 +1443,13 @@
|
||||
|
||||
|
||||
# Platform-specific libraries
|
||||
- if platform == 'linux2':
|
||||
+ if platform.startswith('linux'):
|
||||
# Linux-specific modules
|
||||
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
|
||||
else:
|
||||
missing.append('linuxaudiodev')
|
||||
|
||||
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8'):
|
||||
+ if platform.startswith('linux') or platform.startswith('freebsd'):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
|
||||
@@ -44,4 +44,20 @@ diff -r -u setup.py setup.py
|
||||
|
||||
# Add paths specified in the environment variables LDFLAGS and
|
||||
# CPPFLAGS for header and library files.
|
||||
|
||||
@@ -1443,14 +1443,13 @@
|
||||
|
||||
|
||||
# Platform-specific libraries
|
||||
- if platform == 'linux2':
|
||||
+ if platform.startswith('linux'):
|
||||
# Linux-specific modules
|
||||
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
|
||||
else:
|
||||
missing.append('linuxaudiodev')
|
||||
|
||||
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8'):
|
||||
+ if platform.startswith('linux') or platform.startswith('freebsd'):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
|
||||
@@ -44,4 +44,20 @@ diff -r -u setup.py setup.py
|
||||
|
||||
# Add paths specified in the environment variables LDFLAGS and
|
||||
# CPPFLAGS for header and library files.
|
||||
|
||||
@@ -1443,14 +1443,13 @@
|
||||
|
||||
|
||||
# Platform-specific libraries
|
||||
- if platform == 'linux2':
|
||||
+ if platform.startswith('linux'):
|
||||
# Linux-specific modules
|
||||
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
|
||||
else:
|
||||
missing.append('linuxaudiodev')
|
||||
|
||||
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8'):
|
||||
+ if platform.startswith('linux') or platform.startswith('freebsd'):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
|
||||
@@ -44,4 +44,20 @@ diff -r -u setup.py setup.py
|
||||
|
||||
# Add paths specified in the environment variables LDFLAGS and
|
||||
# CPPFLAGS for header and library files.
|
||||
|
||||
@@ -1443,14 +1443,13 @@
|
||||
|
||||
|
||||
# Platform-specific libraries
|
||||
- if platform == 'linux2':
|
||||
+ if platform.startswith('linux'):
|
||||
# Linux-specific modules
|
||||
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
|
||||
else:
|
||||
missing.append('linuxaudiodev')
|
||||
|
||||
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8'):
|
||||
+ if platform.startswith('linux') or platform.startswith('freebsd'):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
From 5495fb4719fa67ea3abeda0434699c8b28c77bb3 Mon Sep 17 00:00:00 2001
|
||||
From: Takumi Sueda <puhitaku@gmail.com>
|
||||
Date: Sat, 11 Sep 2021 16:50:14 +0900
|
||||
Subject: [PATCH 1/7] Detect arm64 in configure
|
||||
|
||||
---
|
||||
configure | 3 +++
|
||||
configure.ac | 3 +++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 63d675312d..c40ec120de 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -8474,6 +8474,9 @@ fi
|
||||
ppc)
|
||||
MACOSX_DEFAULT_ARCH="ppc64"
|
||||
;;
|
||||
+ arm64)
|
||||
+ MACOSX_DEFAULT_ARCH="arm64"
|
||||
+ ;;
|
||||
*)
|
||||
as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
|
||||
;;
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index efe6922b5d..df05bee87b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2066,6 +2066,9 @@ case $ac_sys_system/$ac_sys_release in
|
||||
ppc)
|
||||
MACOSX_DEFAULT_ARCH="ppc64"
|
||||
;;
|
||||
+ arm64)
|
||||
+ MACOSX_DEFAULT_ARCH="arm64"
|
||||
+ ;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
|
||||
;;
|
||||
--
|
||||
2.30.1
|
||||
|
||||
@@ -0,0 +1,237 @@
|
||||
From f17b9e30bd295b1eec68105e3f04568477ce6286 Mon Sep 17 00:00:00 2001
|
||||
From: Takumi Sueda <puhitaku@gmail.com>
|
||||
Date: Sat, 11 Sep 2021 17:14:34 +0900
|
||||
Subject: [PATCH 2/7] Fix macOS _tkinter use of Tck/Tk in /Library/Framework
|
||||
|
||||
Modified and imported from https://github.com/Homebrew/formula-patches/blob/master/python/3.8.7.patch
|
||||
---
|
||||
setup.py | 148 +++++++++++++++++++++++++++++++++++++++----------------
|
||||
1 file changed, 106 insertions(+), 42 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index f764223d06..da1d34efaf 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -50,6 +50,7 @@ def add_dir_to_list(dirlist, dir):
|
||||
dirlist.insert(0, dir)
|
||||
|
||||
MACOS_SDK_ROOT = None
|
||||
+MACOS_SDK_SPECIFIED = None
|
||||
|
||||
def macosx_sdk_root():
|
||||
"""Return the directory of the current macOS SDK.
|
||||
@@ -61,8 +62,9 @@ def macosx_sdk_root():
|
||||
(The SDK may be supplied via Xcode or via the Command Line Tools).
|
||||
The SDK paths used by Apple-supplied tool chains depend on the
|
||||
setting of various variables; see the xcrun man page for more info.
|
||||
+ Also sets MACOS_SDK_SPECIFIED for use by macosx_sdk_specified().
|
||||
"""
|
||||
- global MACOS_SDK_ROOT
|
||||
+ global MACOS_SDK_ROOT, MACOS_SDK_SPECIFIED
|
||||
|
||||
# If already called, return cached result.
|
||||
if MACOS_SDK_ROOT:
|
||||
@@ -72,8 +74,10 @@ def macosx_sdk_root():
|
||||
m = re.search(r'-isysroot\s+(\S+)', cflags)
|
||||
if m is not None:
|
||||
MACOS_SDK_ROOT = m.group(1)
|
||||
+ MACOS_SDK_SPECIFIED = MACOS_SDK_ROOT != '/'
|
||||
else:
|
||||
MACOS_SDK_ROOT = '/'
|
||||
+ MACOS_SDK_SPECIFIED = False
|
||||
cc = sysconfig.get_config_var('CC')
|
||||
tmpfile = '/tmp/setup_sdk_root.%d' % os.getpid()
|
||||
try:
|
||||
@@ -101,6 +105,27 @@ def macosx_sdk_root():
|
||||
|
||||
return MACOS_SDK_ROOT
|
||||
|
||||
+def macosx_sdk_specified():
|
||||
+ """Returns true if an SDK was explicitly configured.
|
||||
+
|
||||
+ True if an SDK was selected at configure time, either by specifying
|
||||
+ --enable-universalsdk=(something other than no or /) or by adding a
|
||||
+ -isysroot option to CFLAGS. In some cases, like when making
|
||||
+ decisions about macOS Tk framework paths, we need to be able to
|
||||
+ know whether the user explicitly asked to build with an SDK versus
|
||||
+ the implicit use of an SDK when header files are no longer
|
||||
+ installed on a running system by the Command Line Tools.
|
||||
+ """
|
||||
+ global MACOS_SDK_SPECIFIED
|
||||
+
|
||||
+ # If already called, return cached result.
|
||||
+ if MACOS_SDK_SPECIFIED:
|
||||
+ return MACOS_SDK_SPECIFIED
|
||||
+
|
||||
+ # Find the sdk root and set MACOS_SDK_SPECIFIED
|
||||
+ macosx_sdk_root()
|
||||
+ return MACOS_SDK_SPECIFIED
|
||||
+
|
||||
def is_macosx_sdk_path(path):
|
||||
"""
|
||||
Returns True if 'path' can be located in an OSX SDK
|
||||
@@ -1834,31 +1859,72 @@ class PyBuildExt(build_ext):
|
||||
return 1
|
||||
|
||||
def detect_tkinter_darwin(self, inc_dirs, lib_dirs):
|
||||
- # The _tkinter module, using frameworks. Since frameworks are quite
|
||||
- # different the UNIX search logic is not sharable.
|
||||
- from os.path import join, exists
|
||||
- framework_dirs = [
|
||||
- '/Library/Frameworks',
|
||||
- '/System/Library/Frameworks/',
|
||||
- join(os.getenv('HOME'), '/Library/Frameworks')
|
||||
- ]
|
||||
+ # Build default _tkinter on macOS using Tcl and Tk frameworks.
|
||||
+ #
|
||||
+ # The macOS native Tk (AKA Aqua Tk) and Tcl are most commonly
|
||||
+ # built and installed as macOS framework bundles. However,
|
||||
+ # for several reasons, we cannot take full advantage of the
|
||||
+ # Apple-supplied compiler chain's -framework options here.
|
||||
+ # Instead, we need to find and pass to the compiler the
|
||||
+ # absolute paths of the Tcl and Tk headers files we want to use
|
||||
+ # and the absolute path to the directory containing the Tcl
|
||||
+ # and Tk frameworks for linking.
|
||||
+ #
|
||||
+ # We want to handle here two common use cases on macOS:
|
||||
+ # 1. Build and link with system-wide third-party or user-built
|
||||
+ # Tcl and Tk frameworks installed in /Library/Frameworks.
|
||||
+ # 2. Build and link using a user-specified macOS SDK so that the
|
||||
+ # built Python can be exported to other systems. In this case,
|
||||
+ # search only the SDK's /Library/Frameworks (normally empty)
|
||||
+ # and /System/Library/Frameworks.
|
||||
+ #
|
||||
+ # Any other use case should be able to be handled explicitly by
|
||||
+ # using the options described above in detect_tkinter_explicitly().
|
||||
+ # In particular it would be good to handle here the case where
|
||||
+ # you want to build and link with a framework build of Tcl and Tk
|
||||
+ # that is not in /Library/Frameworks, say, in your private
|
||||
+ # $HOME/Library/Frameworks directory or elsewhere. It turns
|
||||
+ # out to be difficult to make that work automtically here
|
||||
+ # without bringing into play more tools and magic. That case
|
||||
+ # can be hamdled using a recipe with the right arguments
|
||||
+ # to detect_tkinter_explicitly().
|
||||
+ #
|
||||
+ # Note also that the fallback case here is to try to use the
|
||||
+ # Apple-supplied Tcl and Tk frameworks in /System/Library but
|
||||
+ # be forewarned that they are deprecated by Apple and typically
|
||||
+ # out-of-date and buggy; their use should be avoided if at
|
||||
+ # all possible by installing a newer version of Tcl and Tk in
|
||||
+ # /Library/Frameworks before bwfore building Python without
|
||||
+ # an explicit SDK or by configuring build arguments explicitly.
|
||||
|
||||
- sysroot = macosx_sdk_root()
|
||||
+ from os.path import join, exists
|
||||
+ sysroot = macosx_sdk_root() # path to the SDK or '/'
|
||||
+
|
||||
+ if macosx_sdk_specified():
|
||||
+ # Use case #2: an SDK other than '/' was specified.
|
||||
+ # Only search there.
|
||||
+ framework_dirs = [
|
||||
+ join(sysroot, 'Library', 'Frameworks'),
|
||||
+ join(sysroot, 'System', 'Library', 'Frameworks'),
|
||||
+ ]
|
||||
+ else:
|
||||
+ # Use case #1: no explicit SDK selected.
|
||||
+ # Search the local system-wide /Library/Frameworks,
|
||||
+ # not the one in the default SDK, othewise fall back to
|
||||
+ # /System/Library/Frameworks whose header files may be in
|
||||
+ # the default SDK or, on older systems, actually installed.
|
||||
+ framework_dirs = [
|
||||
+ join('/', 'Library', 'Frameworks'),
|
||||
+ join(sysroot, 'System', 'Library', 'Frameworks'),
|
||||
+ ]
|
||||
|
||||
- # Find the directory that contains the Tcl.framework and Tk.framework
|
||||
- # bundles.
|
||||
- # XXX distutils should support -F!
|
||||
+ # Find the directory that contains the Tcl.framework and
|
||||
+ # Tk.framework bundles.
|
||||
for F in framework_dirs:
|
||||
# both Tcl.framework and Tk.framework should be present
|
||||
-
|
||||
-
|
||||
for fw in 'Tcl', 'Tk':
|
||||
- if is_macosx_sdk_path(F):
|
||||
- if not exists(join(sysroot, F[1:], fw + '.framework')):
|
||||
- break
|
||||
- else:
|
||||
- if not exists(join(F, fw + '.framework')):
|
||||
- break
|
||||
+ if not exists(join(F, fw + '.framework')):
|
||||
+ break
|
||||
else:
|
||||
# ok, F is now directory with both frameworks. Continure
|
||||
# building
|
||||
@@ -1868,32 +1934,20 @@ class PyBuildExt(build_ext):
|
||||
# will now resume.
|
||||
return 0
|
||||
|
||||
- # For 8.4a2, we must add -I options that point inside the Tcl and Tk
|
||||
- # frameworks. In later release we should hopefully be able to pass
|
||||
- # the -F option to gcc, which specifies a framework lookup path.
|
||||
- #
|
||||
include_dirs = [
|
||||
join(F, fw + '.framework', H)
|
||||
for fw in 'Tcl', 'Tk'
|
||||
- for H in 'Headers', 'Versions/Current/PrivateHeaders'
|
||||
+ for H in ('Headers',)
|
||||
]
|
||||
|
||||
- # For 8.4a2, the X11 headers are not included. Rather than include a
|
||||
- # complicated search, this is a hard-coded path. It could bail out
|
||||
- # if X11 libs are not found...
|
||||
- include_dirs.append('/usr/X11R6/include')
|
||||
- frameworks = ['-framework', 'Tcl', '-framework', 'Tk']
|
||||
+ # Add the base framework directory as well
|
||||
+ compile_args = ['-F', F]
|
||||
|
||||
- # All existing framework builds of Tcl/Tk don't support 64-bit
|
||||
- # architectures.
|
||||
+ # Do not build tkinter for archs that this Tk was not built with.
|
||||
cflags = sysconfig.get_config_vars('CFLAGS')[0]
|
||||
archs = re.findall('-arch\s+(\w+)', cflags)
|
||||
|
||||
- if is_macosx_sdk_path(F):
|
||||
- fp = os.popen("file %s/Tk.framework/Tk | grep 'for architecture'"%(os.path.join(sysroot, F[1:]),))
|
||||
- else:
|
||||
- fp = os.popen("file %s/Tk.framework/Tk | grep 'for architecture'"%(F,))
|
||||
-
|
||||
+ fp = os.popen("file %s/Tk.framework/Tk | grep 'for architecture'"%(F,))
|
||||
detected_archs = []
|
||||
for ln in fp:
|
||||
a = ln.split()[-1]
|
||||
@@ -1901,16 +1955,26 @@ class PyBuildExt(build_ext):
|
||||
detected_archs.append(ln.split()[-1])
|
||||
fp.close()
|
||||
|
||||
+ arch_args = []
|
||||
for a in detected_archs:
|
||||
- frameworks.append('-arch')
|
||||
- frameworks.append(a)
|
||||
+ arch_args.append('-arch')
|
||||
+ arch_args.append(a)
|
||||
+
|
||||
+ compile_args += arch_args
|
||||
+ link_args = [','.join(['-Wl', '-F', F, '-framework', 'Tcl', '-framework', 'Tk'])] + arch_args
|
||||
+
|
||||
+ # The X11/xlib.h file bundled in the Tk sources can cause function
|
||||
+ # prototype warnings from the compiler. Since we cannot easily fix
|
||||
+ # that, suppress the warnings here instead.
|
||||
+ if '-Wstrict-prototypes' in cflags.split():
|
||||
+ compile_args.append('-Wno-strict-prototypes')
|
||||
|
||||
ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'],
|
||||
define_macros=[('WITH_APPINIT', 1)],
|
||||
include_dirs = include_dirs,
|
||||
libraries = [],
|
||||
- extra_compile_args = frameworks[2:],
|
||||
- extra_link_args = frameworks,
|
||||
+ extra_compile_args = compile_args,
|
||||
+ extra_link_args = link_args,
|
||||
)
|
||||
self.extensions.append(ext)
|
||||
return 1
|
||||
--
|
||||
2.30.1
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From d93a26fee21a5f91c51d8cb14ecaf29122f1b222 Mon Sep 17 00:00:00 2001
|
||||
From: Takumi Sueda <puhitaku@gmail.com>
|
||||
Date: Sat, 11 Sep 2021 17:25:00 +0900
|
||||
Subject: [PATCH 3/7] Support "arm64" in Mac/Tools/pythonw
|
||||
|
||||
Imported from: https://github.com/Homebrew/formula-patches/blob/master/python/3.8.7.patch
|
||||
---
|
||||
Mac/Tools/pythonw.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/Mac/Tools/pythonw.c b/Mac/Tools/pythonw.c
|
||||
index 76734c1063..ebe5e8d975 100644
|
||||
--- a/Mac/Tools/pythonw.c
|
||||
+++ b/Mac/Tools/pythonw.c
|
||||
@@ -116,10 +116,16 @@ setup_spawnattr(posix_spawnattr_t* spawnattr)
|
||||
|
||||
#elif defined(__ppc__)
|
||||
cpu_types[0] = CPU_TYPE_POWERPC;
|
||||
+
|
||||
#elif defined(__i386__)
|
||||
cpu_types[0] = CPU_TYPE_X86;
|
||||
+
|
||||
+#elif defined(__arm64__)
|
||||
+ cpu_types[0] = CPU_TYPE_ARM64;
|
||||
+
|
||||
#else
|
||||
# error "Unknown CPU"
|
||||
+
|
||||
#endif
|
||||
|
||||
if (posix_spawnattr_setbinpref_np(spawnattr, count,
|
||||
--
|
||||
2.30.1
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
From a1b08c7de72c27d80a86b92c263d1f5b351e581b Mon Sep 17 00:00:00 2001
|
||||
From: Takumi Sueda <puhitaku@gmail.com>
|
||||
Date: Sat, 11 Sep 2021 18:07:48 +0900
|
||||
Subject: [PATCH 4/7] Use system libffi for Mac OS 10.15 and up
|
||||
|
||||
Modified and imported from: https://github.com/Homebrew/formula-patches/blob/master/python/3.8.7.patch
|
||||
---
|
||||
setup.py | 37 ++++++++++++++++++++++++++++---------
|
||||
1 file changed, 28 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index da1d34efaf..c92d0552e3 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -126,6 +126,13 @@ def macosx_sdk_specified():
|
||||
macosx_sdk_root()
|
||||
return MACOS_SDK_SPECIFIED
|
||||
|
||||
+def is_macosx_at_least(vers):
|
||||
+ if host_platform == 'darwin':
|
||||
+ dep_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
|
||||
+ if dep_target:
|
||||
+ return tuple(map(int, str(dep_target).split('.'))) >= vers
|
||||
+ return False
|
||||
+
|
||||
def is_macosx_sdk_path(path):
|
||||
"""
|
||||
Returns True if 'path' can be located in an OSX SDK
|
||||
@@ -2180,7 +2187,11 @@ class PyBuildExt(build_ext):
|
||||
return True
|
||||
|
||||
def detect_ctypes(self, inc_dirs, lib_dirs):
|
||||
- self.use_system_libffi = False
|
||||
+ if not sysconfig.get_config_var("LIBFFI_INCLUDEDIR") and is_macosx_at_least((10,15)):
|
||||
+ self.use_system_libffi = True
|
||||
+ else:
|
||||
+ self.use_system_libffi = '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS")
|
||||
+
|
||||
include_dirs = []
|
||||
extra_compile_args = []
|
||||
extra_link_args = []
|
||||
@@ -2224,15 +2235,24 @@ class PyBuildExt(build_ext):
|
||||
sources=['_ctypes/_ctypes_test.c'])
|
||||
self.extensions.extend([ext, ext_test])
|
||||
|
||||
- if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"):
|
||||
- return
|
||||
+ ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")]
|
||||
+ ffi_lib = None
|
||||
|
||||
+ #inc_dirs = self.inc_dirs.copy()
|
||||
+ inc_dirs = self.compiler.include_dirs[:]
|
||||
if host_platform == 'darwin':
|
||||
- # OS X 10.5 comes with libffi.dylib; the include files are
|
||||
- # in /usr/include/ffi
|
||||
- inc_dirs.append('/usr/include/ffi')
|
||||
+ if not self.use_system_libffi:
|
||||
+ return
|
||||
+ ffi_in_sdk = os.path.join(macosx_sdk_root(), "usr/include/ffi")
|
||||
+ if os.path.exists(ffi_in_sdk):
|
||||
+ ffi_inc = [ffi_in_sdk]
|
||||
+ ffi_lib = 'ffi'
|
||||
+ sources.remove('_ctypes/malloc_closure.c')
|
||||
+ else:
|
||||
+ # OS X 10.5 comes with libffi.dylib; the include files are
|
||||
+ # in /usr/include/ffi
|
||||
+ inc_dirs.append('/usr/include/ffi')
|
||||
|
||||
- ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")]
|
||||
if not ffi_inc or ffi_inc[0] == '':
|
||||
ffi_inc = find_file('ffi.h', [], inc_dirs)
|
||||
if ffi_inc is not None:
|
||||
@@ -2247,8 +2267,7 @@ class PyBuildExt(build_ext):
|
||||
ffi_inc = None
|
||||
print('Header file {} does not define LIBFFI_H or '
|
||||
'ffi_wrapper_h'.format(ffi_h))
|
||||
- ffi_lib = None
|
||||
- if ffi_inc is not None:
|
||||
+ if ffi_lib is None and ffi_inc is not None:
|
||||
for lib_name in ('ffi_convenience', 'ffi_pic', 'ffi'):
|
||||
if (self.compiler.find_library_file(lib_dirs, lib_name)):
|
||||
ffi_lib = lib_name
|
||||
--
|
||||
2.30.1
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
From 4394ec26842b04335b30b9a0595fcc8591c68496 Mon Sep 17 00:00:00 2001
|
||||
From: Takumi Sueda <puhitaku@gmail.com>
|
||||
Date: Sat, 11 Sep 2021 18:59:44 +0900
|
||||
Subject: [PATCH 5/7] ctypes: use the correct ABI for variadic functions
|
||||
|
||||
Modified and imported from https://github.com/Homebrew/formula-patches/blob/master/python/3.8.7.patch
|
||||
---
|
||||
Doc/library/ctypes.rst | 6 +++++
|
||||
Lib/test/test_str.py | 2 ++
|
||||
Lib/test/test_unicode.py | 3 +++
|
||||
Modules/_ctypes/_ctypes.c | 31 +++++++++++++++++++++++
|
||||
Modules/_ctypes/callproc.c | 51 +++++++++++++++++++++++++++++---------
|
||||
Modules/_ctypes/ctypes.h | 1 +
|
||||
6 files changed, 82 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
|
||||
index 6a5299145f..ec97da607f 100644
|
||||
--- a/Doc/library/ctypes.rst
|
||||
+++ b/Doc/library/ctypes.rst
|
||||
@@ -1584,6 +1584,12 @@ They are instances of a private class:
|
||||
value usable as argument (integer, string, ctypes instance). This allows
|
||||
defining adapters that can adapt custom objects as function parameters.
|
||||
|
||||
+ .. attribute:: variadic
|
||||
+
|
||||
+ Assign a boolean to specify that the function takes a variable number of
|
||||
+ arguments. This does not matter on most platforms, but for Apple arm64
|
||||
+ platforms variadic functions have a different calling convention than
|
||||
+ normal functions.
|
||||
|
||||
.. attribute:: errcheck
|
||||
|
||||
diff --git a/Lib/test/test_str.py b/Lib/test/test_str.py
|
||||
index 73ed542a51..131f6d13e0 100644
|
||||
--- a/Lib/test/test_str.py
|
||||
+++ b/Lib/test/test_str.py
|
||||
@@ -489,6 +489,8 @@ class CAPITest(unittest.TestCase):
|
||||
c_char_p)
|
||||
|
||||
PyString_FromFormat = pythonapi.PyString_FromFormat
|
||||
+ PyString_FromFormat.variadic = True
|
||||
+ PyString_FromFormat.argtypes = (c_char_p,)
|
||||
PyString_FromFormat.restype = py_object
|
||||
|
||||
# basic tests
|
||||
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
|
||||
index 92476f68a5..23e9e643e0 100644
|
||||
--- a/Lib/test/test_unicode.py
|
||||
+++ b/Lib/test/test_unicode.py
|
||||
@@ -1676,6 +1676,7 @@ class CAPITest(unittest.TestCase):
|
||||
def test_from_format(self):
|
||||
test_support.import_module('ctypes')
|
||||
from ctypes import (
|
||||
+ c_char_p,
|
||||
pythonapi, py_object, sizeof,
|
||||
c_int, c_long, c_longlong, c_ssize_t,
|
||||
c_uint, c_ulong, c_ulonglong, c_size_t, c_void_p)
|
||||
@@ -1684,6 +1685,8 @@ class CAPITest(unittest.TestCase):
|
||||
else:
|
||||
name = "PyUnicodeUCS4_FromFormat"
|
||||
_PyUnicode_FromFormat = getattr(pythonapi, name)
|
||||
+ _PyUnicode_FromFormat.argtypes = (c_char_p,)
|
||||
+ _PyUnicode_FromFormat.variadic = True
|
||||
_PyUnicode_FromFormat.restype = py_object
|
||||
|
||||
def PyUnicode_FromFormat(format, *args):
|
||||
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
|
||||
index bef251ef04..d03b98d09c 100644
|
||||
--- a/Modules/_ctypes/_ctypes.c
|
||||
+++ b/Modules/_ctypes/_ctypes.c
|
||||
@@ -3253,6 +3253,34 @@ PyCFuncPtr_get_restype(PyCFuncPtrObject *self)
|
||||
}
|
||||
}
|
||||
|
||||
+static int
|
||||
+PyCFuncPtr_set_variadic(PyCFuncPtrObject *self, PyObject *ob)
|
||||
+{
|
||||
+ StgDictObject *dict = PyObject_stgdict((PyObject *)self);
|
||||
+ assert(dict);
|
||||
+ int r = PyObject_IsTrue(ob);
|
||||
+ if (r == 1) {
|
||||
+ dict->flags |= FUNCFLAG_VARIADIC;
|
||||
+ return 0;
|
||||
+ } else if (r == 0) {
|
||||
+ dict->flags &= ~FUNCFLAG_VARIADIC;
|
||||
+ return 0;
|
||||
+ } else {
|
||||
+ return -1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static PyObject *
|
||||
+PyCFuncPtr_get_variadic(PyCFuncPtrObject *self)
|
||||
+{
|
||||
+ StgDictObject *dict = PyObject_stgdict((PyObject *)self);
|
||||
+ assert(dict); /* Cannot be NULL for PyCFuncPtrObject instances */
|
||||
+ if (dict->flags & FUNCFLAG_VARIADIC)
|
||||
+ Py_RETURN_TRUE;
|
||||
+ else
|
||||
+ Py_RETURN_FALSE;
|
||||
+}
|
||||
+
|
||||
static int
|
||||
PyCFuncPtr_set_argtypes(PyCFuncPtrObject *self, PyObject *ob)
|
||||
{
|
||||
@@ -3299,6 +3327,8 @@ static PyGetSetDef PyCFuncPtr_getsets[] = {
|
||||
{ "argtypes", (getter)PyCFuncPtr_get_argtypes,
|
||||
(setter)PyCFuncPtr_set_argtypes,
|
||||
"specify the argument types", NULL },
|
||||
+ { "variadic", (getter)PyCFuncPtr_get_variadic, (setter)PyCFuncPtr_set_variadic,
|
||||
+ "specify if function takes variable number of arguments", NULL },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -5838,6 +5868,7 @@ init_ctypes(void)
|
||||
PyModule_AddObject(m, "FUNCFLAG_USE_ERRNO", PyInt_FromLong(FUNCFLAG_USE_ERRNO));
|
||||
PyModule_AddObject(m, "FUNCFLAG_USE_LASTERROR", PyInt_FromLong(FUNCFLAG_USE_LASTERROR));
|
||||
PyModule_AddObject(m, "FUNCFLAG_PYTHONAPI", PyInt_FromLong(FUNCFLAG_PYTHONAPI));
|
||||
+ PyModule_AddObject(m, "FUNCFLAG_VARIADIC", PyInt_FromLong(FUNCFLAG_VARIADIC));
|
||||
PyModule_AddStringConstant(m, "__version__", "1.1.0");
|
||||
|
||||
PyModule_AddObject(m, "_memmove_addr", PyLong_FromVoidPtr(memmove));
|
||||
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
|
||||
index 066fefc0cc..39a539db47 100644
|
||||
--- a/Modules/_ctypes/callproc.c
|
||||
+++ b/Modules/_ctypes/callproc.c
|
||||
@@ -88,6 +88,9 @@
|
||||
#define DONT_USE_SEH
|
||||
#endif
|
||||
|
||||
+#if defined(__APPLE__) && __arm64__
|
||||
+#define HAVE_FFI_PREP_CIF_VAR 1
|
||||
+#endif
|
||||
|
||||
#define CTYPES_CAPSULE_ERROROBJ "_ctypes/callproc.c error object"
|
||||
CTYPES_CAPSULE_INSTANTIATE_DESTRUCTOR(CTYPES_CAPSULE_ERROROBJ)
|
||||
@@ -773,7 +776,8 @@ static int _call_function_pointer(int flags,
|
||||
ffi_type **atypes,
|
||||
ffi_type *restype,
|
||||
void *resmem,
|
||||
- int argcount)
|
||||
+ int argcount,
|
||||
+ int argtypecount)
|
||||
{
|
||||
#ifdef WITH_THREAD
|
||||
PyThreadState *_save = NULL; /* For Py_BLOCK_THREADS and Py_UNBLOCK_THREADS */
|
||||
@@ -801,15 +805,39 @@ static int _call_function_pointer(int flags,
|
||||
if ((flags & FUNCFLAG_CDECL) == 0)
|
||||
cc = FFI_STDCALL;
|
||||
#endif
|
||||
- if (FFI_OK != ffi_prep_cif(&cif,
|
||||
- cc,
|
||||
- argcount,
|
||||
- restype,
|
||||
- atypes)) {
|
||||
- PyErr_SetString(PyExc_RuntimeError,
|
||||
- "ffi_prep_cif failed");
|
||||
- return -1;
|
||||
+
|
||||
+#if HAVE_FFI_PREP_CIF_VAR
|
||||
+ /* Everyone SHOULD set f.variadic=True on variadic function pointers, but
|
||||
+ * lots of existing code will not. If there's at least one arg and more
|
||||
+ * args are passed than are defined in the prototype, then it must be a
|
||||
+ * variadic function. */
|
||||
+ if ((flags & FUNCFLAG_VARIADIC) ||
|
||||
+ (argtypecount != 0 && argcount > argtypecount))
|
||||
+ {
|
||||
+ if (FFI_OK != ffi_prep_cif_var(&cif,
|
||||
+ cc,
|
||||
+ argtypecount,
|
||||
+ argcount,
|
||||
+ restype,
|
||||
+ atypes)) {
|
||||
+ PyErr_SetString(PyExc_RuntimeError,
|
||||
+ "ffi_prep_cif_var failed");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ } else {
|
||||
+#endif
|
||||
+ if (FFI_OK != ffi_prep_cif(&cif,
|
||||
+ cc,
|
||||
+ argcount,
|
||||
+ restype,
|
||||
+ atypes)) {
|
||||
+ PyErr_SetString(PyExc_RuntimeError,
|
||||
+ "ffi_prep_cif failed");
|
||||
+ return -1;
|
||||
+ }
|
||||
+#if HAVE_FFI_PREP_CIF_VAR
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (flags & (FUNCFLAG_USE_ERRNO | FUNCFLAG_USE_LASTERROR)) {
|
||||
error_object = _ctypes_get_errobj(&space);
|
||||
@@ -1181,9 +1209,8 @@ PyObject *_ctypes_callproc(PPROC pProc,
|
||||
|
||||
if (-1 == _call_function_pointer(flags, pProc, avalues, atypes,
|
||||
rtype, resbuf,
|
||||
- Py_SAFE_DOWNCAST(argcount,
|
||||
- Py_ssize_t,
|
||||
- int)))
|
||||
+ Py_SAFE_DOWNCAST(argcount, Py_ssize_t, int),
|
||||
+ Py_SAFE_DOWNCAST(argtype_count, Py_ssize_t, int)))
|
||||
goto cleanup;
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
diff --git a/Modules/_ctypes/ctypes.h b/Modules/_ctypes/ctypes.h
|
||||
index 12b56c4342..8aec3d1ade 100644
|
||||
--- a/Modules/_ctypes/ctypes.h
|
||||
+++ b/Modules/_ctypes/ctypes.h
|
||||
@@ -325,6 +325,7 @@ PyObject *_ctypes_callproc(PPROC pProc,
|
||||
#define FUNCFLAG_PYTHONAPI 0x4
|
||||
#define FUNCFLAG_USE_ERRNO 0x8
|
||||
#define FUNCFLAG_USE_LASTERROR 0x10
|
||||
+#define FUNCFLAG_VARIADIC 0x20
|
||||
|
||||
#define TYPEFLAG_ISPOINTER 0x100
|
||||
#define TYPEFLAG_HASPOINTER 0x200
|
||||
--
|
||||
2.30.1
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
From 43819cd35cddd189cbe513032e76f1c1a6ec6d8c Mon Sep 17 00:00:00 2001
|
||||
From: Takumi Sueda <puhitaku@gmail.com>
|
||||
Date: Sat, 11 Sep 2021 19:14:50 +0900
|
||||
Subject: [PATCH 6/7] ctypes: probe libffi for ffi_closure_alloc and
|
||||
ffi_prep_cif_var
|
||||
|
||||
Modified and imported from https://github.com/Homebrew/formula-patches/blob/master/python/3.8.7.patch
|
||||
---
|
||||
Modules/_ctypes/callproc.c | 4 ----
|
||||
setup.py | 34 +++++++++++++++++++++++++---------
|
||||
2 files changed, 25 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
|
||||
index 39a539db47..5273e8d246 100644
|
||||
--- a/Modules/_ctypes/callproc.c
|
||||
+++ b/Modules/_ctypes/callproc.c
|
||||
@@ -88,10 +88,6 @@
|
||||
#define DONT_USE_SEH
|
||||
#endif
|
||||
|
||||
-#if defined(__APPLE__) && __arm64__
|
||||
-#define HAVE_FFI_PREP_CIF_VAR 1
|
||||
-#endif
|
||||
-
|
||||
#define CTYPES_CAPSULE_ERROROBJ "_ctypes/callproc.c error object"
|
||||
CTYPES_CAPSULE_INSTANTIATE_DESTRUCTOR(CTYPES_CAPSULE_ERROROBJ)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index c92d0552e3..beaf60f3e5 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -141,6 +141,13 @@ def is_macosx_sdk_path(path):
|
||||
or path.startswith('/System/')
|
||||
or path.startswith('/Library/') )
|
||||
|
||||
+def grep_headers_for(function, headers):
|
||||
+ for header in headers:
|
||||
+ with open(header, 'r') as f:
|
||||
+ if function in f.read():
|
||||
+ return True
|
||||
+ return False
|
||||
+
|
||||
def find_file(filename, std_dirs, paths):
|
||||
"""Searches for the directory where a given file is located,
|
||||
and returns a possibly-empty list of additional directories, or None
|
||||
@@ -2235,7 +2242,7 @@ class PyBuildExt(build_ext):
|
||||
sources=['_ctypes/_ctypes_test.c'])
|
||||
self.extensions.extend([ext, ext_test])
|
||||
|
||||
- ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")]
|
||||
+ ffi_inc = sysconfig.get_config_var("LIBFFI_INCLUDEDIR")
|
||||
ffi_lib = None
|
||||
|
||||
#inc_dirs = self.inc_dirs.copy()
|
||||
@@ -2245,18 +2252,19 @@ class PyBuildExt(build_ext):
|
||||
return
|
||||
ffi_in_sdk = os.path.join(macosx_sdk_root(), "usr/include/ffi")
|
||||
if os.path.exists(ffi_in_sdk):
|
||||
- ffi_inc = [ffi_in_sdk]
|
||||
+ ffi_inc = ffi_in_sdk
|
||||
ffi_lib = 'ffi'
|
||||
- sources.remove('_ctypes/malloc_closure.c')
|
||||
else:
|
||||
# OS X 10.5 comes with libffi.dylib; the include files are
|
||||
# in /usr/include/ffi
|
||||
inc_dirs.append('/usr/include/ffi')
|
||||
|
||||
- if not ffi_inc or ffi_inc[0] == '':
|
||||
- ffi_inc = find_file('ffi.h', [], inc_dirs)
|
||||
- if ffi_inc is not None:
|
||||
- ffi_h = ffi_inc[0] + '/ffi.h'
|
||||
+ if not ffi_inc:
|
||||
+ found = find_file('ffi.h', [], inc_dirs)
|
||||
+ if found:
|
||||
+ ffi_inc = found[0]
|
||||
+ if ffi_inc:
|
||||
+ ffi_h = ffi_inc + '/ffi.h'
|
||||
with open(ffi_h) as f:
|
||||
for line in f:
|
||||
line = line.strip()
|
||||
@@ -2267,14 +2275,22 @@ class PyBuildExt(build_ext):
|
||||
ffi_inc = None
|
||||
print('Header file {} does not define LIBFFI_H or '
|
||||
'ffi_wrapper_h'.format(ffi_h))
|
||||
- if ffi_lib is None and ffi_inc is not None:
|
||||
+ if ffi_lib is None and ffi_inc:
|
||||
for lib_name in ('ffi_convenience', 'ffi_pic', 'ffi'):
|
||||
if (self.compiler.find_library_file(lib_dirs, lib_name)):
|
||||
ffi_lib = lib_name
|
||||
break
|
||||
|
||||
if ffi_inc and ffi_lib:
|
||||
- ext.include_dirs.extend(ffi_inc)
|
||||
+ ffi_headers = glob(os.path.join(ffi_inc, '*.h'))
|
||||
+ if grep_headers_for('ffi_closure_alloc', ffi_headers):
|
||||
+ try:
|
||||
+ sources.remove('_ctypes/malloc_closure.c')
|
||||
+ except ValueError:
|
||||
+ pass
|
||||
+ if grep_headers_for('ffi_prep_cif_var', ffi_headers):
|
||||
+ ext.extra_compile_args.append("-DHAVE_FFI_PREP_CIF_VAR=1")
|
||||
+ ext.include_dirs.append(ffi_inc)
|
||||
ext.libraries.append(ffi_lib)
|
||||
self.use_system_libffi = True
|
||||
|
||||
--
|
||||
2.30.1
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From 41ee254166bb690feb665991fc2442e335631314 Mon Sep 17 00:00:00 2001
|
||||
From: Takumi Sueda <puhitaku@gmail.com>
|
||||
Date: Sat, 11 Sep 2021 19:20:30 +0900
|
||||
Subject: [PATCH 7/7] Remove QuickTime from link args
|
||||
|
||||
---
|
||||
Mac/Modules/qt/setup.py | 2 +-
|
||||
setup.py | 3 +--
|
||||
2 files changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Mac/Modules/qt/setup.py b/Mac/Modules/qt/setup.py
|
||||
index 8442011ab9..4b5bc2bc20 100644
|
||||
--- a/Mac/Modules/qt/setup.py
|
||||
+++ b/Mac/Modules/qt/setup.py
|
||||
@@ -6,7 +6,7 @@ from distutils.core import Extension, setup
|
||||
setup(name="QuickTime", version="0.2",
|
||||
ext_modules=[
|
||||
Extension('QuickTime._Qt', ['_Qtmodule.c'],
|
||||
- extra_link_args=['-framework', 'Carbon', '-framework', 'QuickTime'])
|
||||
+ extra_link_args=['-framework', 'Carbon'])
|
||||
],
|
||||
py_modules=['QuickTime.Qt', 'QuickTime.QuickTime'],
|
||||
package_dir={'QuickTime':'../../../Lib/plat-mac/Carbon'}
|
||||
diff --git a/setup.py b/setup.py
|
||||
index beaf60f3e5..ff2298af91 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -1819,8 +1819,7 @@ class PyBuildExt(build_ext):
|
||||
|
||||
exts.append( Extension('_Qt', ['qt/_Qtmodule.c'],
|
||||
extra_compile_args=carbon_extra_compile_args,
|
||||
- extra_link_args=['-framework', 'QuickTime',
|
||||
- '-framework', 'Carbon']) )
|
||||
+ extra_link_args=['-framework', 'Carbon']) )
|
||||
|
||||
|
||||
self.extensions.extend(exts)
|
||||
--
|
||||
2.30.1
|
||||
|
||||
@@ -43,3 +43,13 @@ diff -r -u ../Python-3.1/setup.py ./setup.py
|
||||
|
||||
# Add paths specified in the environment variables LDFLAGS and
|
||||
# CPPFLAGS for header and library files.
|
||||
@@ -1203,8 +1203,7 @@
|
||||
# End multiprocessing
|
||||
|
||||
# Platform-specific libraries
|
||||
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8'):
|
||||
+ if platform.startswith('linux') or platform.startswith('freebsd'):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
|
||||
@@ -43,3 +43,13 @@ diff -r -u ../Python-3.1/setup.py ./setup.py
|
||||
|
||||
# Add paths specified in the environment variables LDFLAGS and
|
||||
# CPPFLAGS for header and library files.
|
||||
@@ -1203,8 +1203,7 @@
|
||||
# End multiprocessing
|
||||
|
||||
# Platform-specific libraries
|
||||
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8'):
|
||||
+ if platform.startswith('linux') or platform.startswith('freebsd'):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
|
||||
@@ -43,3 +43,13 @@ diff -r -u ../Python-3.1/setup.py ./setup.py
|
||||
|
||||
# Add paths specified in the environment variables LDFLAGS and
|
||||
# CPPFLAGS for header and library files.
|
||||
@@ -1207,8 +1207,7 @@
|
||||
# End multiprocessing
|
||||
|
||||
# Platform-specific libraries
|
||||
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8'):
|
||||
+ if platform.startswith('linux') or platform.startswith('freebsd'):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
|
||||
@@ -44,4 +44,13 @@ diff -r -u setup.py setup.py
|
||||
|
||||
# Add paths specified in the environment variables LDFLAGS and
|
||||
# CPPFLAGS for header and library files.
|
||||
|
||||
@@ -1321,8 +1321,7 @@
|
||||
# End multiprocessing
|
||||
|
||||
# Platform-specific libraries
|
||||
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8'):
|
||||
+ if platform.startswith('linux') or platform.startswith('freebsd'):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
--- setup.py.orig 2012-04-10 01:25:37.000000000 +0200
|
||||
+++ setup.py 2021-09-03 10:16:58.575042300 +0200
|
||||
@@ -1344,8 +1344,7 @@
|
||||
# End multiprocessing
|
||||
|
||||
# Platform-specific libraries
|
||||
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8'):
|
||||
+ if platform.startswith('linux') or platform.startswith('freebsd'):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
@@ -0,0 +1,12 @@
|
||||
--- setup.py.orig 2012-04-10 01:25:37.000000000 +0200
|
||||
+++ setup.py 2021-09-03 10:16:58.575042300 +0200
|
||||
@@ -1344,8 +1344,7 @@
|
||||
# End multiprocessing
|
||||
|
||||
# Platform-specific libraries
|
||||
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8'):
|
||||
+ if platform.startswith('linux') or platform.startswith('freebsd'):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
@@ -0,0 +1,4 @@
|
||||
#require_gcc
|
||||
prefer_openssl11
|
||||
install_package "openssl-1.1.1f" "https://www.openssl.org/source/openssl-1.1.1f.tar.gz#186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "pypy3.7-v7.3.4-src" "https://downloads.python.org/pypy/pypy3.7-v7.3.4-src.tar.bz2#74d3c1e79f3fc7d384ffb32d3d2a95c2d5f61b81091eccce12ac76030d96ad08" "pypy_builder" verify_py37 ensurepip
|
||||
40
plugins/python-build/share/python-build/pypy3.7-7.3.5
Normal file
40
plugins/python-build/share/python-build/pypy3.7-7.3.5
Normal file
@@ -0,0 +1,40 @@
|
||||
VERSION='7.3.5'
|
||||
PYVER='3.7'
|
||||
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
"linux" )
|
||||
install_package "pypy${PYVER}-v${VERSION}-linux32" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-linux32.tar.bz2#3dd8b565203d372829e53945c599296fa961895130342ea13791b17c84ed06c4" "pypy" "verify_py${PYVER//./}" ensurepip
|
||||
;;
|
||||
"linux64" )
|
||||
install_package "pypy${PYVER}-v${VERSION}-linux64" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-linux64.tar.bz2#9000db3e87b54638e55177e68cbeb30a30fe5d17b6be48a9eb43d65b3ebcfc26" "pypy" "verify_py${PYVER//./}" ensurepip
|
||||
;;
|
||||
"linux-aarch64" )
|
||||
install_package "pypy${PYVER}-v${VERSION}-aarch64" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-aarch64.tar.bz2#85d83093b3ef5b863f641bc4073d057cc98bb821e16aa9361a5ff4898e70e8ee" "pypy" "verify_py${PYVER//./}" ensurepip
|
||||
;;
|
||||
"osx64" )
|
||||
if require_osx_version "10.13"; then
|
||||
install_package "pypy${PYVER}-v${VERSION}-osx64" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-osx64.tar.bz2#b3a7d3099ad83de7c267bb79ae609d5ce73b01800578ffd91ba7e221b13f80db" "pypy" "verify_py${PYVER//./}" ensurepip
|
||||
else
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < 10.13."
|
||||
echo "try 'pypy${PYVER}-${VERSION}-src' to build from source."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
"win64" )
|
||||
install_zip "pypy${PYVER}-v${VERSION}-win64" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-win64.zip#072bd22427178dc4e65d961f50281bd2f56e11c4e4d9f16311c703f69f46ae24" "pypy" "verify_py${PYVER//./}" ensurepip
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
|
||||
echo "try 'pypy${PYVER}-${VERSION}-src' to build from source."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#require_gcc
|
||||
prefer_openssl11
|
||||
install_package "openssl-1.1.1f" "https://www.openssl.org/source/openssl-1.1.1f.tar.gz#186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "pypy3.7-v7.3.5-src" "https://downloads.python.org/pypy/pypy3.7-v7.3.5-src.tar.bz2#d920fe409a9ecad9d074aa8568ca5f3ed3581be66f66e5d8988b7ec66e6d99a2" "pypy_builder" verify_py37 ensurepip
|
||||
43
plugins/python-build/share/python-build/pypy3.7-7.3.6
Normal file
43
plugins/python-build/share/python-build/pypy3.7-7.3.6
Normal file
@@ -0,0 +1,43 @@
|
||||
VERSION='7.3.6'
|
||||
PYVER='3.7'
|
||||
# https://www.pypy.org/checksums.html
|
||||
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
"linux" )
|
||||
install_package "pypy${PYVER}-v${VERSION}-linux32" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-linux32.tar.bz2#459e77c845b31fa9367f7b1b1122155f0ba7888b1d4ce4455c35d2111eeeb275" "pypy" "verify_py${PYVER//./}" ensurepip
|
||||
;;
|
||||
"linux64" )
|
||||
install_package "pypy${PYVER}-v${VERSION}-linux64" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-linux64.tar.bz2#c41d07063b1d002a91ad2a0763b4baaca2b306ec635889c2e4826e706cc7f9ca" "pypy" "verify_py${PYVER//./}" ensurepip
|
||||
;;
|
||||
"linux-aarch64" )
|
||||
install_package "pypy${PYVER}-v${VERSION}-aarch64" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-aarch64.tar.bz2#d446b6987eeaa03d706603863e83d6b99df69232cf1e06d3ee5706add6a84cd6" "pypy" "verify_py${PYVER//./}" ensurepip
|
||||
;;
|
||||
"osx64" )
|
||||
if require_osx_version "10.13"; then
|
||||
install_package "pypy${PYVER}-v${VERSION}-osx64" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-osx64.tar.bz2#26f0c5c2a5f4a2ce35281d2fa760aa10715300dd110387eac43699a78ed32365" "pypy" "verify_py${PYVER//./}" ensurepip
|
||||
else
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true), OS X < 10.13."
|
||||
echo "try 'pypy${PYVER}-${VERSION}-src' to build from source."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
"s390x" )
|
||||
install_package "pypy${PYVER}-v${VERSION}-s390x" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-s390x.tar.bz2#3659bf96a177a53426ffc38d3619c6ee307e600c80e924edc9cee604680c141d" "pypy" "verify_py${PYVER//./}" ensurepip
|
||||
;;
|
||||
"win64" )
|
||||
install_zip "pypy${PYVER}-v${VERSION}-win64" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-win64.zip#341e69a369da5a1f4f69dbbd47e7dff5e745439b203e28c7afcf98308a24b003" "pypy" "verify_py${PYVER//./}" ensurepip
|
||||
;;
|
||||
* )
|
||||
{ echo
|
||||
colorize 1 "ERROR"
|
||||
echo ": The binary distribution of PyPy is not available for $(pypy_architecture 2>/dev/null || true)."
|
||||
echo "try 'pypy${PYVER}-${VERSION}-src' to build from source."
|
||||
echo
|
||||
} >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,7 @@
|
||||
VERSION='7.3.6'
|
||||
PYVER='3.7'
|
||||
|
||||
#require_gcc
|
||||
prefer_openssl11
|
||||
install_package "openssl-1.1.1f" "https://www.openssl.org/source/openssl-1.1.1f.tar.gz#186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35" mac_openssl --if has_broken_mac_openssl
|
||||
install_package "pypy${PYVER}-v${VERSION}-src" "https://downloads.python.org/pypy/pypy${PYVER}-v${VERSION}-src.tar.bz2#9252ccaa130094205b3c7f0a2cad5adc0d9dfba31658ff3172f788dec1fdb348" "pypy_builder" "verify_py${PYVER//./}" ensurepip
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user