10000 restructure python distributions (#7730) · localstack/localstack@145291f · GitHub
[go: up one dir, main page]

Skip to content

Commit 145291f

Browse files
authored
restructure python distributions (#7730)
1 parent e64f63c commit 145291f

File tree

3 files changed

+11
-52
lines changed

3 files changed

+11
-52
lines changed

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ ADD bin/localstack bin/localstack.bat bin/
161161

162162
# install dependencies to run the localstack runtime and save which ones were installed
163163
RUN make install-runtime
164+
165+
# install localstack-ext explicitly (since it's not a dependency of localstack anymore)
166+
RUN (PIP_ARGS=$([[ "$LOCALSTACK_PRE_RELEASE" == "1" ]] && echo "--pre" || true); \
167+
virtualenv .venv && . .venv/bin/activate && \
168+
pip3 install --upgrade ${PIP_ARGS} localstack-ext[runtime])
169+
164170
RUN make freeze > requirements-runtime.txt
165171
# link the extensions virtual environment into the localstack venv
166172
RUN echo /var/lib/localstack/lib/extensions/python_venv/lib/python3.10/site-packages > localstack-extensions-venv.pth && \

setup.cfg

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
[metadata]
2-
name = localstack
3-
description = LocalStack - A fully functional local Cloud stack
2+
name = localstack-core
3+
description = The core library and runtime of LocalStack
44
url = https://github.com/localstack/localstack
55
version = attr: localstack.__version__
66
author = LocalStack Contributors
77
author_email = info@localstack.cloud
88
license = Apache License 2.0
9-
long_description = file: README.md
10-
long_description_content_type = text/markdown
119
classifiers =
1210
Programming Language :: Python :: 3.10
1311
License :: OSI Approved :: Apache Software License
@@ -28,9 +26,10 @@ install_requires =
2826
boto3>=1.25.0
2927
click>=7.0
3028
cachetools~=5.0.0
31-
#dnspython==1.16.0
29+
cryptography
30+
dill==0.3.2
31+
dnspython>=1.16.0
3232
localstack-client>=1.37
33-
localstack-ext>=1.4.1.dev,<1.5
3433
plux>=1.3.1
3534
psutil>=5.4.8,<6.0.0
3635
python-dotenv>=0.19.1
@@ -72,7 +71,6 @@ runtime =
7271
botocore>=1.28.0
7372
cbor2>=5.2.0
7473
crontab>=0.22.6
75-
cryptography
7674
dnslib>=0.9.10
7775
dnspython>=1.16.0
7876
docker==6.0.1
@@ -83,7 +81,6 @@ runtime =
8381
json5==0.9.11
8482
jsonpatch>=1.24,<2.0
8583
jsonpath-rw>=1.4.0,<2.0.0
86-
localstack-ext[runtime]>=1.4.1.dev,<1.5
8784
moto-ext[all]==4.1.1.post3
8885
opensearch-py==2.1.1
8986
pproxy>=2.7.0

tests/unit/cli/test_cli.py

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import json
22
import logging
3-
import re
43
import threading
54
from queue import Queue
65

@@ -150,49 +149,6 @@ def test_validate_config_syntax_error(runner, monkeypatch, tmp_path):
150149
assert "error" in result.output
151150

152151

153-
def test_config_show_table(runner):
154-
result = runner.invoke(cli, ["config", "show"])
155-
assert result.exit_code == 0
156-
assert "DATA_DIR" in result.output
157-
assert "DEBUG" in result.output
158-
159-
160-
def test_config_show_json(runner):
161-
result = runner.invoke(cli, ["config", "show", "--format=json"])
162-
assert result.exit_code == 0
163-
164-
# remove control characters and color/formatting codes like "\x1b[32m"
165-
output = re.sub(r"\x1b\[[;0-9]+m", "", result.output, flags=re.MULTILINE)
166-
doc = json.loads(output)
167-
assert "DATA_DIR" in doc
168-
assert "DEBUG" in doc
169-
assert type(doc["DEBUG"]) == bool
170-
171-
172-
def test_config_show_plain(runner, monkeypatch):
173-
monkeypatch.setenv("DEBUG", "1")
174-
monkeypatch.setattr(config, "DEBUG", True)
175-
176-
result = runner.invoke(cli, ["config", "show", "--format=plain"])
177-
assert result.exit_code == 0
178-
179-
# using regex here, as output string may contain the color/formatting codes like "\x1b[32m"
180-
assert re.search(r"DATA_DIR[^=]*=", result.output)
181-
assert re.search(r"DEBUG[^=]*=(\x1b\[3;92m)?True", result.output)
182-
183-
184-
def test_config_show_dict(runner, monkeypatch):
185-
monkeypatch.setenv("DEBUG", "1")
186-
monkeypatch.setattr(config, "DEBUG", True)
187-
188-
result = runner.invoke(cli, ["config", "show", "--format=dict"])
189-
assert result.exit_code == 0
190-
191-
assert "'DATA_DIR'" in result.output
192-
# using regex here, as output string may contain the color/formatting codes like "\x1b[32m"
193-
assert re.search(r"'DEBUG'[^:]*: [^']*True", result.output)
194-
195-
196152
@pytest.mark.parametrize(
197153
"cli_input,expected_cmd,expected_params",
198154
[

0 commit comments

Comments
 (0)
0