From fab9f3938f81344061fda94f651f5cb5691b00b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89loi=20Rivard?= Date: Sun, 12 Mar 2023 00:13:09 +0100 Subject: [PATCH] demo and dependencies cleanups --- demo/Dockerfile-canaille | 2 +- demo/Procfile | 2 +- demo/README.md | 9 +-- demo/run.sh | 60 +++++++------------ demo/slapd.sh | 12 ---- poetry.lock | 123 +++++++++++++++++++-------------------- pyproject.toml | 39 ++++++++----- 7 files changed, 110 insertions(+), 137 deletions(-) delete mode 100755 demo/slapd.sh diff --git a/demo/Dockerfile-canaille b/demo/Dockerfile-canaille index 1697679e..35204ee0 100644 --- a/demo/Dockerfile-canaille +++ b/demo/Dockerfile-canaille @@ -12,6 +12,6 @@ RUN \ COPY poetry.lock pyproject.toml /opt/canaille/ RUN pip install poetry WORKDIR /opt/canaille -RUN poetry install +RUN poetry install --only demo ENTRYPOINT ["poetry", "run", "flask", "run", "--host=0.0.0.0"] diff --git a/demo/Procfile b/demo/Procfile index 118e07fb..55d04947 100644 --- a/demo/Procfile +++ b/demo/Procfile @@ -1,4 +1,4 @@ -slapd: ./slapd.sh +slapd: env BIN=$BIN:/usr/bin:/usr/sbin python ldap-server.py canaille: env FLASK_DEBUG=1 AUTHLIB_INSECURE_TRANSPORT=1 CONFIG=conf/canaille.toml FLASK_APP=../../canaille flask run --extra-files conf/canaille.toml client1: env FLASK_DEBUG=1 CONFIG=../conf/client1.cfg FLASK_APP=client flask run --port=5001 client2: env FLASK_DEBUG=1 CONFIG=../conf/client2.cfg FLASK_APP=client flask run --port=5002 diff --git a/demo/README.md b/demo/README.md index 8c4b90c2..904b5ceb 100644 --- a/demo/README.md +++ b/demo/README.md @@ -8,13 +8,10 @@ To check out how canaille looks like, or to start contributions, just run the de You need to have `OpenLDAP` somewhere in your system. -You can either: -- install it with your distro packages *(for instance `sudo apt install slapd ldap-utils` with Ubuntu)*. - it is not required to launch the system ldap service. -- have `docker` plus `docker-compose` installed on your system, the `./run.sh` script will download and - run an OpenLDAP image. +You need to install it with your distro packages *(for instance `sudo apt install slapd +ldap-utils` with Ubuntu)*. It is not required to launch the system ldap service. -canaille depends on [python-ldap](https://github.com/python-ldap/python-ldap), and this package needs +Canaille depends on [python-ldap](https://github.com/python-ldap/python-ldap), and this package needs some headers to be installed on your system to be built. For instance on Ubuntu you can install this: `sudo apt install libsasl2-dev python-dev libldap2-dev libssl-dev`. More info [on this SO ticket](https://stackoverflow.com/questions/4768446/i-cant-install-python-ldap). diff --git a/demo/run.sh b/demo/run.sh index f813dc3f..73ec4b21 100755 --- a/demo/run.sh +++ b/demo/run.sh @@ -1,44 +1,24 @@ #!/bin/bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -function usage { - echo "Usage: ./run.sh [--usage|--ldap-native|--ldap-docker]" - echo " --usage Prints this message" - echo " --ldap-native Use the system slapd binary" - echo " --ldap-docker Use ldap from a docker image" - echo - echo "If neither --ldap-native nor --ldap-docker is specified, native will be tried," - echo "then docker". -} - -function run { - if ! type python > /dev/null 2>&1 && ! type python3 > /dev/null 2>&1; then - echo "Cannot start the LDAP server. Please install python on your system." - return 1 - fi - - if ! type poetry > /dev/null 2>&1; then - echo "Cannot start the LDAP server. Please install poetry on your system." - echo "https://python-poetry.org/docs/#installation" - return 1 - fi - - poetry install - poetry run pip install honcho requests slapd - - if [ "$1" == "--ldap-native" ]; then - env "SLAPD_BINARY=NATIVE" "PWD=$DIR" poetry run honcho start - - elif [ "$1" == "--ldap-docker" ]; then - env "SLAPD_BINARY=DOCKER" "PWD=$DIR" poetry run honcho start - - else - env "PWD=$DIR" poetry run honcho start - fi -} - -if [ "$1" != "" ] && [ "$1" != "--ldap-native" ] && [ "$1" != "--ldap-docker" ]; then - usage -else - run "$@" +if ! type slapd > /dev/null 2>&1; then + echo "Cannot start the LDAP server. Please install OpenLDAP on your system" + echo "or run the demo with docker-compose." + return 1 fi + +if ! type python > /dev/null 2>&1 && ! type python3 > /dev/null 2>&1; then + echo "Cannot start the LDAP server. Please install python on your system" + echo "or run the demo with docker-compose." + return 1 +fi + +if ! type poetry > /dev/null 2>&1; then + echo "Cannot start the LDAP server. Please install poetry on your system" + echo "or run the demo with docker-compose." + echo "https://python-poetry.org/docs/#installation" + return 1 +fi + +poetry install --with demo --without dev +env "PWD=$DIR" poetry run honcho start diff --git a/demo/slapd.sh b/demo/slapd.sh deleted file mode 100755 index ee65fd4f..00000000 --- a/demo/slapd.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -if [ "$SLAPD_BINARY" == "NATIVE" ] || ([ "$SLAPD_BINARY" == "" ] && type slapd > /dev/null 2>&1); then - env BIN=$BIN:/usr/bin:/usr/sbin python ldap-server.py - -elif [ "$SLAPD_BINARY" == "DOCKER" ] || ([ "$SLAPD_BINARY" == "" ] && type docker-compose > /dev/null 2>&1); then - docker-compose run --service-ports --rm ldap - -else - echo "Cannot start the LDAP server. Please install openldap or docker on your system." - exit 1 -fi diff --git a/poetry.lock b/poetry.lock index ba460dd1..5b3124a1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry and should not be changed by hand. +# This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand. [[package]] name = "aiosmtpd" @@ -21,8 +21,8 @@ typing-extensions = {version = "*", markers = "python_version < \"3.8\""} name = "alabaster" version = "0.7.13" description = "A configurable sidebar-enabled Sphinx theme" -category = "main" -optional = true +category = "dev" +optional = false python-versions = ">=3.6" files = [ {file = "alabaster-0.7.13-py3-none-any.whl", hash = "sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3"}, @@ -126,7 +126,7 @@ name = "certifi" version = "2022.12.7" description = "Python package for providing Mozilla's CA Bundle." category = "main" -optional = true +optional = false python-versions = ">=3.6" files = [ {file = "certifi-2022.12.7-py3-none-any.whl", hash = "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"}, @@ -226,8 +226,8 @@ files = [ name = "charset-normalizer" version = "3.0.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" -optional = true +category = "dev" +optional = false python-versions = "*" files = [ {file = "charset-normalizer-3.0.1.tar.gz", hash = "sha256:ebea339af930f8ca5d7a699b921106c6e29c617fe9606fa7baa043c1cdae326f"}, @@ -436,6 +436,8 @@ files = [ {file = "cryptography-39.0.1-cp36-abi3-win32.whl", hash = "sha256:fe913f20024eb2cb2f323e42a64bdf2911bb9738a15dba7d3cce48151034e3a8"}, {file = "cryptography-39.0.1-cp36-abi3-win_amd64.whl", hash = "sha256:ced4e447ae29ca194449a3f1ce132ded8fcab06971ef5f618605aacaa612beac"}, {file = "cryptography-39.0.1-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:807ce09d4434881ca3a7594733669bd834f5b2c6d5c7e36f8c00f691887042ad"}, + {file = "cryptography-39.0.1-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c5caeb8188c24888c90b5108a441c106f7faa4c4c075a2bcae438c6e8ca73cef"}, + {file = "cryptography-39.0.1-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:4789d1e3e257965e960232345002262ede4d094d1a19f4d3b52e48d4d8f3b885"}, {file = "cryptography-39.0.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:96f1157a7c08b5b189b16b47bc9db2332269d6680a196341bf30046330d15388"}, {file = "cryptography-39.0.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:e422abdec8b5fa8462aa016786680720d78bdce7a30c652b7fadf83a4ba35336"}, {file = "cryptography-39.0.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_24_aarch64.whl", hash = "sha256:b0afd054cd42f3d213bf82c629efb1ee5f22eba35bf0eec88ea9ea7304f511a2"}, @@ -508,8 +510,8 @@ wmi = ["wmi (>=1.5.1,<2.0.0)"] name = "docutils" version = "0.18.1" description = "Docutils -- Python Documentation Utilities" -category = "main" -optional = true +category = "dev" +optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ {file = "docutils-0.18.1-py2.py3-none-any.whl", hash = "sha256:23010f129180089fbcd3bc08cfefccb3b890b0050e1ca00c867036e9d161b98c"}, @@ -646,7 +648,6 @@ python-versions = ">=3.6" files = [ {file = "flask-themer-1.4.3.tar.gz", hash = "sha256:193fb3f9bb5093165fc8c26653085e9ab3b67dc66979bf124f102d7714cbcf0e"}, {file = "flask_themer-1.4.3-py3-none-any.whl", hash = "sha256:f7588c1e8edff22845eeacde3dfde80caadf6a7fdfb9073217648415778dd716"}, - {file = "flask_themer-1.4.3-py3.7.egg", hash = "sha256:ed58389cc5a51675dd28474eaeb80e0b8a3cee201b1430626ba72b6dcd5ed754"}, ] [package.dependencies] @@ -703,6 +704,24 @@ files = [ [package.dependencies] python-dateutil = ">=2.7" +[[package]] +name = "honcho" +version = "1.1.0" +description = "Honcho: a Python clone of Foreman. For managing Procfile-based applications." +category = "dev" +optional = false +python-versions = "*" +files = [ + {file = "honcho-1.1.0-py2.py3-none-any.whl", hash = "sha256:a4d6e3a88a7b51b66351ecfc6e9d79d8f4b87351db9ad7e923f5632cc498122f"}, + {file = "honcho-1.1.0.tar.gz", hash = "sha256:c5eca0bded4bef6697a23aec0422fd4f6508ea3581979a3485fc4b89357eb2a9"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "sys_platform == \"win32\""} + +[package.extras] +export = ["jinja2 (>=2.7,<3)"] + [[package]] name = "identify" version = "2.5.18" @@ -734,8 +753,8 @@ files = [ name = "imagesize" version = "1.4.1" description = "Getting image size from png/jpeg/jpeg2000/gif file" -category = "main" -optional = true +category = "dev" +optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, @@ -994,7 +1013,7 @@ setuptools = "*" name = "packaging" version = "23.0" description = "Core utilities for Python packages" -category = "main" +category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1089,18 +1108,7 @@ category = "main" optional = false python-versions = "*" files = [ - {file = "pyasn1-0.4.8-py2.4.egg", hash = "sha256:fec3e9d8e36808a28efb59b489e4528c10ad0f480e57dcc32b4de5c9d8c9fdf3"}, - {file = "pyasn1-0.4.8-py2.5.egg", hash = "sha256:0458773cfe65b153891ac249bcf1b5f8f320b7c2ce462151f8fa74de8934becf"}, - {file = "pyasn1-0.4.8-py2.6.egg", hash = "sha256:5c9414dcfede6e441f7e8f81b43b34e834731003427e5b09e4e00e3172a10f00"}, - {file = "pyasn1-0.4.8-py2.7.egg", hash = "sha256:6e7545f1a61025a4e58bb336952c5061697da694db1cae97b116e9c46abcf7c8"}, {file = "pyasn1-0.4.8-py2.py3-none-any.whl", hash = "sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d"}, - {file = "pyasn1-0.4.8-py3.1.egg", hash = "sha256:78fa6da68ed2727915c4767bb386ab32cdba863caa7dbe473eaae45f9959da86"}, - {file = "pyasn1-0.4.8-py3.2.egg", hash = "sha256:08c3c53b75eaa48d71cf8c710312316392ed40899cb34710d092e96745a358b7"}, - {file = "pyasn1-0.4.8-py3.3.egg", hash = "sha256:03840c999ba71680a131cfaee6fab142e1ed9bbd9c693e285cc6aca0d555e576"}, - {file = "pyasn1-0.4.8-py3.4.egg", hash = "sha256:7ab8a544af125fb704feadb008c99a88805126fb525280b2270bb25cc1d78a12"}, - {file = "pyasn1-0.4.8-py3.5.egg", hash = "sha256:e89bf84b5437b532b0803ba5c9a5e054d21fec423a89952a74f87fa2c9b7bce2"}, - {file = "pyasn1-0.4.8-py3.6.egg", hash = "sha256:014c0e9976956a08139dc0712ae195324a75e142284d5f87f1a87ee1b068a359"}, - {file = "pyasn1-0.4.8-py3.7.egg", hash = "sha256:99fcc3c8d804d1bc6d9a099921e39d827026409a58f2a720dcdb89374ea0c776"}, {file = "pyasn1-0.4.8.tar.gz", hash = "sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba"}, ] @@ -1113,18 +1121,7 @@ optional = false python-versions = "*" files = [ {file = "pyasn1-modules-0.2.8.tar.gz", hash = "sha256:905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e"}, - {file = "pyasn1_modules-0.2.8-py2.4.egg", hash = "sha256:0fe1b68d1e486a1ed5473f1302bd991c1611d319bba158e98b106ff86e1d7199"}, - {file = "pyasn1_modules-0.2.8-py2.5.egg", hash = "sha256:fe0644d9ab041506b62782e92b06b8c68cca799e1a9636ec398675459e031405"}, - {file = "pyasn1_modules-0.2.8-py2.6.egg", hash = "sha256:a99324196732f53093a84c4369c996713eb8c89d360a496b599fb1a9c47fc3eb"}, - {file = "pyasn1_modules-0.2.8-py2.7.egg", hash = "sha256:0845a5582f6a02bb3e1bde9ecfc4bfcae6ec3210dd270522fee602365430c3f8"}, {file = "pyasn1_modules-0.2.8-py2.py3-none-any.whl", hash = "sha256:a50b808ffeb97cb3601dd25981f6b016cbb3d31fbf57a8b8a87428e6158d0c74"}, - {file = "pyasn1_modules-0.2.8-py3.1.egg", hash = "sha256:f39edd8c4ecaa4556e989147ebf219227e2cd2e8a43c7e7fcb1f1c18c5fd6a3d"}, - {file = "pyasn1_modules-0.2.8-py3.2.egg", hash = "sha256:b80486a6c77252ea3a3e9b1e360bc9cf28eaac41263d173c032581ad2f20fe45"}, - {file = "pyasn1_modules-0.2.8-py3.3.egg", hash = "sha256:65cebbaffc913f4fe9e4808735c95ea22d7a7775646ab690518c056784bc21b4"}, - {file = "pyasn1_modules-0.2.8-py3.4.egg", hash = "sha256:15b7c67fabc7fc240d87fb9aabf999cf82311a6d6fb2c70d00d3d0604878c811"}, - {file = "pyasn1_modules-0.2.8-py3.5.egg", hash = "sha256:426edb7a5e8879f1ec54a1864f16b882c2837bfd06eee62f2c982315ee2473ed"}, - {file = "pyasn1_modules-0.2.8-py3.6.egg", hash = "sha256:cbac4bc38d117f2a49aeedec4407d23e8866ea4ac27ff2cf7fb3e5b570df19e0"}, - {file = "pyasn1_modules-0.2.8-py3.7.egg", hash = "sha256:c29a5e5cc7a3f05926aff34e097e84f8589cd790ce0ed41b67aed6857b26aafd"}, ] [package.dependencies] @@ -1160,7 +1157,7 @@ files = [ name = "pygments" version = "2.14.0" description = "Pygments is a syntax highlighting package written in Python." -category = "main" +category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1198,8 +1195,6 @@ category = "dev" optional = false python-versions = "*" files = [ - {file = "pyreadline-2.1.win-amd64.exe", hash = "sha256:9ce5fa65b8992dfa373bddc5b6e0864ead8f291c94fbfec05fbd5c836162e67b"}, - {file = "pyreadline-2.1.win32.exe", hash = "sha256:65540c21bfe14405a3a77e4c085ecfce88724743a4ead47c66b84defcf82c32e"}, {file = "pyreadline-2.1.zip", hash = "sha256:4530592fc2e85b25b1a9f79664433da09237c1a270e4d78ea5aa3a2c7229e2d1"}, ] @@ -1414,8 +1409,8 @@ files = [ name = "requests" version = "2.28.2" description = "Python HTTP for Humans." -category = "main" -optional = true +category = "dev" +optional = false python-versions = ">=3.7, <4" files = [ {file = "requests-2.28.2-py3-none-any.whl", hash = "sha256:64299f4909223da747622c030b781c0d7811e359c37124b4bd368fb8c6518baa"}, @@ -1545,8 +1540,8 @@ typing = ["mypy"] name = "snowballstemmer" version = "2.2.0" description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." -category = "main" -optional = true +category = "dev" +optional = false python-versions = "*" files = [ {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, @@ -1569,8 +1564,8 @@ files = [ name = "sphinx" version = "5.3.0" description = "Python documentation generator" -category = "main" -optional = true +category = "dev" +optional = false python-versions = ">=3.6" files = [ {file = "Sphinx-5.3.0.tar.gz", hash = "sha256:51026de0a9ff9fc13c05d74913ad66047e104f56a129ff73e174eb5c3ee794b5"}, @@ -1605,8 +1600,8 @@ test = ["cython", "html5lib", "pytest (>=4.6)", "typed_ast"] name = "sphinx-issues" version = "3.0.1" description = "A Sphinx extension for linking to your project's issue tracker" -category = "main" -optional = true +category = "dev" +optional = false python-versions = ">=3.6" files = [ {file = "sphinx-issues-3.0.1.tar.gz", hash = "sha256:b7c1dc1f4808563c454d11c1112796f8c176cdecfee95f0fd2302ef98e21e3d6"}, @@ -1625,8 +1620,8 @@ tests = ["pytest (>=6.2.0)"] name = "sphinx-rtd-theme" version = "1.2.0" description = "Read the Docs theme for Sphinx" -category = "main" -optional = true +category = "dev" +optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" files = [ {file = "sphinx_rtd_theme-1.2.0-py2.py3-none-any.whl", hash = "sha256:f823f7e71890abe0ac6aaa6013361ea2696fc8d3e1fa798f463e82bdb77eeff2"}, @@ -1645,8 +1640,8 @@ dev = ["bump2version", "sphinxcontrib-httpdomain", "transifex-client", "wheel"] name = "sphinxcontrib-applehelp" version = "1.0.2" description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" -category = "main" -optional = true +category = "dev" +optional = false python-versions = ">=3.5" files = [ {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, @@ -1661,8 +1656,8 @@ test = ["pytest"] name = "sphinxcontrib-devhelp" version = "1.0.2" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." -category = "main" -optional = true +category = "dev" +optional = false python-versions = ">=3.5" files = [ {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, @@ -1677,8 +1672,8 @@ test = ["pytest"] name = "sphinxcontrib-htmlhelp" version = "2.0.0" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" -category = "main" -optional = true +category = "dev" +optional = false python-versions = ">=3.6" files = [ {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, @@ -1693,8 +1688,8 @@ test = ["html5lib", "pytest"] name = "sphinxcontrib-jquery" version = "2.0.0" description = "Extension to include jQuery on newer Sphinx releases" -category = "main" -optional = true +category = "dev" +optional = false python-versions = ">=2.7" files = [ {file = "sphinxcontrib-jquery-2.0.0.tar.gz", hash = "sha256:8fb65f6dba84bf7bcd1aea1f02ab3955ac34611d838bcc95d4983b805b234daa"}, @@ -1708,8 +1703,8 @@ setuptools = "*" name = "sphinxcontrib-jsmath" version = "1.0.1" description = "A sphinx extension which renders display math in HTML via JavaScript" -category = "main" -optional = true +category = "dev" +optional = false python-versions = ">=3.5" files = [ {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, @@ -1723,8 +1718,8 @@ test = ["flake8", "mypy", "pytest"] name = "sphinxcontrib-qthelp" version = "1.0.3" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." -category = "main" -optional = true +category = "dev" +optional = false python-versions = ">=3.5" files = [ {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, @@ -1739,8 +1734,8 @@ test = ["pytest"] name = "sphinxcontrib-serializinghtml" version = "1.1.5" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." -category = "main" -optional = true +category = "dev" +optional = false python-versions = ">=3.5" files = [ {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, @@ -1792,7 +1787,7 @@ name = "urllib3" version = "1.26.14" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "main" -optional = true +optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ {file = "urllib3-1.26.14-py2.py3-none-any.whl", hash = "sha256:75edcdc2f7d85b137124a6c3c9fc3933cdeaa12ecb9a6a959f22797a0feca7e1"}, @@ -1943,10 +1938,10 @@ docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] [extras] -doc = ["sphinx", "sphinx-rtd-theme", "sphinx-issues"] +doc = [] sentry = ["sentry-sdk"] [metadata] lock-version = "2.0" python-versions = ">=3.7, <4" -content-hash = "738b1b041b1a712f0f8b7a93114fa725200c16a9a22fa0e07ce270ea43e681a1" +content-hash = "8f106ded707429ba162516347083b894219b916064e466012f13636db6ba9d40" diff --git a/pyproject.toml b/pyproject.toml index 052671ac..aeb33f41 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,21 +51,17 @@ wtforms = "<4" "sentry-sdk" = {version = "<2", optional=true, extras=["flask"]} -"sphinx" = {version = "*", optional=true} -"sphinx-rtd-theme" = {version = "*", optional=true} -"sphinx-issues" = {version = "*", optional=true} +[tool.poetry.group.doc] +optional = true -[tool.poetry.extras] -sentry = ["sentry-sdk"] -doc = [ - "sphinx", - "sphinx-rtd-theme", - "sphinx-issues", -] +[tool.poetry.group.doc.dependencies] +"sphinx" = "*" +"sphinx-rtd-theme" = "*" +"sphinx-issues" = "*" -[tool.poetry.dev-dependencies] +[tool.poetry.group.dev.dependencies] coverage = {version = "*", extras=["toml"]} -faker = "^17.3.0" +faker = "*" flask-webtest = "*" freezegun = "*" mock = "*" @@ -78,6 +74,23 @@ pytest-httpserver = "*" slapd = "*" smtpdfix = "*" +[tool.poetry.group.demo] +optional = true + +[tool.poetry.group.demo.dependencies] +faker = "*" +honcho = "*" +slapd = "*" +requests = "*" + +[tool.poetry.extras] +sentry = ["sentry-sdk"] +doc = [ + "sphinx", + "sphinx-rtd-theme", + "sphinx-issues", +] + [tool.poetry.scripts] canaille = "canaille.commands:cli" @@ -129,7 +142,7 @@ commands = [testenv:doc] commands = - poetry install --extras doc + poetry install --only doc poetry run sphinx-build doc build/sphinx/html [testenv:coverage]