Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit 87aa463

Browse files
committed
Move sawtooth-signing to python-sdk package
Signed-off-by: Ryan Beck-Buysse <[email protected]>
1 parent b3e514e commit 87aa463

27 files changed

+16
-347
lines changed

Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,11 @@ RUN apt-get install -y -q \
4040

4141
RUN apt-get install -y -q \
4242
python3-colorlog \
43+
python3-secp256k1 \
4344
python3-toml \
4445
python3-yaml \
4546
python3-zmq
4647

47-
RUN apt-get install -y -q \
48-
python3-sawtooth-signing
49-
5048
ENV PATH=$PATH:/project/sawtooth-sdk-python/bin
5149

5250
WORKDIR /project/sawtooth-sdk-python

Dockerfile-installed-bionic

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,6 @@
1414

1515
# docker build -f Dockerfile-installed-bionic -t sawtooth-sdk-python .
1616

17-
# -------------=== signing build ===-------------
18-
FROM ubuntu:bionic as sawtooth-signing-builder
19-
20-
RUN apt-get update \
21-
&& apt-get install gnupg -y
22-
23-
ENV VERSION=AUTO_STRICT
24-
25-
RUN echo "deb http://repo.sawtooth.me/ubuntu/ci bionic universe" >> /etc/apt/sources.list \
26-
&& (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \
27-
|| apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \
28-
&& apt-get update \
29-
&& apt-get install -y -q \
30-
git \
31-
python3 \
32-
python3-protobuf \
33-
python3-secp256k1 \
34-
python3-stdeb \
35-
python3-grpcio-tools \
36-
python3-grpcio
37-
38-
COPY . /project
39-
40-
RUN /project/bin/protogen \
41-
&& cd /project/signing \
42-
&& if [ -d "debian" ]; then rm -rf debian; fi \
43-
&& python3 setup.py clean --all \
44-
&& python3 setup.py --command-packages=stdeb.command debianize \
45-
&& if [ -d "packaging/ubuntu" ]; then cp -R packaging/ubuntu/* debian/; fi \
46-
&& dpkg-buildpackage -b -rfakeroot -us -uc
47-
4817
# -------------=== python sdk build ===-------------
4918

5019
FROM ubuntu:bionic as sawtooth-sdk-python-builder
@@ -66,17 +35,14 @@ RUN echo "deb http://repo.sawtooth.me/ubuntu/ci bionic universe" >> /etc/apt/sou
6635
python3-stdeb \
6736
python3-grpcio-tools \
6837
python3-grpcio \
38+
python3-secp256k1 \
6939
python3-toml \
7040
python3-yaml \
7141
python3-zmq
7242

73-
COPY --from=sawtooth-signing-builder /project/python3-sawtooth-signing*.deb /tmp
74-
7543
COPY . /project
7644

77-
RUN dpkg -i /tmp/python3-sawtooth-*.deb || true \
78-
&& apt-get -f -y install \
79-
&& /project/bin/protogen \
45+
RUN /project/bin/protogen \
8046
&& cd /project \
8147
&& if [ -d "debian" ]; then rm -rf debian; fi \
8248
&& python3 setup.py clean --all \
@@ -91,7 +57,6 @@ FROM ubuntu:bionic
9157
RUN apt-get update \
9258
&& apt-get install gnupg -y
9359

94-
COPY --from=sawtooth-signing-builder /project/python3-sawtooth-signing*.deb /tmp
9560
COPY --from=sawtooth-sdk-python-builder /python3-sawtooth-sdk*.deb /tmp
9661

9762
RUN echo "deb http://repo.sawtooth.me/ubuntu/ci bionic universe" >> /etc/apt/sources.list \

Dockerfile-installed-xenial

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,6 @@
1414

1515
# docker build -f Dockerfile-installed-xenial -t sawtooth-sdk-python .
1616

17-
# -------------=== signing build ===-------------
18-
FROM ubuntu:xenial as sawtooth-signing-builder
19-
20-
ENV VERSION=AUTO_STRICT
21-
22-
RUN echo "deb http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \
23-
&& (apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8AA7AF1F1091A5FD \
24-
|| apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 8AA7AF1F1091A5FD) \
25-
&& apt-get update \
26-
&& apt-get install -y -q --allow-downgrades \
27-
git \
28-
python3 \
29-
python3-protobuf \
30-
python3-secp256k1 \
31-
python3-stdeb \
32-
python3-grpcio-tools \
33-
python3-grpcio
34-
35-
COPY . /project
36-
37-
RUN /project/bin/protogen \
38-
&& cd /project/signing \
39-
&& if [ -d "debian" ]; then rm -rf debian; fi \
40-
&& python3 setup.py clean --all \
41-
&& python3 setup.py --command-packages=stdeb.command debianize \
42-
&& if [ -d "packaging/ubuntu" ]; then cp -R packaging/ubuntu/* debian/; fi \
43-
&& dpkg-buildpackage -b -rfakeroot -us -uc
44-
4517
# -------------=== python sdk build ===-------------
4618

4719
FROM ubuntu:xenial as sawtooth-sdk-python-builder
@@ -60,12 +32,11 @@ RUN echo "deb http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sou
6032
python3-stdeb \
6133
python3-grpcio-tools \
6234
python3-grpcio \
35+
python3-secp256k1 \
6336
python3-toml \
6437
python3-yaml \
6538
python3-zmq
6639

67-
COPY --from=sawtooth-signing-builder /project/python3-sawtooth-signing*.deb /tmp
68-
6940
COPY . /project
7041

7142
RUN dpkg -i /tmp/python3-sawtooth-*.deb || true \
@@ -82,7 +53,6 @@ RUN dpkg -i /tmp/python3-sawtooth-*.deb || true \
8253
# -------------=== python sdk docker build ===-------------
8354
FROM ubuntu:xenial
8455

85-
COPY --from=sawtooth-signing-builder /project/python3-sawtooth-signing*.deb /tmp
8656
COPY --from=sawtooth-sdk-python-builder /python3-sawtooth-sdk*.deb /tmp
8757

8858
RUN echo "deb http://repo.sawtooth.me/ubuntu/ci xenial universe" >> /etc/apt/sources.list \

bin/run_bandit

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ top_dir=$(cd $(dirname $(dirname $0)) && pwd)
2020
directories="
2121
build
2222
sawtooth_processor_test
23-
signing/build
24-
signing/tests
2523
tests
2624
"
2725

bin/run_lint

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,15 @@ retval=0
159159
# errors. It would be nice if there was a more convenient way of
160160
# organizing these.
161161

162-
# signing
163-
PYTHONPATH=$top_dir/signing
162+
# sawtooth_signing
163+
PYTHONPATH=$top_dir
164164
export PYTHONPATH
165-
lint signing "$SINCE" || retval=1
165+
lint sawtooth_signing "$SINCE" || retval=1
166166

167167
# sdk, xo, intkey
168168
PYTHONPATH=$top_dir/
169169
PYTHONPATH=$PYTHONPATH:$top_dir/examples/intkey_python
170170
PYTHONPATH=$PYTHONPATH:$top_dir/examples/xo_python
171-
PYTHONPATH=$PYTHONPATH:$top_dir/signing
172171
export PYTHONPATH
173172
lint sawtooth_processor_test "$SINCE" || retval=1
174173
lint sawtooth_sdk "$SINCE" || retval=1

bin/run_tests

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ main() {
128128
}
129129

130130
test_signing() {
131-
run_docker_test ./signing/tests/unit_signing.yaml
131+
run_docker_test ./tests/unit_signing.yaml
132132
copy_coverage .coverage.signing
133133
}
134134

docker-compose-installed.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,6 @@ services:
5555
image: sawtooth-sdk-python:${ISOLATION_ID}
5656
container_name: sawtooth-sdk-python-default
5757

58-
signing:
59-
build:
60-
context: .
61-
dockerfile: signing/Dockerfile-installed-${DISTRO}
62-
args:
63-
- http_proxy
64-
- https_proxy
65-
- no_proxy
66-
image: sawtooth-signing:${ISOLATION_ID}
67-
container_name: sawtooth-signing-default
68-
6958
intkey-tests:
7059
build:
7160
context: .

docker/compose/copy-debs.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,6 @@ services:
4343
cp /tmp/*.deb /build/debs
4444
"
4545
46-
signing:
47-
image: sawtooth-signing:${ISOLATION_ID}
48-
volumes:
49-
- ../../build/debs:/build/debs
50-
command: |
51-
bash -c "
52-
cp /tmp/*.deb /build/debs
53-
"
54-
5546
intkey-tests:
5647
image: sawtooth-intkey-tests:${ISOLATION_ID}
5748
volumes:

docker/compose/sawtooth-build.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,6 @@ version: '3.6'
1616

1717
services:
1818

19-
signing:
20-
build:
21-
context: ../../
22-
dockerfile: ./signing/Dockerfile
23-
args:
24-
- http_proxy
25-
- https_proxy
26-
- no_proxy
27-
image: sawtooth-signing-local:${ISOLATION_ID}
28-
volumes:
29-
- ../../:/project/sawtooth-sdk-python
30-
3119
python-sdk:
3220
build:
3321
context: ../../

docker/lint

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ RUN apt-get install -y -q \
3737
python3-protobuf \
3838
python3-pyformance \
3939
python3-requests \
40-
python3-sawtooth-signing \
4140
python3-secp256k1 \
4241
python3-toml \
4342
python3-yaml \

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ PYTHONAPIDOC := $(SPHINXAPIDOC) -f -o $(PYTHONSDKDIR)
6767
python:
6868
mkdir -p $(PYTHONSDKDIR)
6969
$(PYTHONAPIDOC) ../sawtooth_sdk/processor
70-
$(PYTHONAPIDOC) ../signing/sawtooth_signing
70+
$(PYTHONAPIDOC) ../sawtooth_signing
7171
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(HTMLDIR)
7272

7373
RUSTSDKDIR := $(HTMLDIR)/rust_sdk

examples/xo_python/Dockerfile-installed-bionic

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ RUN echo "deb http://repo.sawtooth.me/ubuntu/ci bionic universe" >> /etc/apt/sou
6666
python3-stdeb \
6767
python3-grpcio-tools \
6868
python3-grpcio \
69+
python3-secp256k1 \
6970
python3-toml \
7071
python3-yaml
7172

File renamed without changes.
File renamed without changes.
File renamed without changes.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
data_files=data_files,
4949
install_requires=[
5050
"colorlog",
51-
"sawtooth-signing",
5251
"protobuf",
5352
"pyzmq",
53+
"secp256k1",
5454
"toml",
5555
"PyYAML",
5656
])

signing/Dockerfile

Lines changed: 0 additions & 50 deletions
This file was deleted.

signing/Dockerfile-installed-bionic

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)