mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-07 20:31:01 -05:00
Merge branch 'master' into no_linuxbrew
This commit is contained in:
commit
5d967fa38a
30 changed files with 2136 additions and 346 deletions
3
.github/workflows/macos_build.yml
vendored
3
.github/workflows/macos_build.yml
vendored
|
@ -6,9 +6,6 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
python-version:
|
||||
- 2.7.18
|
||||
- 3.5.10
|
||||
- 3.6.15
|
||||
- 3.7.10
|
||||
- 3.8.10
|
||||
- 3.9.5
|
||||
|
|
7
.github/workflows/pyenv_tests.yml
vendored
7
.github/workflows/pyenv_tests.yml
vendored
|
@ -24,7 +24,12 @@ jobs:
|
|||
# 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
|
||||
if test "$RUNNER_OS" == "macOS"; then
|
||||
brew install coreutils fish
|
||||
elif [[ $(lsb_release -sr | awk -F. '{print $1}') -ge 20 ]]; then
|
||||
# Ubuntu 18 has fish 2 which lacks many features that facilitate testing
|
||||
sudo apt install fish -yq
|
||||
fi
|
||||
- run: pwd
|
||||
- env:
|
||||
PYENV_ROOT: /home/runner/work/pyenv/pyenv
|
||||
|
|
3
.github/workflows/ubuntu_build.yml
vendored
3
.github/workflows/ubuntu_build.yml
vendored
|
@ -6,9 +6,6 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
python-version:
|
||||
- 2.7.18
|
||||
- 3.5.10
|
||||
- 3.6.15
|
||||
- 3.7.10
|
||||
- 3.8.10
|
||||
- 3.9.5
|
||||
|
|
634
README.md
634
README.md
|
@ -12,7 +12,7 @@ This project was forked from [rbenv](https://github.com/rbenv/rbenv) and
|
|||
![Terminal output example](/terminal_output.png)
|
||||
|
||||
|
||||
### what pyenv _does..._
|
||||
### What pyenv _does..._
|
||||
|
||||
* Lets you **change the global Python version** on a per-user basis.
|
||||
* Provides support for **per-project Python versions**.
|
||||
|
@ -27,12 +27,11 @@ This project was forked from [rbenv](https://github.com/rbenv/rbenv) and
|
|||
* **Depend on Python itself.** pyenv was made from pure shell scripts.
|
||||
There is no bootstrap problem of Python.
|
||||
* **Need to be loaded into your shell.** Instead, pyenv's shim
|
||||
approach works by adding a directory to your `$PATH`.
|
||||
approach works by adding a directory to your `PATH`.
|
||||
* **Manage virtualenv.** Of course, you can create [virtualenv](https://pypi.python.org/pypi/virtualenv)
|
||||
yourself, or [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv)
|
||||
to automate the process.
|
||||
|
||||
|
||||
----
|
||||
|
||||
|
||||
|
@ -41,19 +40,27 @@ This project was forked from [rbenv](https://github.com/rbenv/rbenv) and
|
|||
* **[How It Works](#how-it-works)**
|
||||
* [Understanding PATH](#understanding-path)
|
||||
* [Understanding Shims](#understanding-shims)
|
||||
* [Choosing the Python Version](#choosing-the-python-version)
|
||||
* [Locating the Python Installation](#locating-the-python-installation)
|
||||
* [Understanding Python version selection](#understanding-python-version-selection)
|
||||
* [Locating Pyenv-provided Python Installations](#locating-pyenv-provided-python-installations)
|
||||
* **[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)
|
||||
* [Advanced Configuration](#advanced-configuration)
|
||||
* [Uninstalling Python Versions](#uninstalling-python-versions)
|
||||
* **[Command Reference](#command-reference)**
|
||||
* [Getting Pyenv](#getting-pyenv)
|
||||
* [Homebrew in macOS](#homebrew-in-macos)
|
||||
* [Windows](#windows)
|
||||
* [Automatic installer](#automatic-installer)
|
||||
* [Basic GitHub Checkout](#basic-github-checkout)
|
||||
* [Set up your shell environment for Pyenv](#set-up-your-shell-environment-for-pyenv)
|
||||
* [Restart your shell](#restart-your-shell)
|
||||
* [Install Python build dependencies](#install-python-build-dependencies)
|
||||
* **[Usage](#usage)**
|
||||
* [Install additional Python versions](#install-additional-python-versions)
|
||||
* [Switch between Python versions](#switch-between-python-versions)
|
||||
* [Uninstall Python versions](#uninstall-python-versions)
|
||||
* [Other operations](#other-operations)
|
||||
* [Upgrading](#upgrading)
|
||||
* [Uninstalling pyenv](#uninstalling-pyenv)
|
||||
* [Advanced Configuration](#advanced-configuration)
|
||||
* [Using Pyenv without shims](#using-pyenv-without-shims)
|
||||
* [Environment variables](#environment-variables)
|
||||
* **[Development](#development)**
|
||||
* [Version History](#version-history)
|
||||
* [License](#license)
|
||||
|
@ -69,6 +76,7 @@ executables injected into your `PATH`, determines which Python version
|
|||
has been specified by your application, and passes your commands along
|
||||
to the correct Python installation.
|
||||
|
||||
|
||||
### Understanding PATH
|
||||
|
||||
When you run a command like `python` or `pip`, your operating system
|
||||
|
@ -84,6 +92,7 @@ precedence over another one at the end. In this example, the
|
|||
`/usr/local/bin` directory will be searched first, then `/usr/bin`,
|
||||
then `/bin`.
|
||||
|
||||
|
||||
### Understanding Shims
|
||||
|
||||
pyenv works by inserting a directory of _shims_ at the front of your
|
||||
|
@ -104,7 +113,8 @@ operating system will do the following:
|
|||
* Run the shim named `pip`, which in turn passes the command along to
|
||||
pyenv
|
||||
|
||||
### Choosing the Python Version
|
||||
|
||||
### Understanding Python version selection
|
||||
|
||||
When you execute a shim, pyenv determines which Python version to use by
|
||||
reading it from the following sources, in this order:
|
||||
|
@ -122,25 +132,45 @@ reading it from the following sources, in this order:
|
|||
directory, until reaching the root of your filesystem.
|
||||
|
||||
4. The global `$(pyenv root)/version` file. You can modify this file using
|
||||
the [`pyenv global`](https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-global) command. If the global version
|
||||
file is not present, pyenv assumes you want to use the "system"
|
||||
Python. (In other words, whatever version would run if pyenv weren't in your
|
||||
`PATH`.)
|
||||
the [`pyenv global`](https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-global) command.
|
||||
If the global version file is not present, pyenv assumes you want to use the "system"
|
||||
Python (see below).
|
||||
|
||||
A special version name "`system`" means to use whatever Python is found on `PATH`
|
||||
after the shims `PATH` entry (in other words, whatever would be run if Pyenv
|
||||
shims weren't on `PATH`). Note that Pyenv considers those installations outside
|
||||
its control and does not attempt to inspect or distinguish them in any way.
|
||||
So e.g. if you are on MacOS and have OS-bundled Python 3.8.9 and Homebrew-installed
|
||||
Python 3.9.12 and 3.10.2 -- for Pyenv, this is still a single "`system`" version,
|
||||
and whichever of those is first on `PATH` under the executable name you
|
||||
specified will be run.
|
||||
|
||||
**NOTE:** You can activate multiple versions at the same time, including multiple
|
||||
versions of Python2 or Python3 simultaneously. This allows for parallel usage of
|
||||
Python2 and Python3, and is required with tools like `tox`. For example, to set
|
||||
your path to first use your `system` Python and Python3 (set to 2.7.9 and 3.4.2
|
||||
in this example), but also have Python 3.3.6, 3.2, and 2.5 available on your
|
||||
`PATH`, one would first `pyenv install` the missing versions, then set `pyenv
|
||||
global system 3.3.6 3.2 2.5`. At this point, one should be able to find the full
|
||||
executable path to each of these using `pyenv which`, e.g. `pyenv which python2.5`
|
||||
(should display `$(pyenv root)/versions/2.5/bin/python2.5`), or `pyenv which
|
||||
python3.4` (should display path to system Python3). You can also specify multiple
|
||||
versions in a `.python-version` file, separated by newlines.
|
||||
Lines starting with a `#` are ignored.
|
||||
Python2 and Python3, and is required with tools like `tox`. For example, to instruct
|
||||
Pyenv to first use your system Python and Python3 (which are e.g. 2.7.9 and 3.4.2)
|
||||
but also have Python 3.3.6, 3.2.1, and 2.5.2 available, you first `pyenv install`
|
||||
the missing versions, then set `pyenv global system 3.3.6 3.2.1 2.5.2`.
|
||||
Then you'll be able to invoke any of those versions with an appropriate `pythonX` or
|
||||
`pythonX.Y` name.
|
||||
You can also specify multiple versions in a `.python-version` file by hand,
|
||||
separated by newlines. Lines starting with a `#` are ignored.
|
||||
|
||||
### Locating the Python Installation
|
||||
[`pyenv which <command>`](COMMANDS.md#pyenv-which) displays which real executable would be
|
||||
run when you invoke `<command>` via a shim.
|
||||
E.g. if you have 3.3.6, 3.2.1 and 2.5.2 installed of which 3.3.6 and 2.5.2 are selected
|
||||
and your system Python is 3.2.5,
|
||||
`pyenv which python2.5` should display `$(pyenv root)/versions/2.5.2/bin/python2.5`,
|
||||
`pyenv which python3` -- `$(pyenv root)/versions/3.3.6/bin/python3` and
|
||||
`pyenv which python3.2` -- path to your system Python due to the fall-through (see below).
|
||||
|
||||
Shims also fall through to anything further on `PATH` if the corresponding executable is
|
||||
not present in any of the selected Python installations.
|
||||
This allows you to use any programs installed elsewhere on the system as long as
|
||||
they are not shadowed by a selected Python installation.
|
||||
|
||||
|
||||
### Locating Pyenv-provided Python installations
|
||||
|
||||
Once pyenv has determined which version of Python your application has
|
||||
specified, it passes the command along to the corresponding Python
|
||||
|
@ -158,282 +188,262 @@ For example, you might have these versions installed:
|
|||
As far as Pyenv is concerned, version names are simply directories under
|
||||
`$(pyenv root)/versions`.
|
||||
|
||||
### Managing Virtual Environments
|
||||
|
||||
There is a pyenv plugin named [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv) which comes with various features to help pyenv users to manage virtual environments created by virtualenv or Anaconda.
|
||||
Because the `activate` script of those virtual environments are relying on mutating `$PATH` variable of user's interactive shell, it will intercept pyenv's shim style command execution hooks.
|
||||
We'd recommend to install pyenv-virtualenv as well if you have some plan to play with those virtual environments.
|
||||
|
||||
|
||||
----
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
### Prerequisites
|
||||
|
||||
For pyenv to install python correctly you should [**install the Python build dependencies**](https://github.com/pyenv/pyenv/wiki#suggested-build-environment).
|
||||
|
||||
### Homebrew in macOS
|
||||
### Getting Pyenv
|
||||
#### Homebrew in macOS
|
||||
|
||||
1. Consider installing with [Homebrew](https://brew.sh):
|
||||
```sh
|
||||
brew update
|
||||
brew install pyenv
|
||||
```
|
||||
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").
|
||||
2. Then follow the rest of the post-installation steps, starting with
|
||||
[Set up your shell environment for Pyenv](#set-up-your-shell-environment-for-pyenv).
|
||||
|
||||
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`
|
||||
|
||||
If you're going to build Homebrew formulae from source that link against Python
|
||||
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)._
|
||||
|
||||
or if you have an EOL version of MacOS for which prebuilt bottles are no longer provided
|
||||
and you 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:
|
||||
|
||||
~~~fish
|
||||
alias brew="env PATH=(string replace (pyenv root)/shims '' \"\$PATH\") brew"
|
||||
~~~
|
||||
|
||||
### Windows
|
||||
|
||||
#### 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 --
|
||||
but rather Linux versions running in a virtual machine --
|
||||
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
|
||||
#### Automatic installer
|
||||
|
||||
Visit our other project:
|
||||
https://github.com/pyenv/pyenv-installer
|
||||
|
||||
|
||||
### Basic GitHub Checkout
|
||||
#### Basic GitHub Checkout
|
||||
|
||||
This will get you going with the latest version of Pyenv and make it
|
||||
easy to fork and contribute any changes back upstream.
|
||||
|
||||
1. **Check out Pyenv where you want it installed.**
|
||||
* **Check out Pyenv where you want it installed.**
|
||||
A good place to choose is `$HOME/.pyenv` (but you can install it somewhere else):
|
||||
|
||||
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
|
||||
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
|
||||
|
||||
Optionally, try to compile a dynamic Bash extension to speed up Pyenv. Don't
|
||||
* Optionally, try to compile a dynamic Bash extension to speed up Pyenv. Don't
|
||||
worry if it fails; Pyenv will still work normally:
|
||||
|
||||
cd ~/.pyenv && src/configure && make -C src
|
||||
|
||||
2. **Configure your shell's environment for Pyenv**
|
||||
|
||||
**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.
|
||||
|
||||
**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.
|
||||
|
||||
- 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 you have no `~/.bash_profile` and your `/etc/profile` sources `~/.bashrc` (SUSE):**
|
||||
|
||||
~~~bash
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
|
||||
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
|
||||
echo 'eval "$(pyenv init --path)"' >> ~/.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
|
||||
|
||||
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
|
||||
~~~
|
||||
|
||||
In MacOS, make sure that your terminal app runs the shell as a login shell.
|
||||
|
||||
- **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
|
||||
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.
|
||||
cd ~/.pyenv && src/configure && make -C src
|
||||
|
||||
|
||||
- For **Zsh**:
|
||||
### Set up your shell environment for Pyenv
|
||||
|
||||
- **MacOS, if Pyenv is installed with Homebrew:**
|
||||
**Upgrade note:** The startup logic and instructions have been updated for simplicity in 2.3.0.
|
||||
The previous, more complicated configuration scheme for 2.0.0-2.2.5 still works.
|
||||
|
||||
~~~ 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.
|
||||
* Define environment variable `PYENV_ROOT` to point to the path where
|
||||
Pyenv will store its data. `$HOME/.pyenv` is the default.
|
||||
If you installed Pyenv via Git checkout, we recommend
|
||||
to set it to the same location as where you cloned it.
|
||||
* Add the `pyenv` executable to your `PATH` if it's not already there
|
||||
* run `eval "$(pyenv init -)"` to install `pyenv` into your shell as a shell function, enable shims and autocompletion
|
||||
* You may run `eval "$(pyenv init --path)"` instead to just enable shims, without shell integration
|
||||
|
||||
The below setup should work for the vast majority of users for commmon use cases.
|
||||
See [Advanvced configuration](#advanced-configuration) for details and more configuration options.
|
||||
|
||||
- For **bash**:
|
||||
|
||||
Stock Bash startup files vary widely between distibutions in which of them source
|
||||
which, under what circumstances, in what order and what additional configuration they perform.
|
||||
As such, the most reliable way to get Pyenv in all environments is to append Pyenv
|
||||
configuration commands to both `.bashrc` (for interactive shells)
|
||||
and the profile file that Bash would use (for login shells).
|
||||
|
||||
First, add the commands to `~/.bashrc`:
|
||||
|
||||
~~~ bash
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
|
||||
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
|
||||
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
|
||||
~~~
|
||||
|
||||
Then, if you have `~/.profile`, `~/.bash_profile` or `~/.bash_login`, add the commands there as well.
|
||||
If you have none of these, add them to `~/.profile`.
|
||||
|
||||
* to add to `~/.profile`:
|
||||
~~~ bash
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
|
||||
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
|
||||
echo 'eval "$(pyenv init -)"' >> ~/.profile
|
||||
~~~
|
||||
|
||||
* to add to `~/.bash_profile`:
|
||||
~~~ bash
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
|
||||
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
|
||||
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
|
||||
~~~
|
||||
|
||||
- For **Zsh**:
|
||||
~~~ zsh
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
|
||||
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
|
||||
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
|
||||
~~~
|
||||
|
||||
If you wish to get Pyenv in noninteractive login shells as well, also add the commands to `~/.zprofile` or `~/.zlogin`.
|
||||
|
||||
- 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
|
||||
pyenv init - | source
|
||||
~~~
|
||||
|
||||
**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.
|
||||
|
||||
**Proxy note**: If you use a proxy, export `http_proxy` and `https_proxy`, too.
|
||||
|
||||
|
||||
- **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
|
||||
~~~
|
||||
### Restart your shell
|
||||
|
||||
Make sure that your terminal app runs the shell as a login shell.
|
||||
for the `PATH` changes to take effect.
|
||||
|
||||
- **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
|
||||
```sh
|
||||
exec "$SHELL"
|
||||
```
|
||||
|
||||
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
|
||||
~~~
|
||||
|
||||
- For **Fish shell**:
|
||||
### Install Python build dependencies
|
||||
|
||||
Execute this interactively:
|
||||
|
||||
~~~ fish
|
||||
set -Ux PYENV_ROOT $HOME/.pyenv
|
||||
set -U fish_user_paths $PYENV_ROOT/bin $fish_user_paths
|
||||
~~~
|
||||
[**Install Python build dependencies**](https://github.com/pyenv/pyenv/wiki#suggested-build-environment)
|
||||
before attempting to install a new Python version.
|
||||
|
||||
And add this to `~/.config/fish/config.fish`:
|
||||
|
||||
~~~ fish
|
||||
status is-login; and pyenv init --path | source
|
||||
status is-interactive; and pyenv init - | source
|
||||
~~~
|
||||
You can now begin using Pyenv.
|
||||
|
||||
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.
|
||||
----
|
||||
|
||||
|
||||
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
|
||||
in them as login shells by default).
|
||||
## Usage
|
||||
|
||||
5. [**Install Python build dependencies**](https://github.com/pyenv/pyenv/wiki#suggested-build-environment) before attempting to install a new Python version.
|
||||
### Install additional Python versions
|
||||
|
||||
6. **Install Python versions into `$(pyenv root)/versions`.**
|
||||
For example, to download and install Python 2.7.8, run:
|
||||
```sh
|
||||
pyenv install 2.7.8
|
||||
```
|
||||
**NOTE:** If you need to pass a `configure` option to a build, please use the
|
||||
```CONFIGURE_OPTS``` environment variable.
|
||||
To install additonal Python versions, use [`pyenv install`](COMMANDS.md#pyenv-install).
|
||||
|
||||
**NOTE:** If you want to use proxy to download, please set the `http_proxy` and `https_proxy`
|
||||
environment variables.
|
||||
For example, to download and install Python 3.10.4, run:
|
||||
|
||||
**NOTE:** If you are having trouble installing a Python version,
|
||||
please visit the wiki page about
|
||||
[Common Build Problems](https://github.com/pyenv/pyenv/wiki/Common-build-problems).
|
||||
```sh
|
||||
pyenv install 3.10.4
|
||||
```
|
||||
|
||||
**NOTE:** Most Pyenv-provided Python releases are source releases and are built
|
||||
from source as part of installation (that's why you need Python build dependencies preinstalled).
|
||||
You can pass options to Python's `configure` and compiler flags to customize the build,
|
||||
see [_Special environment variables_ in Python-Build's README](plugins/python-build/README.md#special-environment-variables)
|
||||
for details.
|
||||
|
||||
**NOTE:** If you want to use proxy for download, please set the `http_proxy` and `https_proxy`
|
||||
environment variables.
|
||||
|
||||
**NOTE:** If you are having trouble installing a Python version,
|
||||
please visit the wiki page about
|
||||
[Common Build Problems](https://github.com/pyenv/pyenv/wiki/Common-build-problems).
|
||||
|
||||
|
||||
#### Upgrading
|
||||
### Switch between Python versions
|
||||
|
||||
To select a Pyenv-installed Python as the version to use, run one
|
||||
of the following commands:
|
||||
|
||||
* [`pyenv shell <version>`](COMMANDS.md#pyenv-shell) -- select just for current shell session
|
||||
* [`pyenv local <version>`](COMMANDS.md#pyenv-local) -- automatically select whenever you are in the current directory (or its subdirectories)
|
||||
* [`pyenv global <version>`](COMMANDS.md#pyenv-shell) -- select globally for your user account
|
||||
|
||||
E.g. to select the above-mentioned newly-installed Python 3.10.4 as your preferred version to use:
|
||||
|
||||
~~~bash
|
||||
pyenv global 3.10.4
|
||||
~~~
|
||||
|
||||
Now whenever you invoke `python`, `pip` etc., an executable from the Pyenv-provided
|
||||
3.10.4 installation will be run instead of the system Python.
|
||||
|
||||
Using "`system`" as a version name would reset the selection to your system-provided Python.
|
||||
|
||||
See [Understanding shims](#understanding-shims) and
|
||||
[Understanding Python version selection](#understanding-python-version-selection)
|
||||
for more details on how the selection works and more information on its usage.
|
||||
|
||||
|
||||
### Uninstall Python versions
|
||||
|
||||
As time goes on, you will accumulate Python versions in your
|
||||
`$(pyenv root)/versions` directory.
|
||||
|
||||
To remove old Python versions, use [`pyenv uninstall <version>`](COMMANDS.md#pyenv-uninstall).
|
||||
|
||||
Alternatively, you can simply `rm -rf` the directory of the version you want
|
||||
to remove. You can find the directory of a particular Python version
|
||||
with the `pyenv prefix` command, e.g. `pyenv prefix 2.6.8`.
|
||||
Note however that plugins may run additional operations on uninstall
|
||||
which you would need to do by hand as well. E.g. Pyenv-Virtualenv also
|
||||
removes any virtual environments linked to the version being uninstalled.
|
||||
|
||||
|
||||
### Other operations
|
||||
|
||||
Run `pyenv commands` to get a list of all available subcommands.
|
||||
Run a subcommand with `--help` to get help on it, or see the [Commands Reference](COMMANDS.md).
|
||||
|
||||
Note that Pyenv plugins that you install may add their own subcommands.
|
||||
|
||||
|
||||
## Upgrading
|
||||
|
||||
If you've installed Pyenv using Homebrew, upgrade using:
|
||||
```sh
|
||||
brew upgrade pyenv
|
||||
```
|
||||
|
||||
If you've installed Pyenv using the instructions above, you can
|
||||
If you've installed Pyenv using Pyenv-installer or Git checkout, you can
|
||||
upgrade your installation at any time using Git.
|
||||
|
||||
To upgrade to the latest development version of pyenv, use `git pull`:
|
||||
|
@ -452,7 +462,7 @@ git tag
|
|||
git checkout v0.1.0
|
||||
```
|
||||
|
||||
### Uninstalling pyenv
|
||||
## Uninstalling pyenv
|
||||
|
||||
The simplicity of pyenv makes it easy to temporarily disable it, or
|
||||
uninstall from the system.
|
||||
|
@ -462,124 +472,113 @@ uninstall from the system.
|
|||
remove Pyenv shims directory from `PATH`, and future invocations like
|
||||
`python` will execute the system Python version, as it was before Pyenv.
|
||||
|
||||
`pyenv` will still be accessible on the command line, but your Python
|
||||
apps won't be affected by version switching.
|
||||
`pyenv` will still be accessible on the command line, but your Python
|
||||
apps won't be affected by version switching.
|
||||
|
||||
2. To completely **uninstall** Pyenv, remove _all_ configuration lines for it
|
||||
from your shell startup configuration, and then remove
|
||||
its root directory. This will **delete all Python versions** that were
|
||||
installed under `` $(pyenv root)/versions/ `` directory:
|
||||
|
||||
```sh
|
||||
rm -rf $(pyenv root)
|
||||
```
|
||||
2. To completely **uninstall** Pyenv, remove _all_ Pyenv configuration lines
|
||||
from your shell startup configuration, and then remove
|
||||
its root directory. This will **delete all Python versions** that were
|
||||
installed under the `` $(pyenv root)/versions/ `` directory:
|
||||
|
||||
If you've installed Pyenv using a package manager, as a final step,
|
||||
perform the Pyenv package removal. For instance, for Homebrew:
|
||||
```sh
|
||||
rm -rf $(pyenv root)
|
||||
```
|
||||
|
||||
```
|
||||
brew uninstall pyenv
|
||||
```
|
||||
If you've installed Pyenv using a package manager, as a final step,
|
||||
perform the Pyenv package removal. For instance, for Homebrew:
|
||||
|
||||
### Advanced Configuration
|
||||
```
|
||||
brew uninstall pyenv
|
||||
```
|
||||
|
||||
## Advanced Configuration
|
||||
|
||||
Skip this section unless you must know what every line in your shell
|
||||
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.
|
||||
|
||||
Also see the [Environment variables](#environment-variables) section
|
||||
for the environment variables that control Pyenv's behavior.
|
||||
|
||||
|
||||
* `eval "$(pyenv init --path)"`:
|
||||
|
||||
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.
|
||||
`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 `eval "$(pyenv init -)"` actually does:
|
||||
|
||||
|
||||
* `eval "$(pyenv init -)"`:
|
||||
1. **Sets up the shims path.** This is what allows Pyenv to intercept
|
||||
and redirect invocations of `python`, `pip` etc. transparently.
|
||||
It prepends `$(pyenv root)/shims` to your `$PATH`.
|
||||
It also deletes any other instances of `$(pyenv root)/shims` on `PATH`
|
||||
which allows to invoke `eval "$(pyenv init -)"` multiple times without
|
||||
getting duplicate `PATH` entries.
|
||||
|
||||
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. **Installs autocompletion.** This is entirely optional but pretty
|
||||
useful. Sourcing `$(pyenv root)/completions/pyenv.bash` will set that
|
||||
up. There are also completions for Zsh and Fish.
|
||||
|
||||
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. **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.
|
||||
4. **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.
|
||||
This is required for some commands like `pyenv shell` to work.
|
||||
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 --path)"` only does items 1 and 3.
|
||||
|
||||
To see exactly what happens under the hood for yourself, run `pyenv init -`
|
||||
or `pyenv init --path`.
|
||||
|
||||
`eval "$(pyenv init -)"` is supposed to run at any interactive shell's
|
||||
startup (including nested shells -- e.g. those invoked from editors)
|
||||
so that you get completion and convenience shell functions.
|
||||
|
||||
`eval "$(pyenv init --path)"` can be used instead of `eval "$(pyenv init -)"`
|
||||
to just enable shims, without shell integration. It can also be used to bump shims
|
||||
to the front of `PATH` after some other logic has prepended stuff to `PATH`
|
||||
that may shadow Pyenv's shims.
|
||||
|
||||
* In particular, in Debian-based distributions, the stock `~/.profile`
|
||||
prepends per-user `bin` directories to `PATH` after having sourced `~/.bashrc`.
|
||||
This necessitates appending a `pyenv init` call to `~/.profile` as well as `~/.bashrc`
|
||||
in these distributions because the system's Pip places executables for
|
||||
modules installed by a non-root user into those per-user `bin` directories.
|
||||
|
||||
|
||||
### Using Pyenv without shims
|
||||
|
||||
If you don't want to use `pyenv init` and shims, you can still benefit
|
||||
from pyenv's ability to install Python versions for you. Just run
|
||||
`pyenv install` and you will find versions installed in
|
||||
`$(pyenv root)/versions`, which you can manually execute or symlink
|
||||
as required.
|
||||
`$(pyenv root)/versions`.
|
||||
|
||||
### Uninstalling Python Versions
|
||||
You can manually execute or symlink them as required,
|
||||
or you can use [`pyenv exec <command>`](COMMANDS.md#pyenv-exec)
|
||||
whenever you want `<command>` to be affected by Pyenv's version selection
|
||||
as currently configured.
|
||||
|
||||
As time goes on, you will accumulate Python versions in your
|
||||
`$(pyenv root)/versions` directory.
|
||||
|
||||
To remove old Python versions, `pyenv uninstall` command to automate
|
||||
the removal process.
|
||||
|
||||
Alternatively, simply `rm -rf` the directory of the version you want
|
||||
to remove. You can find the directory of a particular Python version
|
||||
with the `pyenv prefix` command, e.g. `pyenv prefix 2.6.8`.
|
||||
`pyenv exec` works by prepending `$(pyenv root)/versions/<selected version>/bin`
|
||||
to `PATH` in the `<command>`'s environment, the same as what e.g. RVM does.
|
||||
|
||||
|
||||
----
|
||||
### Environment variables
|
||||
|
||||
|
||||
## Command Reference
|
||||
|
||||
See [COMMANDS.md](COMMANDS.md).
|
||||
|
||||
|
||||
----
|
||||
|
||||
## Environment variables
|
||||
|
||||
You can affect how pyenv operates with the following settings:
|
||||
You can affect how Pyenv operates with the following settings:
|
||||
|
||||
name | default | description
|
||||
-----|---------|------------
|
||||
`PYENV_VERSION` | | Specifies the Python version to be used.<br>Also see [`pyenv shell`](https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-shell)
|
||||
`PYENV_ROOT` | `~/.pyenv` | Defines the directory under which Python versions and shims reside.<br>Also see `pyenv root`
|
||||
`PYENV_VERSION` | | Specifies the Python version to be used.<br>Also see [`pyenv shell`]COMMANDS.md#pyenv-shell)
|
||||
`PYENV_ROOT` | `~/.pyenv` | Defines the directory under which Python versions and shims reside.<br>Also see [`pyenv root`](COMMANDS.md#pyenv-root)
|
||||
`PYENV_DEBUG` | | Outputs debug information.<br>Also as: `pyenv --debug <subcommand>`
|
||||
`PYENV_HOOK_PATH` | [_see wiki_][hooks] | Colon-separated list of paths searched for pyenv hooks.
|
||||
`PYENV_DIR` | `$PWD` | Directory to start searching for `.python-version` files.
|
||||
`PYTHON_BUILD_ARIA2_OPTS` | | Used to pass additional parameters to [`aria2`](https://aria2.github.io/).<br>If the `aria2c` binary is available on PATH, pyenv uses `aria2c` instead of `curl` or `wget` to download the Python Source code. If you have an unstable internet connection, you can use this variable to instruct `aria2` to accelerate the download.<br>In most cases, you will only need to use `-x 10 -k 1M` as value to `PYTHON_BUILD_ARIA2_OPTS` environment variable
|
||||
`PYTHON_BUILD_ARIA2_OPTS` | | Used to pass additional parameters to [`aria2`](https://aria2.github.io/).<br>If the `aria2c` binary is available on `PATH`, pyenv uses `aria2c` instead of `curl` or `wget` to download the Python Source code. If you have an unstable internet connection, you can use this variable to instruct `aria2` to accelerate the download.<br>In most cases, you will only need to use `-x 10 -k 1M` as value to `PYTHON_BUILD_ARIA2_OPTS` environment variable
|
||||
|
||||
----
|
||||
|
||||
|
||||
## Development
|
||||
|
@ -597,9 +596,6 @@ Please feel free to submit pull requests and file bugs on the [issue
|
|||
tracker](https://github.com/pyenv/pyenv/issues).
|
||||
|
||||
|
||||
[pyenv-virtualenv]: https://github.com/pyenv/pyenv-virtualenv#readme
|
||||
[hooks]: https://github.com/pyenv/pyenv/wiki/Authoring-plugins#pyenv-hooks
|
||||
|
||||
### Version History
|
||||
|
||||
See [CHANGELOG.md](CHANGELOG.md).
|
||||
|
@ -607,3 +603,7 @@ See [CHANGELOG.md](CHANGELOG.md).
|
|||
### License
|
||||
|
||||
[The MIT License](LICENSE)
|
||||
|
||||
|
||||
[pyenv-virtualenv]: https://github.com/pyenv/pyenv-virtualenv#readme
|
||||
[hooks]: https://github.com/pyenv/pyenv/wiki/Authoring-plugins#pyenv-hooks
|
||||
|
|
|
@ -57,12 +57,15 @@ function main() {
|
|||
;;
|
||||
"path")
|
||||
print_path
|
||||
print_rehash
|
||||
exit 0
|
||||
;;
|
||||
"print")
|
||||
init_dirs
|
||||
print_path
|
||||
print_env
|
||||
print_completion
|
||||
print_rehash
|
||||
print_shell_function
|
||||
exit 0
|
||||
;;
|
||||
|
@ -74,7 +77,12 @@ function main() {
|
|||
function help_() {
|
||||
case "$shell" in
|
||||
bash )
|
||||
profile='~/.bash_profile'
|
||||
if [ -e '~/.bash_profile' ]; then
|
||||
profile='~/.bash_profile'
|
||||
else
|
||||
profile='~/.profile'
|
||||
fi
|
||||
profile_explain="~/.bash_profile if it exists, otherwise ~/.profile"
|
||||
rc='~/.bashrc'
|
||||
;;
|
||||
zsh )
|
||||
|
@ -92,10 +100,39 @@ function help_() {
|
|||
esac
|
||||
|
||||
{
|
||||
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 'pyenv init - | source'
|
||||
echo
|
||||
;;
|
||||
* )
|
||||
echo '# Load pyenv automatically by appending'
|
||||
echo -n "# the following to "
|
||||
if [ "$profile" == "$rc" ]; then
|
||||
echo "$profile :"
|
||||
else
|
||||
echo
|
||||
echo "${profile_explain:-$profile} (for login shells)"
|
||||
echo "and $rc (for interactive shells) :"
|
||||
fi
|
||||
echo
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv"'
|
||||
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"'
|
||||
echo 'eval "$(pyenv init -)"'
|
||||
;;
|
||||
esac
|
||||
echo
|
||||
echo '# Restart your shell for the changes to take effect.'
|
||||
echo
|
||||
echo '# See the README for instructions on how to set up'
|
||||
echo '# your shell environment for Pyenv.'
|
||||
echo
|
||||
} >&2
|
||||
}
|
||||
|
||||
|
@ -104,13 +141,15 @@ function init_dirs() {
|
|||
}
|
||||
|
||||
function print_path() {
|
||||
# Need to use the login shell rather than the current one
|
||||
case "$shell" in
|
||||
fish )
|
||||
echo "set -gx PATH '${PYENV_ROOT}/shims' \$PATH"
|
||||
echo 'while set index (contains -i -- '\'"${PYENV_ROOT}/shims"\'' $PATH)'
|
||||
echo 'set -eg PATH[$index]; end; set -e index'
|
||||
echo 'set -gx PATH '\'"${PYENV_ROOT}/shims"\'' $PATH'
|
||||
;;
|
||||
* )
|
||||
echo 'export PATH="'${PYENV_ROOT}'/shims:${PATH}"'
|
||||
echo 'PATH="$(bash -ec '\''IFS=:; paths=($PATH); for i in ${!paths[@]}; do if [[ ${paths[i]} == "'\'"${PYENV_ROOT}/shims"\''" ]]; then unset '\'\\\'\''paths[i]'\'\\\'\''; fi; done; echo "${paths[*]}"'\'')"'
|
||||
echo 'export PATH="'"${PYENV_ROOT}"'/shims:${PATH}"'
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
@ -131,7 +170,9 @@ function print_completion() {
|
|||
if [ -r "$completion" ]; then
|
||||
echo "source '$completion'"
|
||||
fi
|
||||
}
|
||||
|
||||
function print_rehash() {
|
||||
if [ -z "$no_rehash" ]; then
|
||||
echo 'command pyenv rehash 2>/dev/null'
|
||||
fi
|
||||
|
|
|
@ -73,6 +73,8 @@ unset VERBOSE
|
|||
unset HAS_PATCH
|
||||
unset DEBUG
|
||||
|
||||
[ -n "$PYENV_DEBUG" ] && VERBOSE="-v"
|
||||
|
||||
parse_options "$@"
|
||||
for option in "${OPTIONS[@]}"; do
|
||||
case "$option" in
|
||||
|
|
48
plugins/python-build/share/python-build/graalpython-22.1.0
Normal file
48
plugins/python-build/share/python-build/graalpython-22.1.0
Normal file
|
@ -0,0 +1,48 @@
|
|||
# Copyright (c) 2022, 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='22.1.0'
|
||||
BUILD=''
|
||||
|
||||
case "$(pypy_architecture 2>/dev/null || true)" in
|
||||
"linux64" )
|
||||
graalpython_arch="linux"
|
||||
checksum="06862993573b64bd64c802aace9135192a4ba28a15d8260c42c5de632ad616bc"
|
||||
;;
|
||||
"osx64" )
|
||||
graalpython_arch="macos"
|
||||
checksum="88b22ea4a5cb8345b680d15cc385dff7a8ab858fdf0e182c79c6c3b74755de6c"
|
||||
;;
|
||||
* )
|
||||
{ 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
|
|
@ -0,0 +1,80 @@
|
|||
From c8ee4dc57dd995e96ef9af0a04957b61ae1a7ac9 Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index cc37185068..f238470c17 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5226,9 +5226,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5387,6 +5384,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 3e6c07c279..dd68777b6a 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -717,9 +717,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -875,6 +872,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.29.2.windows.2
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 35ddc7ad61b20a18496ba9410aa31b405e23fe78 Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index 829dd69bb8..455481bc50 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5183,9 +5183,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5342,6 +5339,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f1cc8e9bcb..1afcba3307 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -724,9 +724,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -880,6 +877,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.29.2.windows.2
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 0c2fd7c1de5121ea636134f131cf7ebada023acf Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index 829dd69bb8..455481bc50 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5183,9 +5183,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5342,6 +5339,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f1cc8e9bcb..1afcba3307 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -724,9 +724,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -880,6 +877,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.29.2.windows.2
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 5b79a7da20953f107657dea5192ed77cc8554ff0 Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index c807c98e56..51a7d60f54 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5183,9 +5183,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5342,6 +5339,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 805c0bba08..ede2197cb3 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -724,9 +724,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -880,6 +877,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.29.2.windows.2
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 1d6f94126d0af2370ba0e4c7d8befc1c7ecf35d8 Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index 829dd69bb8..455481bc50 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5183,9 +5183,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5342,6 +5339,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f1cc8e9bcb..1afcba3307 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -724,9 +724,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -880,6 +877,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.29.2.windows.2
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 8ced1a904558ff9499673083cf13abf03a76b7d0 Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index 936f3d4596..c091865aff 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5160,9 +5160,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5321,6 +5318,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index e02cc2c656..de83332dd3 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -719,9 +719,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -877,6 +874,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.36.0
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 7f35b41fa1e13fb9915fd476eaec2b15e2082c4f Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index 936f3d4596..c091865aff 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5160,9 +5160,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5321,6 +5318,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index e02cc2c656..de83332dd3 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -719,9 +719,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -877,6 +874,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.36.0
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From c4379ecd43dab0d2c836787d82bce4f20eed892b Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index 936f3d4596..c091865aff 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5160,9 +5160,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5321,6 +5318,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index e02cc2c656..de83332dd3 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -719,9 +719,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -877,6 +874,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.36.0
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 3af555f75a53a82fa074572b24cb6516d3db0645 Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index 96dcd0dcd5..1fb735bf8b 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5167,9 +5167,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5328,6 +5325,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 18a044629a..6d841d928d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -706,9 +706,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -864,6 +861,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.36.0
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 988821dfd8b087368dfee462d73f518ca4cfbfe0 Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index 96dcd0dcd5..1fb735bf8b 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5167,9 +5167,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5328,6 +5325,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 18a044629a..6d841d928d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -706,9 +706,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -864,6 +861,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.36.0
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 7ec2de6bb20a934424df28c6566e6fc3a5eab6d4 Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index 96dcd0dcd5..1fb735bf8b 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5167,9 +5167,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5328,6 +5325,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 18a044629a..6d841d928d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -706,9 +706,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -864,6 +861,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.36.0
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 97f07c98cac3d095c5c3f5816e4c7b3fe7b9c251 Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index c164d68c4e..dcc0795296 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5167,9 +5167,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5328,6 +5325,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index fc082a3cd2..5c9bee2850 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -706,9 +706,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -864,6 +861,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.36.0
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From cb51d8b90c5668e77b9ed8ded562eeaabf518f5c Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index c164d68c4e..dcc0795296 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5167,9 +5167,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5328,6 +5325,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index fc082a3cd2..5c9bee2850 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -706,9 +706,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -864,6 +861,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.36.0
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 9d066808637164f1386ece0d3b26b8e4262c4dfd Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index c737256c15..97a371c6da 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5155,9 +5155,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5316,6 +5313,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 040ddfc791..0969bb5b0c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -713,9 +713,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -871,6 +868,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.36.0
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From b8f6adaf38973076542c54e5d9a4fd7c6665c8f2 Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index 9e6fd46583..80c3a6589a 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5193,9 +5193,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5354,6 +5351,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d60f05251a..110318545d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -718,9 +718,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -876,6 +873,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.36.0
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 8ada29fb655f9803bab4777308c77db8c1f74735 Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index 2d379feb4b..e36d8d523d 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5193,9 +5193,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5354,6 +5351,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index c968d149c2..a16e475bc2 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -718,9 +718,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -876,6 +873,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.36.0
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 9e317124ae4d1f133c18485e83b952360741519d Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index 1252335472..0da9fa285e 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5193,9 +5193,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5354,6 +5351,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 972287a9c4..76252ad36c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -718,9 +718,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -876,6 +873,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.36.0
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From d93aaf050384705ac744a4e6cbbab1408e770c0a Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index c7a7291fea..708c9215e4 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5193,9 +5193,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5354,6 +5351,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 45e0af4493..559a40eda9 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -725,9 +725,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -883,6 +880,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.36.0
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 16a65fb399eb8d1a5cfecd597e579a4402b2e4c8 Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index 8dcdbf1989..ac03aff210 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5196,9 +5196,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5357,6 +5354,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index b1e4c6ce19..94102dd324 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -727,9 +727,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -885,6 +882,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.36.0
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 9b7f2f9ce024d2cceb90f9a9d939b37090c525e2 Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index ffa61c1dc5..18597d4de8 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5196,9 +5196,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5357,6 +5354,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 8fe5fa5742..577ce9040f 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -727,9 +727,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -885,6 +882,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.36.0
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 785de1ab8b4ab8b89d0e62ffd7521b5b2636923a Mon Sep 17 00:00:00 2001
|
||||
From: David Bohman <debohman@gmail.com>
|
||||
Date: Tue, 12 Oct 2021 17:10:26 -0700
|
||||
Subject: [PATCH] bpo-45405: Prevent ``internal configure error`` when running
|
||||
``configure`` with recent versions of non-Apple clang. (#28845)
|
||||
|
||||
Change the configure logic to function properly on macOS when the compiler
|
||||
outputs a platform triplet for option --print-multiarch.
|
||||
|
||||
Co-authored-by: Ned Deily <nad@python.org>
|
||||
---
|
||||
.../next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst | 2 ++
|
||||
configure | 8 +++++---
|
||||
configure.ac | 8 +++++---
|
||||
3 files changed, 12 insertions(+), 6 deletions(-)
|
||||
create mode 100644 Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
|
||||
diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
new file mode 100644
|
||||
index 0000000000..a2dc5bcc32
|
||||
--- /dev/null
|
||||
+++ b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
|
||||
@@ -0,0 +1,2 @@
|
||||
+Prevent ``internal configure error`` when running ``configure``
|
||||
+with recent versions of non-Apple clang. Patch by David Bohman.
|
||||
diff --git a/configure b/configure
|
||||
index ffa61c1dc5..18597d4de8 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5196,9 +5196,6 @@ $as_echo "$as_me:
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-
|
||||
-
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
|
||||
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||
cat >> conftest.c <<EOF
|
||||
@@ -5357,6 +5354,11 @@ $as_echo "none" >&6; }
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 8fe5fa5742..577ce9040f 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -727,9 +727,6 @@ then
|
||||
fi
|
||||
|
||||
|
||||
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
-AC_SUBST(MULTIARCH)
|
||||
-
|
||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||
cat >> conftest.c <<EOF
|
||||
#undef bfin
|
||||
@@ -885,6 +882,11 @@ else
|
||||
fi
|
||||
rm -f conftest.c conftest.out
|
||||
|
||||
+if test x$PLATFORM_TRIPLET != xdarwin; then
|
||||
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
||||
+fi
|
||||
+AC_SUBST(MULTIARCH)
|
||||
+
|
||||
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
|
||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||
--
|
||||
2.36.0
|
||||
|
|
@ -17,6 +17,13 @@ load test_helper
|
|||
assert_line "command pyenv rehash 2>/dev/null"
|
||||
}
|
||||
|
||||
@test "auto rehash for --path" {
|
||||
run pyenv-init --path
|
||||
assert_success
|
||||
assert_line "command pyenv rehash 2>/dev/null"
|
||||
}
|
||||
|
||||
|
||||
@test "setup shell completions" {
|
||||
root="$(cd $BATS_TEST_DIRNAME/.. && pwd)"
|
||||
run pyenv-init - bash
|
||||
|
@ -53,7 +60,7 @@ OUT
|
|||
@test "fish instructions" {
|
||||
run pyenv-init fish
|
||||
assert [ "$status" -eq 1 ]
|
||||
assert_line '# See the README for instructions on how to set up'
|
||||
assert_line 'pyenv init - | source'
|
||||
}
|
||||
|
||||
@test "option to skip rehash" {
|
||||
|
@ -64,30 +71,41 @@ OUT
|
|||
|
||||
@test "adds shims to PATH" {
|
||||
export PATH="${BATS_TEST_DIRNAME}/../libexec:/usr/bin:/bin:/usr/local/bin"
|
||||
run pyenv-init --path bash
|
||||
run pyenv-init - bash
|
||||
assert_success
|
||||
assert_line 0 'export PATH="'${PYENV_ROOT}'/shims:${PATH}"'
|
||||
assert_line 'export PATH="'${PYENV_ROOT}'/shims:${PATH}"'
|
||||
}
|
||||
|
||||
@test "adds shims to PATH (fish)" {
|
||||
export PATH="${BATS_TEST_DIRNAME}/../libexec:/usr/bin:/bin:/usr/local/bin"
|
||||
run pyenv-init --path fish
|
||||
run pyenv-init - fish
|
||||
assert_success
|
||||
assert_line 0 "set -gx PATH '${PYENV_ROOT}/shims' \$PATH"
|
||||
assert_line "set -gx PATH '${PYENV_ROOT}/shims' \$PATH"
|
||||
}
|
||||
|
||||
@test "can add shims to PATH more than once" {
|
||||
export PATH="${PYENV_ROOT}/shims:$PATH"
|
||||
run pyenv-init --path bash
|
||||
@test "removes existing shims from PATH" {
|
||||
OLDPATH="$PATH"
|
||||
export PATH="${BATS_TEST_DIRNAME}/nonexistent:${PYENV_ROOT}/shims:$PATH"
|
||||
run bash -e <<!
|
||||
eval "\$(pyenv-init -)"
|
||||
echo "\$PATH"
|
||||
!
|
||||
assert_success
|
||||
assert_line 0 'export PATH="'${PYENV_ROOT}'/shims:${PATH}"'
|
||||
assert_output "${PYENV_ROOT}/shims:${BATS_TEST_DIRNAME}/nonexistent:${OLDPATH//${PYENV_ROOT}\/shims:/}"
|
||||
}
|
||||
|
||||
@test "can add shims to PATH more than once (fish)" {
|
||||
export PATH="${PYENV_ROOT}/shims:$PATH"
|
||||
run pyenv-init --path fish
|
||||
@test "removes existing shims from PATH (fish)" {
|
||||
command -v fish >/dev/null || skip "-- fish not installed"
|
||||
OLDPATH="$PATH"
|
||||
export PATH="${BATS_TEST_DIRNAME}/nonexistent:${PYENV_ROOT}/shims:$PATH"
|
||||
# fish 2 (Ubuntu Bionic) adds spurious messages when setting PATH, messing up the output
|
||||
run fish <<!
|
||||
set -x PATH "$PATH"
|
||||
pyenv init - | source
|
||||
echo "\$PATH"
|
||||
!
|
||||
assert_success
|
||||
assert_line 0 "set -gx PATH '${PYENV_ROOT}/shims' \$PATH"
|
||||
assert_output "${PYENV_ROOT}/shims:${BATS_TEST_DIRNAME}/nonexistent:${OLDPATH//${PYENV_ROOT}\/shims:/}"
|
||||
}
|
||||
|
||||
@test "outputs sh-compatible syntax" {
|
||||
|
|
|
@ -84,7 +84,8 @@ assert_line() {
|
|||
for line in "${lines[@]}"; do
|
||||
if [ "$line" = "$1" ]; then return 0; fi
|
||||
done
|
||||
flunk "expected line \`$1'"
|
||||
flunk "expected line \`$1'" $'\n'\
|
||||
"output: $output"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -98,7 +99,8 @@ refute_line() {
|
|||
local line
|
||||
for line in "${lines[@]}"; do
|
||||
if [ "$line" = "$1" ]; then
|
||||
flunk "expected to not find line \`$line'"
|
||||
flunk "expected to not find line \`$line'" $'\n'\
|
||||
"output: $output"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue