cibw-install-pythons 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cibw_install_pythons-0.0.1/.github/workflows/package.yml +61 -0
- cibw_install_pythons-0.0.1/LICENSE +24 -0
- cibw_install_pythons-0.0.1/PKG-INFO +51 -0
- cibw_install_pythons-0.0.1/README.md +37 -0
- cibw_install_pythons-0.0.1/pyproject.toml +23 -0
- cibw_install_pythons-0.0.1/setup.cfg +4 -0
- cibw_install_pythons-0.0.1/src/cibw-install-pythons/__init__.py +1 -0
- cibw_install_pythons-0.0.1/src/cibw-install-pythons/__main__.py +4 -0
- cibw_install_pythons-0.0.1/src/cibw-install-pythons/install_all.py +54 -0
- cibw_install_pythons-0.0.1/src/cibw_install_pythons.egg-info/PKG-INFO +51 -0
- cibw_install_pythons-0.0.1/src/cibw_install_pythons.egg-info/SOURCES.txt +12 -0
- cibw_install_pythons-0.0.1/src/cibw_install_pythons.egg-info/dependency_links.txt +1 -0
- cibw_install_pythons-0.0.1/src/cibw_install_pythons.egg-info/requires.txt +1 -0
- cibw_install_pythons-0.0.1/src/cibw_install_pythons.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: Build and upload
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
release-build:
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.x"
|
|
22
|
+
|
|
23
|
+
- name: Build release distributions
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install build
|
|
26
|
+
python -m build
|
|
27
|
+
|
|
28
|
+
- name: Upload distributions
|
|
29
|
+
uses: actions/upload-artifact@v4
|
|
30
|
+
with:
|
|
31
|
+
name: release-dists
|
|
32
|
+
path: dist/
|
|
33
|
+
|
|
34
|
+
- name: Attach to release
|
|
35
|
+
run: |
|
|
36
|
+
gh release upload ${{github.event.release.tag_name}} dist/*
|
|
37
|
+
env:
|
|
38
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
39
|
+
|
|
40
|
+
pypi-publish:
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
|
|
43
|
+
needs:
|
|
44
|
+
- release-build
|
|
45
|
+
|
|
46
|
+
permissions:
|
|
47
|
+
id-token: write
|
|
48
|
+
|
|
49
|
+
environment:
|
|
50
|
+
name: pypi
|
|
51
|
+
url: https://pypi.org/project/cibw-install-pythons
|
|
52
|
+
|
|
53
|
+
steps:
|
|
54
|
+
- name: Retrieve release distributions
|
|
55
|
+
uses: actions/download-artifact@v4
|
|
56
|
+
with:
|
|
57
|
+
name: release-dists
|
|
58
|
+
path: dist/
|
|
59
|
+
|
|
60
|
+
- name: Publish release distributions to PyPI
|
|
61
|
+
uses: pypa/gh-action-pypi-publish@v1.12.3
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
This project is licensed under the 'BSD 2-clause license'.
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, Andrew Tapia. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
16
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
17
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
19
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
20
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
21
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
22
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
23
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
24
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cibw-install-pythons
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Unofficial installer for cibuildwheel's Python versions.
|
|
5
|
+
Author-email: Andrew Tapia <andrew.tapia@uky.edu>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/actapia/cibw-install-pythons
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/actapia/cibw-install-pythons
|
|
9
|
+
Requires-Python: >=3.8
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: cibuildwheel
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
15
|
+
# cibw-install-pythons
|
|
16
|
+
|
|
17
|
+
This is an *unofficial* script for installing the Python versions used by
|
|
18
|
+
[`cibuildwheel`](https://cibuildwheel.pypa.io/). Currently, only macOS is
|
|
19
|
+
supported.
|
|
20
|
+
|
|
21
|
+
**This script is intended for use in CI environments only.** It installs CPython
|
|
22
|
+
versions system-wide, and there is no easy way to change that behavior because
|
|
23
|
+
the CPython `pkg` files used by `cibuildwheel` cannot be relocated upon
|
|
24
|
+
installation. If you run this script on your development machine, **you will
|
|
25
|
+
likely break something.**
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
```zsh
|
|
30
|
+
python -m pip install cibw-install-pythons
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
```zsh
|
|
36
|
+
CI=1 python -m cibw-install-pythons macos
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
If the `CI=1` variable is not provided, `cibuildwheel` aborts by default to
|
|
40
|
+
avoid damaging systems not in CI environments.
|
|
41
|
+
|
|
42
|
+
CPython is always installed system-wide. PyPy and GraalPy are installed by
|
|
43
|
+
default in a cache under your `$HOME` directory. To change where these Python
|
|
44
|
+
versions are installed, use the `CIBW_CACHE_PATH` environment variable.
|
|
45
|
+
|
|
46
|
+
For example, to install in a system-wide cache,
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
CI=1 CIBW_CACHE_PATH=/Library/Caches/cibuildwheel python \
|
|
50
|
+
-m cibw-install-pythons macos
|
|
51
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# cibw-install-pythons
|
|
2
|
+
|
|
3
|
+
This is an *unofficial* script for installing the Python versions used by
|
|
4
|
+
[`cibuildwheel`](https://cibuildwheel.pypa.io/). Currently, only macOS is
|
|
5
|
+
supported.
|
|
6
|
+
|
|
7
|
+
**This script is intended for use in CI environments only.** It installs CPython
|
|
8
|
+
versions system-wide, and there is no easy way to change that behavior because
|
|
9
|
+
the CPython `pkg` files used by `cibuildwheel` cannot be relocated upon
|
|
10
|
+
installation. If you run this script on your development machine, **you will
|
|
11
|
+
likely break something.**
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```zsh
|
|
16
|
+
python -m pip install cibw-install-pythons
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```zsh
|
|
22
|
+
CI=1 python -m cibw-install-pythons macos
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
If the `CI=1` variable is not provided, `cibuildwheel` aborts by default to
|
|
26
|
+
avoid damaging systems not in CI environments.
|
|
27
|
+
|
|
28
|
+
CPython is always installed system-wide. PyPy and GraalPy are installed by
|
|
29
|
+
default in a cache under your `$HOME` directory. To change where these Python
|
|
30
|
+
versions are installed, use the `CIBW_CACHE_PATH` environment variable.
|
|
31
|
+
|
|
32
|
+
For example, to install in a system-wide cache,
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
CI=1 CIBW_CACHE_PATH=/Library/Caches/cibuildwheel python \
|
|
36
|
+
-m cibw-install-pythons macos
|
|
37
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "setuptools-scm>=8.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "cibw-install-pythons"
|
|
7
|
+
version = "0.0.1"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name = "Andrew Tapia", email = "andrew.tapia@uky.edu" }
|
|
10
|
+
]
|
|
11
|
+
description = "Unofficial installer for cibuildwheel's Python versions."
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.8"
|
|
14
|
+
dependencies = ["cibuildwheel"]
|
|
15
|
+
license = "MIT"
|
|
16
|
+
|
|
17
|
+
[project.urls]
|
|
18
|
+
"Homepage" = "https://github.com/actapia/cibw-install-pythons"
|
|
19
|
+
"Bug Tracker" = "https://github.com/actapia/cibw-install-pythons"
|
|
20
|
+
|
|
21
|
+
[tool.setuptools.packages.find]
|
|
22
|
+
where = ["src"]
|
|
23
|
+
include = ["cibw-install-pythons"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .install_all import main
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import tempfile
|
|
2
|
+
import argparse
|
|
3
|
+
import inspect
|
|
4
|
+
import os
|
|
5
|
+
import shutil
|
|
6
|
+
import sys
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from platform import machine
|
|
9
|
+
from filelock import FileLock
|
|
10
|
+
|
|
11
|
+
from cibuildwheel.platforms import macos as platform
|
|
12
|
+
from cibuildwheel.util import resources
|
|
13
|
+
from cibuildwheel.util.cmd import call
|
|
14
|
+
from cibuildwheel.util.file import CIBW_CACHE_PATH, download
|
|
15
|
+
from cibuildwheel.ci import detect_ci_provider
|
|
16
|
+
from cibuildwheel import errors
|
|
17
|
+
|
|
18
|
+
def handle_arguments():
|
|
19
|
+
parser = argparse.ArgumentParser()
|
|
20
|
+
subparsers = parser.add_subparsers(dest="command", required=True)
|
|
21
|
+
macos_parser = subparsers.add_parser("macos")
|
|
22
|
+
return parser.parse_args()
|
|
23
|
+
|
|
24
|
+
def macos_install():
|
|
25
|
+
configs = platform.all_python_configurations()
|
|
26
|
+
with tempfile.TemporaryDirectory() as tmp_root:
|
|
27
|
+
for config in configs:
|
|
28
|
+
arch = "_".join(config.identifier.split("-")[-1].split("_")[1:])
|
|
29
|
+
if arch == machine():
|
|
30
|
+
print("Installing", config.identifier)
|
|
31
|
+
tmp = Path(tmp_root) / config.identifier
|
|
32
|
+
tmp.mkdir(exist_ok=True)
|
|
33
|
+
implementation_id = config.identifier.split("-")[0]
|
|
34
|
+
if implementation_id.startswith("cp"):
|
|
35
|
+
free_threading = "t-macos" in config.identifier
|
|
36
|
+
base_python = platform.install_cpython(
|
|
37
|
+
tmp,
|
|
38
|
+
config.version,
|
|
39
|
+
config.url,
|
|
40
|
+
free_threading
|
|
41
|
+
)
|
|
42
|
+
elif implementation_id.startswith("pp"):
|
|
43
|
+
base_python = platform.install_pypy(tmp, config.url)
|
|
44
|
+
elif implementation_id.startswith("gp"):
|
|
45
|
+
base_python = platform.install_graalpy(tmp, config.url)
|
|
46
|
+
|
|
47
|
+
def main():
|
|
48
|
+
args = handle_arguments()
|
|
49
|
+
if args.command == "macos":
|
|
50
|
+
macos_install()
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
if __name__ == "__main__":
|
|
54
|
+
main()
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cibw-install-pythons
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Unofficial installer for cibuildwheel's Python versions.
|
|
5
|
+
Author-email: Andrew Tapia <andrew.tapia@uky.edu>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/actapia/cibw-install-pythons
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/actapia/cibw-install-pythons
|
|
9
|
+
Requires-Python: >=3.8
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Requires-Dist: cibuildwheel
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
15
|
+
# cibw-install-pythons
|
|
16
|
+
|
|
17
|
+
This is an *unofficial* script for installing the Python versions used by
|
|
18
|
+
[`cibuildwheel`](https://cibuildwheel.pypa.io/). Currently, only macOS is
|
|
19
|
+
supported.
|
|
20
|
+
|
|
21
|
+
**This script is intended for use in CI environments only.** It installs CPython
|
|
22
|
+
versions system-wide, and there is no easy way to change that behavior because
|
|
23
|
+
the CPython `pkg` files used by `cibuildwheel` cannot be relocated upon
|
|
24
|
+
installation. If you run this script on your development machine, **you will
|
|
25
|
+
likely break something.**
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
```zsh
|
|
30
|
+
python -m pip install cibw-install-pythons
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
```zsh
|
|
36
|
+
CI=1 python -m cibw-install-pythons macos
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
If the `CI=1` variable is not provided, `cibuildwheel` aborts by default to
|
|
40
|
+
avoid damaging systems not in CI environments.
|
|
41
|
+
|
|
42
|
+
CPython is always installed system-wide. PyPy and GraalPy are installed by
|
|
43
|
+
default in a cache under your `$HOME` directory. To change where these Python
|
|
44
|
+
versions are installed, use the `CIBW_CACHE_PATH` environment variable.
|
|
45
|
+
|
|
46
|
+
For example, to install in a system-wide cache,
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
CI=1 CIBW_CACHE_PATH=/Library/Caches/cibuildwheel python \
|
|
50
|
+
-m cibw-install-pythons macos
|
|
51
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
.github/workflows/package.yml
|
|
5
|
+
src/cibw-install-pythons/__init__.py
|
|
6
|
+
src/cibw-install-pythons/__main__.py
|
|
7
|
+
src/cibw-install-pythons/install_all.py
|
|
8
|
+
src/cibw_install_pythons.egg-info/PKG-INFO
|
|
9
|
+
src/cibw_install_pythons.egg-info/SOURCES.txt
|
|
10
|
+
src/cibw_install_pythons.egg-info/dependency_links.txt
|
|
11
|
+
src/cibw_install_pythons.egg-info/requires.txt
|
|
12
|
+
src/cibw_install_pythons.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cibuildwheel
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cibw-install-pythons
|