summaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorJeffrey C. Lerman <Jeffrey.Lerman@gmail.com>2023-01-17 13:33:44 -0800
committerGitHub <noreply@github.com>2023-01-17 22:33:44 +0100
commitbfcc54bbb98a1298d5ca55f781e315cd785b225a (patch)
tree424bd5ec39aa26263c9016224a4cac4a83eb14de /devtools
parent9b778b39a7759a9c94d5437e1d5f02196bdc9c51 (diff)
downloadrdflib-bfcc54bbb98a1298d5ca55f781e315cd785b225a.tar.gz
build: move to poetry for dependency management; consolidate more settings into pyproject.toml (#2187)
Replaced setuptools with poetry which provides simpler dependency management, dependency locking and virtual environment management. This makes it easier for new developers to get a sane development environment (i.e. just `poetry install`) and also makes our CI pipeline more reproducable as now most development tools and libraries will only change through dependabot which will reduce the build failures on main and make breaking changes in dependencies more visible with dependabot PRs. Other changes: - moved isort, mypy and coverage config from setup.cfg to pyproject.toml - Changes in the generated rdflib wheel: - removed wheel extras related to development (i.e. `tests`, `docs`, `dev`) as poetry dependency groups should be used instead. - Added an extra group `lxml` with a dependency on lxml. - Added version ranges to dependencies, and tests to ensure these version ranges are valid. - Changes to tests: - Change pyparsing related tests so they work with older pyparsing. - Made the html5lib related tests conditional on html5lib existing. - Runtime changes: - Use importlib.metadata to set `__version__`. - Changed the devcontainer and related config to avoid contamination and interference with the host environment. Co-authored-by: Iwan Aucamp <aucampia@gmail.com> Co-authored-by: Edmond Chuc <edmond.chuc@outlook.com>
Diffstat (limited to 'devtools')
-rw-r--r--devtools/README.md3
-rw-r--r--devtools/constraints-min.txt9
-rw-r--r--devtools/requirements-poetry.in3
-rw-r--r--devtools/requirements-rtd.txt5
4 files changed, 20 insertions, 0 deletions
diff --git a/devtools/README.md b/devtools/README.md
new file mode 100644
index 00000000..ff85d11d
--- /dev/null
+++ b/devtools/README.md
@@ -0,0 +1,3 @@
+# devtools
+
+This directory contains development related scripts and files.
diff --git a/devtools/constraints-min.txt b/devtools/constraints-min.txt
new file mode 100644
index 00000000..7779da3f
--- /dev/null
+++ b/devtools/constraints-min.txt
@@ -0,0 +1,9 @@
+# This file selects minimum versions to ensure that the test suite passes on
+# these versions.
+isodate==0.6.0
+pyparsing==2.1.0
+importlib-metadata==4.0.0
+berkeleydb==18.1.2
+networkx==2.0
+html5lib==1.0.1
+lxml==4.3.0
diff --git a/devtools/requirements-poetry.in b/devtools/requirements-poetry.in
new file mode 100644
index 00000000..6381ff80
--- /dev/null
+++ b/devtools/requirements-poetry.in
@@ -0,0 +1,3 @@
+# Fixing this here as readthedocs can't use the compiled requirements-poetry.txt
+# due to conflicts.
+poetry==1.3.2
diff --git a/devtools/requirements-rtd.txt b/devtools/requirements-rtd.txt
new file mode 100644
index 00000000..32af55fb
--- /dev/null
+++ b/devtools/requirements-rtd.txt
@@ -0,0 +1,5 @@
+# This file contains requirements that get patched into readthedocs so that we
+# can build with a more up to date Sphinx than is in `poetry.lock`. This file
+# should be eliminated once we can get a more up-to-date version of sphinx in
+# poetry.lock. It is kept here so that dependabot can update it.
+Sphinx==5.3.0