Merge ~woutervb/snapstore-client:move_to_pip-compile into snapstore-client:master

Proposed by Wouter van Bommel
Status: Merged
Approved by: Wouter van Bommel
Approved revision: 2e29ed3d829b358e400a7b4f3709b72ab3934e08
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~woutervb/snapstore-client:move_to_pip-compile
Merge into: snapstore-client:master
Prerequisite: ~woutervb/snapstore-client:move_to_pytest
Diff against target: 211 lines (+155/-11)
6 files modified
Makefile (+3/-0)
Makefile.pipcompile (+24/-0)
requirements-dev.in (+7/-0)
requirements-dev.txt (+91/-7)
requirements.in (+4/-0)
requirements.txt (+26/-4)
Reviewer Review Type Date Requested Status
Maximiliano Bertacchini Approve
Review via email: mp+414785@code.launchpad.net

Commit message

Make the dependency management the same as for other projects

By pinning the python versions, we can create reproducible builds

To post a comment you must log in.
Revision history for this message
Maximiliano Bertacchini (maxiberta) wrote :

LGTM

review: Approve
Revision history for this message
Otto Co-Pilot (otto-copilot) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/Makefile b/Makefile
2index be1be80..1282e78 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -31,6 +31,7 @@ test: $(ENV)/dev
6 $(PYTHON3) -m pytest
7 $(MAKE) --silent lint
8
9+
10 /snap/bin/documentation-builder:
11 sudo snap install documentation-builder
12
13@@ -62,3 +63,5 @@ clean:
14
15
16 .PHONY: bootstrap test lint coverage clean snap docs
17+
18+include Makefile.pipcompile
19diff --git a/Makefile.pipcompile b/Makefile.pipcompile
20new file mode 100644
21index 0000000..9b58406
22--- /dev/null
23+++ b/Makefile.pipcompile
24@@ -0,0 +1,24 @@
25+PIP_COMPILE = $(PYTHON3) -m piptools compile
26+REQUIREMENT_FILES ?= requirements.txt requirements-dev.txt
27+
28+ifdef USE_PYPI
29+PIP_OPTIONS := -f $(OLS_WHEELS_DIR)
30+else
31+PIP_OPTIONS := -f $(OLS_WHEELS_DIR) --no-index
32+endif
33+
34+# Define a dependency between the requirement files to handle concurrent make runs (make -j)
35+requirements-dev.txt: requirements.txt
36+
37+$(ENV)/bin/pip-compile: $(ENV)
38+ $(PIP) $(PIP_QUIET) install --find-links=$(OLS_WHEELS_DIR) --no-index pip-tools
39+
40+%.txt: %.in $(OLS_WHEELS_DIR) $(ENV)/bin/pip-compile
41+ $(PIP_COMPILE) --quiet --upgrade --rebuild --no-header --allow-unsafe --no-emit-find-links --pip-args '$(PIP_OPTIONS)' $<
42+
43+update-pinned-requirements:
44+ -@rm $(REQUIREMENT_FILES)
45+ $(MAKE) $(REQUIREMENT_FILES)
46+
47+test_dependencies:
48+ test -z $(NO_CHECK_DEPENDENCIES) && $(PYTHON3) -m piptools sync -n $(REQUIREMENT_FILES) || exit 0
49diff --git a/requirements-dev.in b/requirements-dev.in
50new file mode 100644
51index 0000000..d9285a2
52--- /dev/null
53+++ b/requirements-dev.in
54@@ -0,0 +1,7 @@
55+acceptable>=0.9
56+coverage
57+flake8
58+responses
59+black
60+pytest
61+testtools
62\ No newline at end of file
63diff --git a/requirements-dev.txt b/requirements-dev.txt
64index d9285a2..5bc8aa6 100644
65--- a/requirements-dev.txt
66+++ b/requirements-dev.txt
67@@ -1,7 +1,91 @@
68-acceptable>=0.9
69-coverage
70-flake8
71-responses
72-black
73-pytest
74-testtools
75\ No newline at end of file
76+acceptable==0.31
77+ # via -r requirements-dev.in
78+attrs==21.2.0
79+ # via
80+ # jsonschema
81+ # pytest
82+black==21.9b0
83+ # via -r requirements-dev.in
84+certifi==2021.10.8
85+ # via requests
86+charset-normalizer==2.0.7
87+ # via requests
88+click==8.0.3
89+ # via black
90+coverage==6.0.2
91+ # via -r requirements-dev.in
92+extras==1.0.0
93+ # via testtools
94+fixtures==3.0.0
95+ # via testtools
96+flake8==4.0.1
97+ # via -r requirements-dev.in
98+idna==3.3
99+ # via requests
100+iniconfig==1.1.1
101+ # via pytest
102+jinja2==3.0.2
103+ # via acceptable
104+jsonschema==3.2.0
105+ # via acceptable
106+markupsafe==2.0.1
107+ # via jinja2
108+mccabe==0.6.1
109+ # via flake8
110+mypy-extensions==0.4.3
111+ # via black
112+packaging==21.0
113+ # via pytest
114+pathspec==0.9.0
115+ # via black
116+pbr==5.6.0
117+ # via
118+ # fixtures
119+ # testtools
120+platformdirs==2.4.0
121+ # via black
122+pluggy==0.13.1
123+ # via pytest
124+py==1.10.0
125+ # via pytest
126+pycodestyle==2.8.0
127+ # via flake8
128+pyflakes==2.4.0
129+ # via flake8
130+pyparsing==2.4.7
131+ # via packaging
132+pyrsistent==0.18.0
133+ # via jsonschema
134+pytest==6.2.4
135+ # via -r requirements-dev.in
136+pyyaml==6.0
137+ # via acceptable
138+regex==2021.10.8
139+ # via black
140+requests==2.26.0
141+ # via responses
142+responses==0.14.0
143+ # via -r requirements-dev.in
144+six==1.16.0
145+ # via
146+ # fixtures
147+ # jsonschema
148+ # responses
149+testtools==2.5.0
150+ # via
151+ # -r requirements-dev.in
152+ # fixtures
153+toml==0.10.2
154+ # via pytest
155+tomli==1.2.1
156+ # via black
157+typing-extensions==3.10.0.2
158+ # via black
159+urllib3==1.26.7
160+ # via
161+ # requests
162+ # responses
163+
164+# The following packages are considered to be unsafe in a requirements file:
165+setuptools==58.3.0
166+ # via jsonschema
167diff --git a/requirements.in b/requirements.in
168new file mode 100644
169index 0000000..09ae15a
170--- /dev/null
171+++ b/requirements.in
172@@ -0,0 +1,4 @@
173+pymacaroons
174+pysha3
175+pyxdg
176+requests
177diff --git a/requirements.txt b/requirements.txt
178index 09ae15a..d97ccc2 100644
179--- a/requirements.txt
180+++ b/requirements.txt
181@@ -1,4 +1,26 @@
182-pymacaroons
183-pysha3
184-pyxdg
185-requests
186+certifi==2021.10.8
187+ # via requests
188+cffi==1.15.0
189+ # via pynacl
190+charset-normalizer==2.0.7
191+ # via requests
192+idna==3.3
193+ # via requests
194+pycparser==2.20
195+ # via cffi
196+pymacaroons==0.13.0
197+ # via -r requirements.in
198+pynacl==1.4.0
199+ # via pymacaroons
200+pysha3==1.0.2
201+ # via -r requirements.in
202+pyxdg==0.26
203+ # via -r requirements.in
204+requests==2.26.0
205+ # via -r requirements.in
206+six==1.16.0
207+ # via
208+ # pymacaroons
209+ # pynacl
210+urllib3==1.26.7
211+ # via requests

Subscribers

People subscribed via source and target branches

to all changes: