Skip to content

Commit c415fd3

Browse files
Fix compilation error (#65)
* Fix nox file * Fix command python.interpreterPath already exists * Fix nox file
1 parent 6cfbaf9 commit c415fd3

File tree

8 files changed

+16
-145
lines changed

8 files changed

+16
-145
lines changed

noxfile.py

+14-12
Original file line numberDiff line numberDiff line change
@@ -149,17 +149,19 @@ def _get_urls(data, version):
149149
)
150150

151151

152-
def _download_and_extract(root, url, version):
153-
root = os.getcwd() if root is None or root == "." else root
154-
with url_lib.urlopen(url) as response:
155-
data = response.read()
156-
with zipfile.ZipFile(io.BytesIO(data), "r") as wheel:
157-
for zip_info in wheel.infolist():
158-
# Ignore dist info since we are merging multiple wheels
159-
if ".dist-info/" in zip_info.filename:
160-
continue
161-
print("\t" + zip_info.filename)
162-
wheel.extract(zip_info.filename, root)
152+
def _download_and_extract(root, url):
153+
if "manylinux" in url or "macosx" in url or "win_amd64" in url:
154+
root = os.getcwd() if root is None or root == "." else root
155+
print(url)
156+
with url_lib.urlopen(url) as response:
157+
data = response.read()
158+
with zipfile.ZipFile(io.BytesIO(data), "r") as wheel:
159+
for zip_info in wheel.infolist():
160+
# Ignore dist info since we are merging multiple wheels
161+
if ".dist-info/" in zip_info.filename:
162+
continue
163+
print("\t" + zip_info.filename)
164+
wheel.extract(zip_info.filename, root)
163165

164166

165167
def _install_package(root, package_name, version="latest"):
@@ -173,7 +175,7 @@ def _install_package(root, package_name, version="latest"):
173175
use_version = version
174176

175177
for url in _get_urls(data, use_version):
176-
_download_and_extract(root, url, use_version)
178+
_download_and_extract(root, url)
177179

178180

179181
@nox.session()

requirements.in

-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@
55
# 2) pip-compile --generate-hashes --upgrade ./requirements.in
66

77
packaging
8-
debugpy

requirements.txt

+1-21
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,9 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.9
2+
# This file is autogenerated by pip-compile with Python 3.7
33
# by the following command:
44
#
55
# pip-compile --generate-hashes ./requirements.in
66
#
7-
debugpy==1.6.7 \
8-
--hash=sha256:0679b7e1e3523bd7d7869447ec67b59728675aadfc038550a63a362b63029d2c \
9-
--hash=sha256:279d64c408c60431c8ee832dfd9ace7c396984fd7341fa3116aee414e7dcd88d \
10-
--hash=sha256:33edb4afa85c098c24cc361d72ba7c21bb92f501104514d4ffec1fb36e09c01a \
11-
--hash=sha256:38ed626353e7c63f4b11efad659be04c23de2b0d15efff77b60e4740ea685d07 \
12-
--hash=sha256:5224eabbbeddcf1943d4e2821876f3e5d7d383f27390b82da5d9558fd4eb30a9 \
13-
--hash=sha256:53f7a456bc50706a0eaabecf2d3ce44c4d5010e46dfc65b6b81a518b42866267 \
14-
--hash=sha256:9cd10cf338e0907fdcf9eac9087faa30f150ef5445af5a545d307055141dd7a4 \
15-
--hash=sha256:aaf6da50377ff4056c8ed470da24632b42e4087bc826845daad7af211e00faad \
16-
--hash=sha256:b3e7ac809b991006ad7f857f016fa92014445085711ef111fdc3f74f66144096 \
17-
--hash=sha256:bae1123dff5bfe548ba1683eb972329ba6d646c3a80e6b4c06cd1b1dd0205e9b \
18-
--hash=sha256:c0ff93ae90a03b06d85b2c529eca51ab15457868a377c4cc40a23ab0e4e552a3 \
19-
--hash=sha256:c4c2f0810fa25323abfdfa36cbbbb24e5c3b1a42cb762782de64439c575d67f2 \
20-
--hash=sha256:d71b31117779d9a90b745720c0eab54ae1da76d5b38c8026c654f4a066b0130a \
21-
--hash=sha256:dbe04e7568aa69361a5b4c47b4493d5680bfa3a911d1e105fbea1b1f23f3eb45 \
22-
--hash=sha256:de86029696e1b3b4d0d49076b9eba606c226e33ae312a57a46dca14ff370894d \
23-
--hash=sha256:e3876611d114a18aafef6383695dfc3f1217c98a9168c1aaf1a02b01ec7d8d1e \
24-
--hash=sha256:ed6d5413474e209ba50b1a75b2d9eecf64d41e6e4501977991cdc755dc83ab0f \
25-
--hash=sha256:f90a2d4ad9a035cee7331c06a4cf2245e38bd7c89554fe3b616d90ab8aab89cc
26-
# via -r ./requirements.in
277
packaging==23.1 \
288
--hash=sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61 \
299
--hash=sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f

src/extension/common/constants.ts

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export namespace Commands {
3838
export const Enable_SourceMap_Support = 'debugpy.enableSourceMapSupport';
3939
export const SelectDebugConfig = 'debugpy.SelectAndInsertDebugConfiguration';
4040
export const Set_Interpreter = 'python.setInterpreter';
41-
export const GetSelectedInterpreterPath = 'python.interpreterPath';
4241
}
4342

4443
export type Channel = 'stable' | 'insiders';

src/extension/debugger/configuration/launch.json/interpreterPathCommand.ts

-36
This file was deleted.

src/extension/extensionInit.ts

-8
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import { AttachProcessProvider } from './debugger/attachQuickPick/provider';
2828
import { AttachPicker } from './debugger/attachQuickPick/picker';
2929
import { DebugSessionTelemetry } from './common/application/debugSessionTelemetry';
3030
import { JsonLanguages, LaunchJsonCompletionProvider } from './debugger/configuration/launch.json/completionProvider';
31-
import { InterpreterPathCommand } from './debugger/configuration/launch.json/interpreterPathCommand';
3231
import { LaunchJsonUpdaterServiceHelper } from './debugger/configuration/launch.json/updaterServiceHelper';
3332
import { ignoreErrors } from './common/promiseUtils';
3433
import { pickArgsInput } from './common/utils/localize';
@@ -126,11 +125,4 @@ export async function registerDebugger(context: IExtensionContext): Promise<void
126125
launchJsonCompletionProvider,
127126
),
128127
);
129-
130-
const interpreterPathCommand = new InterpreterPathCommand();
131-
context.subscriptions.push(
132-
registerCommand(Commands.GetSelectedInterpreterPath, (args) =>
133-
interpreterPathCommand._getSelectedInterpreterPath(args),
134-
),
135-
);
136128
}

src/test/unittest/configuration/launch.json/interpreterPathCommand.unit.test.ts

-64
This file was deleted.

src/test/unittest/extensionInit.unit.test.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,8 @@ suite('Debugging - register Debugging', () => {
6868
sinon.match.any,
6969
sinon.match.any,
7070
);
71-
sinon.assert.calledWithExactly(registerCommandStub, Commands.GetSelectedInterpreterPath, sinon.match.any);
7271
sinon.assert.calledWithExactly(registerCommandStub, Commands.ClearStorage, sinon.match.any);
73-
expect(registerCommandStub.callCount).to.be.equal(6);
72+
expect(registerCommandStub.callCount).to.be.equal(5);
7473
});
7574
test('Activation will register the Debug adapter factories', async () => {
7675
registerDebugger(context.object);

0 commit comments

Comments
 (0)