GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Pin python packages used in extension and remove them repo (#3513) · rtu/vscode-python@20a7bd5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .gitignore
  • .travis.yml
  • .vscodeignore
  • CONTRIBUTING.md
  • build
    • ci/templates
      • compile-and-validate.yml
      • test-phase.yml
    • functional-test-requirements.txt
    • test-requirements.txt
  • gulpfile.js
  • package.json
  • pvsc-dev-ext.py
  • pythonFiles
    • PythonTools
      • ptvsd
        • __init__.py
        • __main__.py
        • attach_server.py
        • setup.py
        • visualstudio_py_debugger.py
        • visualstudio_py_repl.py
        • visualstudio_py_util.py
      • testlauncher.py
      • visualstudio_ipython_repl.py
      • visualstudio_py_debugger.py
      • visualstudio_py_launcher.py
      • visualstudio_py_launcher_nodebug.py
      • visualstudio_py_repl.py
      • visualstudio_py_util.py
    • completion.py
    • completionServer.py
    • isort
      • __init__.py
      • __main__.py
      • hooks.py
      • isort.py
      • main.py
      • natural.py
      • pie_slice.py
      • pylama_isort.py
      • settings.py
    • jedi
      • __init__.py
      • __main__.py
      • _compatibility.py
      • api
        • __init__.py
        • classes.py
        • completion.py
        • environment.py
        • exceptions.py
        • helpers.py
        • interpreter.py
        • keywords.py
        • project.py
        • replstartup.py
      • cache.py
      • common
        • __init__.py
        • context.py
        • utils.py
      • debug.py
      • evaluate
        • __init__.py
        • analysis.py
        • arguments.py
        • base_context.py
        • cache.py
        • compiled
          • __init__.py
          • access.py
          • context.py
          • fake.py
          • fake
            • _functools.pym
            • _sqlite3.pym
            • _sre.pym
            • _weakref.pym
            • builtins.pym
            • datetime.pym
            • io.pym
            • operator.pym
            • posix.pym
          • getattr_static.py
          • mixed.py
          • subprocess
            • __init__.py
            • __main__.py
            • functions.py
        • context
          • __init__.py
          • asynchronous.py
          • function.py
          • instance.py
          • iterable.py
          • klass.py
          • module.py
          • namespace.py
        • docstrings.py
        • dynamic.py
        • filters.py
        • finder.py
        • flow_analysis.py
        • helpers.py
        • imports.py
        • jedi_typing.py
        • lazy_context.py
        • param.py
        • parser_cache.py
        • pep0484.py
        • recursion.py
        • stdlib.py
        • syntax_tree.py
        • sys_path.py
        • usages.py
        • utils.py
      • parser_utils.py
      • refactoring.py
      • settings.py
      • utils.py
    • parso
      • __init__.py
      • _compatibility.py
      • cache.py
      • grammar.py
      • normalizer.py
      • parser.py
      • pgen2
        • __init__.py
        • generator.py
        • grammar_parser.py
      • python
        • __init__.py
        • diff.py
        • errors.py
        • grammar26.txt
        • grammar27.txt
        • grammar33.txt
        • grammar34.txt
        • grammar35.txt
        • grammar36.txt
        • grammar37.txt
        • parser.py
        • pep8.py
        • prefix.py
        • token.py
        • tokenize.py
        • tree.py
      • tree.py
      • utils.py
    • ptvsd_launcher.py
    • sortImports.py
    • testlauncher.py
    • visualstudio_py_testlauncher.py
  • requirements.txt
  • src
    • client
      • api.ts
      • debugger
        • constants.ts
        • debugAdapter/DebugClients
          • launcherProvider.ts
      • unittests
        • common
          • debugLauncher.ts
        • unittest
          • runner.ts
    • test
      • debugger/debugAdapter/debugClients
        • launcherProvider.unit.test.ts
      • extension.unit.test.ts
      • unittests/common
        • debugLauncher.test.ts

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.gitignore‎

Copy file name to clipboardExpand all lines: .gitignore
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ coverage/
1616
**/.venv*/
1717
precommit.hook
1818
pythonFiles/experimental/ptvsd/**
19+
pythonFiles/lib/**
1920
debug_coverage*/**
2021
languageServer/**
2122
languageServer.*/**
Collapse file

‎.travis.yml‎

Copy file name to clipboardExpand all lines: .travis.yml
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ install:
5959
- npx gulp prePublishNonBundle
6060
- npx gulp hygiene-modified
6161
- python -m pip install --upgrade pip
62-
- python -m pip install --upgrade -r requirements.txt
63-
- python -m pip install -t ./pythonFiles/experimental/ptvsd --no-cache-dir --implementation py --no-deps ptvsd
62+
- python -m pip install --upgrade -r ./build/test-requirements.txt
63+
- npx gulp installPythonLibs
6464

6565
script:
6666
- if [ $UNIT_TEST == "true" ]; then
@@ -73,7 +73,7 @@ script:
7373
fi
7474
- npm run debugger-coverage
7575
- if [ $FUNCTIONAL_TEST == "true" ]; then
76-
python -m pip install --upgrade -r functionalTestRequirements.txt;
76+
python -m pip install --upgrade -r ./build/functional-test-requirements.txt;
7777
npm run test:functional;
7878
fi
7979
- if [ $SINGLE_WORKSPACE_TEST == "true" ]; then
Collapse file

‎.vscodeignore‎

Copy file name to clipboardExpand all lines: .vscodeignore
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ CODING_STANDARDS.md
1515
CONTRIBUTING.md
1616
CONTRIBUTING - LANGUAGE SERVER.md
1717
coverconfig.json
18-
functionalTestRequirements.txt
1918
gulpfile.js
2019
package.datascience-ui.dependencies.json
2120
package-lock.json
@@ -56,6 +55,9 @@ out/test/**
5655
out/testMultiRootWkspc/**
5756
precommit.hook
5857
pythonFiles/**/*.pyc
58+
pythonFiles/lib/**/*.dist-info/**
59+
pythonFiles/lib/**/*.egg-info/**
60+
pythonFiles/lib/python/bin/**
5961
requirements.txt
6062
scripts/**
6163
src/**
Collapse file

‎CONTRIBUTING.md‎

Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-2Lines changed: 1 addition & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ cd vscode-python
3737
npm install
3838
python3 -m venv .venv
3939
# Activate the virtual environment as appropriate for your shell.
40-
python -m pip install -r requirements.txt
41-
python -m pip install -t pythonFiles/experimental/ptvsd ptvsd
40+
python3 -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
4241
# Specifying the virtual environment simply varies between shells.
4342
export CI_PYTHON_PATH=`pwd`/.venv/bin/python
4443
```
Collapse file

‎build/ci/templates/compile-and-validate.yml‎

Copy file name to clipboardExpand all lines: build/ci/templates/compile-and-validate.yml
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,19 +156,19 @@ jobs:
156156

157157

158158
- task: CmdLine@1
159-
displayName: 'pip install requirements'
159+
displayName: 'pip install test requirements'
160160
inputs:
161161
filename: python
162162

163-
arguments: '-m pip install --upgrade -r ./requirements.txt'
163+
arguments: '-m pip install --upgrade -r ./build/test-requirements.txt'
164164

165165

166166
- task: CmdLine@1
167-
displayName: 'pip install ptvsd'
167+
displayName: 'pip install python packages'
168168
inputs:
169169
filename: python
170170

171-
arguments: '-m pip install -t ./pythonFiles/experimental/ptvsd --no-cache-dir --implementation py --no-deps ptvsd'
171+
arguments: '-m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt'
172172

173173

174174
- task: ArchiveFiles@2
Collapse file

‎build/ci/templates/test-phase.yml‎

Copy file name to clipboardExpand all lines: build/ci/templates/test-phase.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,15 @@ steps:
149149
inputs:
150150
filename: python
151151

152-
arguments: '-m pip install --upgrade -r ./requirements.txt'
152+
arguments: '-m pip install --upgrade -r ./build/test-requirements.txt'
153153

154154

155155
- task: CmdLine@1
156156
displayName: 'pip install ptvsd'
157157
inputs:
158158
filename: python
159159

160-
arguments: '-m pip install -t ./pythonFiles/experimental/ptvsd --no-cache-dir --implementation py --no-deps ptvsd'
160+
arguments: '-m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt'
161161

162162

163163
- task: Npm@1
Collapse file

‎functionalTestRequirements.txt‎ ‎build/functional-test-requirements.txt‎functionalTestRequirements.txt renamed to build/functional-test-requirements.txt

Copy file name to clipboard
File renamed without changes.
Collapse file

‎build/test-requirements.txt‎

Copy file name to clipboard
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Install flake8 first, as both flake8 and autopep8 require pycodestyle,
2+
# but flake8 has a tighter pinning.
3+
flake8
4+
autopep8
5+
bandit
6+
black ; python_version>='3.6'
7+
yapf
8+
pylint
9+
pep8
10+
prospector
11+
pydocstyle
12+
nose
13+
pytest==3.6.3
14+
rope
15+
flask
16+
django
Collapse file

‎gulpfile.js‎

Copy file name to clipboardExpand all lines: gulpfile.js
+23-4Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const path = require('path');
2222
const jeditor = require("gulp-json-editor");
2323
const del = require('del');
2424
const sourcemaps = require('gulp-sourcemaps');
25-
const fs = require('fs');
25+
const fs = require('fs-extra');
2626
const fsExtra = require('fs-extra');
2727
const remapIstanbul = require('remap-istanbul');
2828
const istanbul = require('istanbul');
@@ -107,8 +107,6 @@ gulp.task('clean:out', () => del(['out']));
107107

108108
gulp.task('clean', gulp.parallel('output:clean', 'cover:clean', 'clean:vsix'));
109109

110-
gulp.task('clean:ptvsd', () => del(['coverage', 'pythonFiles/experimental/ptvsd/*']));
111-
112110
gulp.task('checkNativeDependencies', (done) => {
113111
if (hasNativeDependencies()) {
114112
throw new Error('Native dependencies deteced');
@@ -202,11 +200,32 @@ gulp.task('webpack', async () => {
202200
gulp.task('prePublishBundle', gulp.series('checkNativeDependencies', 'check-datascience-dependencies', 'compile', 'clean:cleanExceptTests', 'webpack'));
203201
gulp.task('prePublishNonBundle', gulp.series('checkNativeDependencies', 'check-datascience-dependencies', 'compile', 'compile-webviews'));
204202

203+
const installPythonLibArgs = ['-m', 'pip', '--disable-pip-version-check', 'install',
204+
'-t', './pythonFiles/lib/python', '--no-cache-dir', '--implementation', 'py', '--no-deps',
205+
'--upgrade', '-r', 'requirements.txt'];
206+
gulp.task('installPythonLibs', async () => {
207+
const requirements = fs.readFileSync(path.join(__dirname, 'requirements.txt'), 'utf8').split('\n').map(item => item.trim()).filter(item => item.length > 0);
208+
const args = ['-m', 'pip', '--disable-pip-version-check', 'install', '-t', './pythonFiles/lib/python', '--no-cache-dir', '--implementation', 'py', '--no-deps', '--upgrade'];
209+
await Promise.all(requirements.map(async requirement => {
210+
const success = await spawnAsync(process.env.CI_PYTHON_PATH || 'python3', args.concat(requirement))
211+
.then(() => true)
212+
.catch(ex => {
213+
console.error('Failed to install Python Libs using \'python3\'', ex);
214+
return false
215+
});
216+
if (!success) {
217+
console.info('Failed to install Python Libs using \'python3\', attempting to install using \'python\'');
218+
await spawnAsync('python', args.concat(requirement))
219+
.catch(ex => console.error('Failed to install Python Libs using \'python\'', ex));
220+
}
221+
}));
222+
});
223+
205224
function spawnAsync(command, args) {
206225
return new Promise((resolve, reject) => {
207226
const proc = spawn(command, args, { cwd: __dirname });
208227
proc.stdout.on('data', data => {
209-
// Log output on CI.
228+
// Log output on CI (else travis times out when there's not output).
210229
if (isCI) {
211230
console.log(data.toString());
212231
}
Collapse file

‎package.json‎

Copy file name to clipboardExpand all lines: package.json
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,6 @@
17081708
"lint-staged": "node gulpfile.js",
17091709
"lint": "tslint src/**/*.ts -t verbose",
17101710
"clean": "gulp clean",
1711-
"clean:ptvsd": "gulp clean:ptvsd",
17121711
"cover:enable": "gulp cover:enable",
17131712
"debugger-coverage": "gulp debugger-coverage",
17141713
"cover:inlinesource": "gulp inlinesource"

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.