|
1 | | -"""Development related tasks to be run with 'invoke'. |
2 | | -
|
3 | | -Make sure you satisfy the following Python module requirements if you are trying to publish a release to PyPI: |
4 | | - - twine >= 1.11.0 |
5 | | - - wheel >= 0.31.0 |
6 | | - - setuptools >= 39.1.0 |
7 | | -""" |
| 1 | +"""Development related tasks to be run with 'invoke'.""" |
8 | 2 |
|
9 | 3 | import contextlib |
10 | 4 | import os |
@@ -279,43 +273,3 @@ def validatetag(context: Context) -> None: |
279 | 273 |
|
280 | 274 |
|
281 | 275 | namespace.add_task(validatetag) |
282 | | - |
283 | | - |
284 | | -@invoke.task(pre=[clean_all]) |
285 | | -def sdist(context: Context) -> None: |
286 | | - """Create a source distribution.""" |
287 | | - with context.cd(TASK_ROOT_STR): |
288 | | - context.run('python -m build --sdist') |
289 | | - |
290 | | - |
291 | | -namespace.add_task(sdist) |
292 | | - |
293 | | - |
294 | | -@invoke.task(pre=[clean_all]) |
295 | | -def wheel(context: Context) -> None: |
296 | | - """Build a wheel distribution.""" |
297 | | - with context.cd(TASK_ROOT_STR): |
298 | | - context.run('python -m build --wheel') |
299 | | - |
300 | | - |
301 | | -namespace.add_task(wheel) |
302 | | - |
303 | | - |
304 | | -@invoke.task(pre=[validatetag, sdist, wheel]) |
305 | | -def pypi(context: Context) -> None: |
306 | | - """Build and upload a distribution to pypi.""" |
307 | | - with context.cd(TASK_ROOT_STR): |
308 | | - context.run('twine upload dist/*') |
309 | | - |
310 | | - |
311 | | -namespace.add_task(pypi) |
312 | | - |
313 | | - |
314 | | -@invoke.task(pre=[validatetag, sdist, wheel]) |
315 | | -def pypi_test(context: Context) -> None: |
316 | | - """Build and upload a distribution to https://test.pypi.org.""" |
317 | | - with context.cd(TASK_ROOT_STR): |
318 | | - context.run('twine upload --repository testpypi dist/*') |
319 | | - |
320 | | - |
321 | | -namespace.add_task(pypi_test) |
0 commit comments