mirror of https://github.com/actions/setup-python
Merge pull request #46 from brcrista/brcrista/old-references
Update terminology in setup-python
This commit is contained in:
commit
f907029c9b
|
@ -1,5 +1,5 @@
|
||||||
name: Main workflow
|
name: Main workflow
|
||||||
on: [push]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
name: Run
|
name: Run
|
||||||
|
|
|
@ -19,7 +19,7 @@ steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: actions/setup-python@v1
|
- uses: actions/setup-python@v1
|
||||||
with:
|
with:
|
||||||
python-version: '3.x' # Version range or exact version of a Python version to use, using semvers version range syntax.
|
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
|
||||||
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
||||||
- run: python my_script.py
|
- run: python my_script.py
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
|
---
|
||||||
name: 'Setup Python'
|
name: 'Setup Python'
|
||||||
description: 'Set up a specific version of Python and add the command-line tools to the PATH'
|
description: 'Set up a specific version of Python and add the command-line tools to the PATH.'
|
||||||
author: 'GitHub'
|
author: 'GitHub'
|
||||||
inputs:
|
inputs:
|
||||||
python-version:
|
python-version:
|
||||||
description: 'Version range or exact version of a Python version to use, using semvers version range syntax.'
|
description: "Version range or exact version of a Python version to use, using SemVer's version range syntax."
|
||||||
default: '3.x'
|
default: '3.x'
|
||||||
architecture:
|
architecture:
|
||||||
description: 'The target architecture (x86, x64) of the Python interpreter.'
|
description: 'The target architecture (x86, x64) of the Python interpreter.'
|
||||||
|
|
|
@ -1,3 +1,79 @@
|
||||||
|
module.exports =
|
||||||
|
/******/ (function(modules, runtime) { // webpackBootstrap
|
||||||
|
/******/ "use strict";
|
||||||
|
/******/ // The module cache
|
||||||
|
/******/ var installedModules = {};
|
||||||
|
/******/
|
||||||
|
/******/ // The require function
|
||||||
|
/******/ function __webpack_require__(moduleId) {
|
||||||
|
/******/
|
||||||
|
/******/ // Check if module is in cache
|
||||||
|
/******/ if(installedModules[moduleId]) {
|
||||||
|
/******/ return installedModules[moduleId].exports;
|
||||||
|
/******/ }
|
||||||
|
/******/ // Create a new module (and put it into the cache)
|
||||||
|
/******/ var module = installedModules[moduleId] = {
|
||||||
|
/******/ i: moduleId,
|
||||||
|
/******/ l: false,
|
||||||
|
/******/ exports: {}
|
||||||
|
/******/ };
|
||||||
|
/******/
|
||||||
|
/******/ // Execute the module function
|
||||||
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||||
|
/******/
|
||||||
|
/******/ // Flag the module as loaded
|
||||||
|
/******/ module.l = true;
|
||||||
|
/******/
|
||||||
|
/******/ // Return the exports of the module
|
||||||
|
/******/ return module.exports;
|
||||||
|
/******/ }
|
||||||
|
/******/
|
||||||
|
/******/
|
||||||
|
/******/ __webpack_require__.ab = __dirname + "/";
|
||||||
|
/******/
|
||||||
|
/******/ // the startup function
|
||||||
|
/******/ function startup() {
|
||||||
|
/******/ // Load entry module and return exports
|
||||||
|
/******/ return __webpack_require__(264);
|
||||||
|
/******/ };
|
||||||
|
/******/
|
||||||
|
/******/ // run startup
|
||||||
|
/******/ return startup();
|
||||||
|
/******/ })
|
||||||
|
/************************************************************************/
|
||||||
|
/******/ ({
|
||||||
|
|
||||||
|
/***/ 16:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = require("tls");
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 87:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = require("os");
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 129:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = require("child_process");
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 211:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = require("https");
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 264:
|
||||||
|
/***/ (function(module, __unusedexports, __webpack_require__) {
|
||||||
|
|
||||||
module.exports =
|
module.exports =
|
||||||
/******/ (function(modules, runtime) { // webpackBootstrap
|
/******/ (function(modules, runtime) { // webpackBootstrap
|
||||||
/******/ "use strict";
|
/******/ "use strict";
|
||||||
|
@ -46,47 +122,47 @@ module.exports =
|
||||||
/***/ 16:
|
/***/ 16:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
module.exports = require("tls");
|
module.exports = __webpack_require__(16);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 87:
|
/***/ 87:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
module.exports = require("os");
|
module.exports = __webpack_require__(87);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 129:
|
/***/ 129:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
module.exports = require("child_process");
|
module.exports = __webpack_require__(129);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 211:
|
/***/ 211:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
module.exports = require("https");
|
module.exports = __webpack_require__(211);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 357:
|
/***/ 357:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
module.exports = require("assert");
|
module.exports = __webpack_require__(357);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 417:
|
/***/ 417:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
module.exports = require("crypto");
|
module.exports = __webpack_require__(417);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 429:
|
/***/ 429:
|
||||||
/***/ (function(module, __unusedexports, __webpack_require__) {
|
/***/ (function(module, __unusedexports, __nested_webpack_require_2019__) {
|
||||||
|
|
||||||
module.exports =
|
module.exports =
|
||||||
/******/ (function(modules, runtime) { // webpackBootstrap
|
/******/ (function(modules, runtime) { // webpackBootstrap
|
||||||
|
@ -136,28 +212,28 @@ module.exports =
|
||||||
/***/ 16:
|
/***/ 16:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
module.exports = __webpack_require__(16);
|
module.exports = __nested_webpack_require_2019__(16);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 87:
|
/***/ 87:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
module.exports = __webpack_require__(87);
|
module.exports = __nested_webpack_require_2019__(87);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 129:
|
/***/ 129:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
module.exports = __webpack_require__(129);
|
module.exports = __nested_webpack_require_2019__(129);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 211:
|
/***/ 211:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
module.exports = __webpack_require__(211);
|
module.exports = __nested_webpack_require_2019__(211);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
@ -5404,14 +5480,67 @@ module.exports = __nested_webpack_require_1759__(835);
|
||||||
/***/ 357:
|
/***/ 357:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
module.exports = __webpack_require__(357);
|
module.exports = __nested_webpack_require_2019__(357);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 417:
|
/***/ 417:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
module.exports = __webpack_require__(417);
|
module.exports = __nested_webpack_require_2019__(417);
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 605:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = __nested_webpack_require_2019__(605);
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 614:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = __nested_webpack_require_2019__(614);
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 622:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = __nested_webpack_require_2019__(622);
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 631:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = __nested_webpack_require_2019__(631);
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 669:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = __nested_webpack_require_2019__(669);
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 747:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = __nested_webpack_require_2019__(747);
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 835:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = __nested_webpack_require_2019__(835);
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
|
||||||
|
/******/ });
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
@ -5468,6 +5597,20 @@ module.exports = __webpack_require__(835);
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 357:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = require("assert");
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 417:
|
||||||
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
module.exports = require("crypto");
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
/***/ 605:
|
/***/ 605:
|
||||||
/***/ (function(module) {
|
/***/ (function(module) {
|
||||||
|
|
||||||
|
|
|
@ -2,29 +2,29 @@
|
||||||
|
|
||||||
### Checkin
|
### Checkin
|
||||||
|
|
||||||
- Do checkin source (src)
|
- Do check in source (`src/`)
|
||||||
- Do checkin a single index.js file after running `ncc`
|
- Do check in a single `index.js` file after running `ncc`
|
||||||
- Do not checkin node_modules
|
- Do not check in `node_modules/`
|
||||||
|
|
||||||
### NCC
|
### NCC
|
||||||
|
|
||||||
In order to avoid uploading `node_modules` to the repository, we use [zeit/ncc](https://github.com/zeit/ncc) to create a single `index.js` file that gets saved in `dist/`.
|
In order to avoid uploading `node_modules/` to the repository, we use [zeit/ncc](https://github.com/zeit/ncc) to create a single `index.js` file that gets saved in `dist/`.
|
||||||
|
|
||||||
### Developing
|
### Developing
|
||||||
|
|
||||||
If you're developing locally you can run
|
If you're developing locally, you can run
|
||||||
```
|
```
|
||||||
npm install
|
npm install
|
||||||
tsc
|
tsc
|
||||||
ncc build
|
ncc build
|
||||||
```
|
```
|
||||||
Any files generated using `tsc` will be added to `lib/*`, however those files also are not uploaded to the repository and are exluded using `.gitignore`.
|
Any files generated using `tsc` will be added to `lib/`, however those files also are not uploaded to the repository and are exluded using `.gitignore`.
|
||||||
|
|
||||||
During the commit step, Husky will take care of formatting all files with [Prettier](https://github.com/prettier/prettier)
|
During the commit step, Husky will take care of formatting all files with [Prettier](https://github.com/prettier/prettier)
|
||||||
|
|
||||||
### Testing
|
### Testing
|
||||||
|
|
||||||
We ask that you include a link to a succesfull run that utilizes the changes you are working on. For example, if your changes are in the branch `newAwesomeFeature`, then show an example run that uses `setup-python@newAwesomeFeature` or `my-fork@newAwesomeFeature`. This will help speed up testing and help us confirm that there are no breaking changes or bugs.
|
We ask that you include a link to a successful run that utilizes the changes you are working on. For example, if your changes are in the branch `newAwesomeFeature`, then show an example run that uses `setup-python@newAwesomeFeature` or `my-fork@newAwesomeFeature`. This will help speed up testing and help us confirm that there are no breaking changes or bugs.
|
||||||
|
|
||||||
### Releases
|
### Releases
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ function usePyPy(majorVersion: 2 | 3, architecture: string): void {
|
||||||
|
|
||||||
if (!installDir && IS_WINDOWS) {
|
if (!installDir && IS_WINDOWS) {
|
||||||
// PyPy only precompiles binaries for x86, but the architecture parameter defaults to x64.
|
// PyPy only precompiles binaries for x86, but the architecture parameter defaults to x64.
|
||||||
// On Hosted VS2017, we only install an x86 version.
|
// On our Windows virtual environments, we only install an x86 version.
|
||||||
// Fall back to x86.
|
// Fall back to x86.
|
||||||
installDir = findPyPy('x86');
|
installDir = findPyPy('x86');
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ async function useCpythonVersion(
|
||||||
|
|
||||||
if (IS_WINDOWS) {
|
if (IS_WINDOWS) {
|
||||||
// Add --user directory
|
// Add --user directory
|
||||||
// `installDir` from tool cache should look like $AGENT_TOOLSDIRECTORY/Python/<semantic version>/x64/
|
// `installDir` from tool cache should look like $RUNNER_TOOL_CACHE/Python/<semantic version>/x64/
|
||||||
// So if `findLocalTool` succeeded above, we must have a conformant `installDir`
|
// So if `findLocalTool` succeeded above, we must have a conformant `installDir`
|
||||||
const version = path.basename(path.dirname(installDir));
|
const version = path.basename(path.dirname(installDir));
|
||||||
const major = semver.major(version);
|
const major = semver.major(version);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
extends: default
|
extends: default
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
# 80 chars should be enough, but don't fail if a line is longer
|
# 120 chars should be enough, but don't fail if a line is longer
|
||||||
line-length:
|
line-length:
|
||||||
max: 80
|
max: 120
|
||||||
level: warning
|
level: warning
|
||||||
|
|
Loading…
Reference in New Issue