fix: include docs and examples in the sdist tarball (#2289) · RDFLib/rdflib@394fb50 (original) (raw)

2 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -218,6 +218,8 @@ tasks:
218 218 - task: venv:clean
219 219 - task: _rimraf
220 220 vars: { RIMRAF_TARGET: ".var/devcontainer" }
221 + - task: _rimraf
222 +vars: { RIMRAF_TARGET: "var/test-sdist" }
221 223
222 224 test:data:fetch:
223 225 desc: Fetch test data.
@@ -342,6 +344,21 @@ tasks:
342 344 > "${plantuml_file%.*}.svg"
343 345 done
344 346
347 + test:sdist:
348 +desc: Run tests on the sdist artifact
349 +cmds:
350 + - task: _rimraf
351 +vars: { RIMRAF_TARGET: "dist" }
352 + - task: _rimraf
353 +vars: { RIMRAF_TARGET: "var/test-sdist" }
354 + - poetry build
355 + - python -c 'import tarfile, glob; tarfile.open(glob.glob("dist/*.tar.gz")[0]).extractall("var/test-sdist")'
356 + - |
357 + cd var/test-sdist/rdflib-*
358 + poetry install
359 + poetry run mypy --show-error-context --show-error-codes -p rdflib
360 + poetry run sphinx-build -T -W -b html -d docs/_build/doctree docs docs/_build/html
361 + poetry run pytest
345 362 _rimraf:
346 363 # This task is a utility task for recursively removing directories, it is
347 364 # similar to rm -rf but not identical and it should work wherever there is
Original file line number Diff line number Diff line change
@@ -27,6 +27,8 @@ packages = [
27 27 ]
28 28 include = [
29 29 { path = "test", format = "sdist" },
30 + { path = "docs", format = "sdist" },
31 + { path = "examples", format = "sdist" },
30 32 ]
31 33
32 34 [tool.poetry.scripts]