Skip to content

Commit a8d4bf9

Browse files
Upgrade to Pants 2.19.0 (#133)
Closes #131 and #132. Upgrade Pants to 2.19, but also fix the export command as specified in #132 and add documentation for lockfile generation as specified in #131.
1 parent 26d55f2 commit a8d4bf9

File tree

3 files changed

+43
-41
lines changed

3 files changed

+43
-41
lines changed

README.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ An example repository to demonstrate Python support in Pants.
33

44
See [pantsbuild.org](https://www.pantsbuild.org/docs) for much more detailed documentation.
55

6-
This is only one possible way of laying out your project with Pants. See
6+
This is only one possible way of laying out your project with Pants. See
77
[pantsbuild.org/docs/source-roots#examples](https://www.pantsbuild.org/docs/source-roots#examples) for some other
88
example layouts.
99

@@ -31,8 +31,8 @@ pants help goals
3131

3232
# Targets
3333

34-
Targets are a way of setting metadata for some part of your code, such as timeouts for tests and
35-
entry points for binaries. Targets have types like `python_source`, `resources`, and
34+
Targets are a way of setting metadata for some part of your code, such as timeouts for tests and
35+
entry points for binaries. Targets have types like `python_source`, `resources`, and
3636
`pex_binary`. They are defined in `BUILD` files.
3737

3838
Pants goals can be invoked on targets or directly on source files (which is often more intuitive and convenient).
@@ -169,8 +169,16 @@ pants package helloworld/translator:dist
169169
```
170170
pants count-loc '**/*'
171171
```
172+
173+
## Generate or update a lockfile containing the dependencies
174+
175+
```
176+
pants generate-lockfiles --resolve=python-default
177+
```
178+
179+
172180
## Create virtualenv for IDE integration
173181

174182
```
175-
pants export ::
183+
pants export --resolve=python-default
176184
```

pants.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).
33

44
[GLOBAL]
5-
pants_version = "2.18.0"
5+
pants_version = "2.19.0"
66
backend_packages.add = [
77
"pants.backend.build_files.fmt.black",
88
"pants.backend.python",

python-default.lock

+30-36
Original file line numberDiff line numberDiff line change
@@ -52,47 +52,42 @@
5252
"artifacts": [
5353
{
5454
"algorithm": "sha256",
55-
"hash": "29e95c7f6778868dbd49170f98f8818f78f3dc5e0e37c0b1f474e3561b240836",
56-
"url": "https://files.pythonhosted.org/packages/fb/6e/6f83bf616d2becdf333a1640f1d463fef3150e2e926b7010cb0f81c95e88/attrs-22.2.0-py3-none-any.whl"
55+
"hash": "99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1",
56+
"url": "https://files.pythonhosted.org/packages/e0/44/827b2a91a5816512fcaf3cc4ebc465ccd5d598c45cefa6703fcf4a79018f/attrs-23.2.0-py3-none-any.whl"
5757
},
5858
{
5959
"algorithm": "sha256",
60-
"hash": "c9227bfc2f01993c03f68db37d1d15c9690188323c067c641f1a35ca58185f99",
61-
"url": "https://files.pythonhosted.org/packages/21/31/3f468da74c7de4fcf9b25591e682856389b3400b4b62f201e65f15ea3e07/attrs-22.2.0.tar.gz"
60+
"hash": "935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30",
61+
"url": "https://files.pythonhosted.org/packages/e3/fc/f800d51204003fa8ae392c4e8278f256206e7a919b708eef054f5f4b650d/attrs-23.2.0.tar.gz"
6262
}
6363
],
6464
"project_name": "attrs",
6565
"requires_dists": [
66-
"attrs[docs,tests]; extra == \"dev\"",
66+
"attrs[tests-mypy]; extra == \"tests-no-zope\"",
6767
"attrs[tests-no-zope]; extra == \"tests\"",
6868
"attrs[tests]; extra == \"cov\"",
69+
"attrs[tests]; extra == \"dev\"",
6970
"cloudpickle; platform_python_implementation == \"CPython\" and extra == \"tests-no-zope\"",
70-
"cloudpickle; platform_python_implementation == \"CPython\" and extra == \"tests_no_zope\"",
71-
"coverage-enable-subprocess; extra == \"cov\"",
7271
"coverage[toml]>=5.3; extra == \"cov\"",
7372
"furo; extra == \"docs\"",
7473
"hypothesis; extra == \"tests-no-zope\"",
75-
"hypothesis; extra == \"tests_no_zope\"",
76-
"mypy<0.990,>=0.971; platform_python_implementation == \"CPython\" and extra == \"tests-no-zope\"",
77-
"mypy<0.990,>=0.971; platform_python_implementation == \"CPython\" and extra == \"tests_no_zope\"",
74+
"importlib-metadata; python_version < \"3.8\"",
75+
"mypy>=1.6; (platform_python_implementation == \"CPython\" and python_version >= \"3.8\") and extra == \"tests-mypy\"",
7876
"myst-parser; extra == \"docs\"",
77+
"pre-commit; extra == \"dev\"",
7978
"pympler; extra == \"tests-no-zope\"",
80-
"pympler; extra == \"tests_no_zope\"",
81-
"pytest-mypy-plugins; (platform_python_implementation == \"CPython\" and python_version < \"3.11\") and extra == \"tests-no-zope\"",
82-
"pytest-mypy-plugins; (platform_python_implementation == \"CPython\" and python_version < \"3.11\") and extra == \"tests_no_zope\"",
79+
"pytest-mypy-plugins; (platform_python_implementation == \"CPython\" and python_version >= \"3.8\") and extra == \"tests-mypy\"",
8380
"pytest-xdist[psutil]; extra == \"tests-no-zope\"",
84-
"pytest-xdist[psutil]; extra == \"tests_no_zope\"",
8581
"pytest>=4.3.0; extra == \"tests-no-zope\"",
86-
"pytest>=4.3.0; extra == \"tests_no_zope\"",
8782
"sphinx-notfound-page; extra == \"docs\"",
8883
"sphinx; extra == \"docs\"",
8984
"sphinxcontrib-towncrier; extra == \"docs\"",
9085
"towncrier; extra == \"docs\"",
91-
"zope.interface; extra == \"docs\"",
92-
"zope.interface; extra == \"tests\""
86+
"zope-interface; extra == \"docs\"",
87+
"zope-interface; extra == \"tests\""
9388
],
94-
"requires_python": ">=3.6",
95-
"version": "22.2"
89+
"requires_python": ">=3.7",
90+
"version": "23.2.0"
9691
},
9792
{
9893
"artifacts": [
@@ -110,49 +105,48 @@
110105
"project_name": "iniconfig",
111106
"requires_dists": [],
112107
"requires_python": ">=3.7",
113-
"version": "2"
108+
"version": "2.0.0"
114109
},
115110
{
116111
"artifacts": [
117112
{
118113
"algorithm": "sha256",
119-
"hash": "714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2",
120-
"url": "https://files.pythonhosted.org/packages/ed/35/a31aed2993e398f6b09a790a181a7927eb14610ee8bbf02dc14d31677f1c/packaging-23.0-py3-none-any.whl"
114+
"hash": "8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7",
115+
"url": "https://files.pythonhosted.org/packages/ec/1a/610693ac4ee14fcdf2d9bf3c493370e4f2ef7ae2e19217d7a237ff42367d/packaging-23.2-py3-none-any.whl"
121116
},
122117
{
123118
"algorithm": "sha256",
124-
"hash": "b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97",
125-
"url": "https://files.pythonhosted.org/packages/47/d5/aca8ff6f49aa5565df1c826e7bf5e85a6df852ee063600c1efa5b932968c/packaging-23.0.tar.gz"
119+
"hash": "048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5",
120+
"url": "https://files.pythonhosted.org/packages/fb/2b/9b9c33ffed44ee921d0967086d653047286054117d584f1b1a7c22ceaf7b/packaging-23.2.tar.gz"
126121
}
127122
],
128123
"project_name": "packaging",
129124
"requires_dists": [],
130125
"requires_python": ">=3.7",
131-
"version": "23"
126+
"version": "23.2"
132127
},
133128
{
134129
"artifacts": [
135130
{
136131
"algorithm": "sha256",
137-
"hash": "74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3",
138-
"url": "https://files.pythonhosted.org/packages/9e/01/f38e2ff29715251cf25532b9082a1589ab7e4f571ced434f98d0139336dc/pluggy-1.0.0-py2.py3-none-any.whl"
132+
"hash": "7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981",
133+
"url": "https://files.pythonhosted.org/packages/a5/5b/0cc789b59e8cc1bf288b38111d002d8c5917123194d45b29dcdac64723cc/pluggy-1.4.0-py3-none-any.whl"
139134
},
140135
{
141136
"algorithm": "sha256",
142-
"hash": "4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159",
143-
"url": "https://files.pythonhosted.org/packages/a1/16/db2d7de3474b6e37cbb9c008965ee63835bba517e22cdb8c35b5116b5ce1/pluggy-1.0.0.tar.gz"
137+
"hash": "8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be",
138+
"url": "https://files.pythonhosted.org/packages/54/c6/43f9d44d92aed815e781ca25ba8c174257e27253a94630d21be8725a2b59/pluggy-1.4.0.tar.gz"
144139
}
145140
],
146141
"project_name": "pluggy",
147142
"requires_dists": [
148-
"importlib-metadata>=0.12; python_version < \"3.8\"",
149143
"pre-commit; extra == \"dev\"",
150144
"pytest-benchmark; extra == \"testing\"",
151145
"pytest; extra == \"testing\"",
152146
"tox; extra == \"dev\""
153147
],
154-
"requires_python": ">=3.6",
155-
"version": "1"
148+
"requires_python": ">=3.8",
149+
"version": "1.4.0"
156150
},
157151
{
158152
"artifacts": [
@@ -170,7 +164,7 @@
170164
"project_name": "py",
171165
"requires_dists": [],
172166
"requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7",
173-
"version": "1.11"
167+
"version": "1.11.0"
174168
},
175169
{
176170
"artifacts": [
@@ -248,7 +242,7 @@
248242
"wincertstore==0.2; sys_platform == \"win32\" and extra == \"ssl\""
249243
],
250244
"requires_python": ">=3.6",
251-
"version": "56.2"
245+
"version": "56.2.0"
252246
},
253247
{
254248
"artifacts": [
@@ -291,8 +285,8 @@
291285
}
292286
],
293287
"path_mappings": {},
294-
"pex_version": "2.1.108",
295-
"pip_version": "20.3.4-patched",
288+
"pex_version": "2.1.148",
289+
"pip_version": "23.1.2",
296290
"prefer_older_binary": false,
297291
"requirements": [
298292
"ansicolors==1.1.8",

0 commit comments

Comments
 (0)