diff --git a/requirement/erplibre_require-ments.txt b/requirement/erplibre_require-ments.txt index 143d636..13de743 100644 --- a/requirement/erplibre_require-ments.txt +++ b/requirement/erplibre_require-ments.txt @@ -25,6 +25,9 @@ humanize requests urwid python-dateutil +unidecode +sshconf +cloudflare # Force upgrade package to fix Ubuntu 25.04 virtualenv==20.30.0 diff --git a/requirement/poetry.odoo18.0_python3.12.10.lock b/requirement/poetry.odoo18.0_python3.12.10.lock index e3daeeb..1388025 100644 --- a/requirement/poetry.odoo18.0_python3.12.10.lock +++ b/requirement/poetry.odoo18.0_python3.12.10.lock @@ -503,18 +503,18 @@ xyzservices = ">=2021.09.1" [[package]] name = "boto3" -version = "1.40.63" +version = "1.40.64" description = "The AWS SDK for Python" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "boto3-1.40.63-py3-none-any.whl", hash = "sha256:f15d4abf1a6283887c336f660cdfc2162a210d2d8f4d98dbcbcef983371c284d"}, - {file = "boto3-1.40.63.tar.gz", hash = "sha256:3bf4b034900c87a6a9b3b3b44c4aec26e96fc73bff2505f0766224b7295178ce"}, + {file = "boto3-1.40.64-py3-none-any.whl", hash = "sha256:35ca3dd80dd90d5f4e8ed032440f28790696fdf50f48c0d16a09a75675f9112f"}, + {file = "boto3-1.40.64.tar.gz", hash = "sha256:b92d6961c352f2bb8710c9892557d4b0e11258b70967d4e740e1c97375bcd779"}, ] [package.dependencies] -botocore = ">=1.40.63,<1.41.0" +botocore = ">=1.40.64,<1.41.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.14.0,<0.15.0" @@ -523,14 +523,14 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.40.63" +version = "1.40.64" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "botocore-1.40.63-py3-none-any.whl", hash = "sha256:83657b3ee487268fccc9ba022cba572ba657b9ece8cddd1fa241e2c6a49c8c14"}, - {file = "botocore-1.40.63.tar.gz", hash = "sha256:0324552c3c800e258cbcb8c22b495a2e2e0260a7408d08016196e46fa0d1b587"}, + {file = "botocore-1.40.64-py3-none-any.whl", hash = "sha256:6902b3dadfba1fbacc9648171bef3942530d8f823ff2bdb0e585a332323f89fc"}, + {file = "botocore-1.40.64.tar.gz", hash = "sha256:a13af4009f6912eafe32108f6fa584fb26e24375149836c2bcaaaaec9a7a9e58"}, ] [package.dependencies] @@ -1097,57 +1097,79 @@ test-no-images = ["pytest", "pytest-cov", "pytest-rerunfailures", "pytest-xdist" [[package]] name = "cryptography" -version = "42.0.8" +version = "46.0.3" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false -python-versions = ">=3.7" +python-versions = "!=3.9.0,!=3.9.1,>=3.8" groups = ["main"] files = [ - {file = "cryptography-42.0.8-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:81d8a521705787afe7a18d5bfb47ea9d9cc068206270aad0b96a725022e18d2e"}, - {file = "cryptography-42.0.8-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:961e61cefdcb06e0c6d7e3a1b22ebe8b996eb2bf50614e89384be54c48c6b63d"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e3ec3672626e1b9e55afd0df6d774ff0e953452886e06e0f1eb7eb0c832e8902"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e599b53fd95357d92304510fb7bda8523ed1f79ca98dce2f43c115950aa78801"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:5226d5d21ab681f432a9c1cf8b658c0cb02533eece706b155e5fbd8a0cdd3949"}, - {file = "cryptography-42.0.8-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:6b7c4f03ce01afd3b76cf69a5455caa9cfa3de8c8f493e0d3ab7d20611c8dae9"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:2346b911eb349ab547076f47f2e035fc8ff2c02380a7cbbf8d87114fa0f1c583"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:ad803773e9df0b92e0a817d22fd8a3675493f690b96130a5e24f1b8fabbea9c7"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:2f66d9cd9147ee495a8374a45ca445819f8929a3efcd2e3df6428e46c3cbb10b"}, - {file = "cryptography-42.0.8-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:d45b940883a03e19e944456a558b67a41160e367a719833c53de6911cabba2b7"}, - {file = "cryptography-42.0.8-cp37-abi3-win32.whl", hash = "sha256:a0c5b2b0585b6af82d7e385f55a8bc568abff8923af147ee3c07bd8b42cda8b2"}, - {file = "cryptography-42.0.8-cp37-abi3-win_amd64.whl", hash = "sha256:57080dee41209e556a9a4ce60d229244f7a66ef52750f813bfbe18959770cfba"}, - {file = "cryptography-42.0.8-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:dea567d1b0e8bc5764b9443858b673b734100c2871dc93163f58c46a97a83d28"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4783183f7cb757b73b2ae9aed6599b96338eb957233c58ca8f49a49cc32fd5e"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0608251135d0e03111152e41f0cc2392d1e74e35703960d4190b2e0f4ca9c70"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:dc0fdf6787f37b1c6b08e6dfc892d9d068b5bdb671198c72072828b80bd5fe4c"}, - {file = "cryptography-42.0.8-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:9c0c1716c8447ee7dbf08d6db2e5c41c688544c61074b54fc4564196f55c25a7"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:fff12c88a672ab9c9c1cf7b0c80e3ad9e2ebd9d828d955c126be4fd3e5578c9e"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:cafb92b2bc622cd1aa6a1dce4b93307792633f4c5fe1f46c6b97cf67073ec961"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:31f721658a29331f895a5a54e7e82075554ccfb8b163a18719d342f5ffe5ecb1"}, - {file = "cryptography-42.0.8-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b297f90c5723d04bcc8265fc2a0f86d4ea2e0f7ab4b6994459548d3a6b992a14"}, - {file = "cryptography-42.0.8-cp39-abi3-win32.whl", hash = "sha256:2f88d197e66c65be5e42cd72e5c18afbfae3f741742070e3019ac8f4ac57262c"}, - {file = "cryptography-42.0.8-cp39-abi3-win_amd64.whl", hash = "sha256:fa76fbb7596cc5839320000cdd5d0955313696d9511debab7ee7278fc8b5c84a"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ba4f0a211697362e89ad822e667d8d340b4d8d55fae72cdd619389fb5912eefe"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:81884c4d096c272f00aeb1f11cf62ccd39763581645b0812e99a91505fa48e0c"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c9bb2ae11bfbab395bdd072985abde58ea9860ed84e59dbc0463a5d0159f5b71"}, - {file = "cryptography-42.0.8-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7016f837e15b0a1c119d27ecd89b3515f01f90a8615ed5e9427e30d9cdbfed3d"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5a94eccb2a81a309806027e1670a358b99b8fe8bfe9f8d329f27d72c094dde8c"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:dec9b018df185f08483f294cae6ccac29e7a6e0678996587363dc352dc65c842"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:343728aac38decfdeecf55ecab3264b015be68fc2816ca800db649607aeee648"}, - {file = "cryptography-42.0.8-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:013629ae70b40af70c9a7a5db40abe5d9054e6f4380e50ce769947b73bf3caad"}, - {file = "cryptography-42.0.8.tar.gz", hash = "sha256:8d09d05439ce7baa8e9e95b07ec5b6c886f548deb7e0f69ef25f64b3bce842f2"}, + {file = "cryptography-46.0.3-cp311-abi3-macosx_10_9_universal2.whl", hash = "sha256:109d4ddfadf17e8e7779c39f9b18111a09efb969a301a31e987416a0191ed93a"}, + {file = "cryptography-46.0.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:09859af8466b69bc3c27bdf4f5d84a665e0f7ab5088412e9e2ec49758eca5cbc"}, + {file = "cryptography-46.0.3-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:01ca9ff2885f3acc98c29f1860552e37f6d7c7d013d7334ff2a9de43a449315d"}, + {file = "cryptography-46.0.3-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:6eae65d4c3d33da080cff9c4ab1f711b15c1d9760809dad6ea763f3812d254cb"}, + {file = "cryptography-46.0.3-cp311-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e5bf0ed4490068a2e72ac03d786693adeb909981cc596425d09032d372bcc849"}, + {file = "cryptography-46.0.3-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:5ecfccd2329e37e9b7112a888e76d9feca2347f12f37918facbb893d7bb88ee8"}, + {file = "cryptography-46.0.3-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:a2c0cd47381a3229c403062f764160d57d4d175e022c1df84e168c6251a22eec"}, + {file = "cryptography-46.0.3-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:549e234ff32571b1f4076ac269fcce7a808d3bf98b76c8dd560e42dbc66d7d91"}, + {file = "cryptography-46.0.3-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:c0a7bb1a68a5d3471880e264621346c48665b3bf1c3759d682fc0864c540bd9e"}, + {file = "cryptography-46.0.3-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:10b01676fc208c3e6feeb25a8b83d81767e8059e1fe86e1dc62d10a3018fa926"}, + {file = "cryptography-46.0.3-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:0abf1ffd6e57c67e92af68330d05760b7b7efb243aab8377e583284dbab72c71"}, + {file = "cryptography-46.0.3-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a04bee9ab6a4da801eb9b51f1b708a1b5b5c9eb48c03f74198464c66f0d344ac"}, + {file = "cryptography-46.0.3-cp311-abi3-win32.whl", hash = "sha256:f260d0d41e9b4da1ed1e0f1ce571f97fe370b152ab18778e9e8f67d6af432018"}, + {file = "cryptography-46.0.3-cp311-abi3-win_amd64.whl", hash = "sha256:a9a3008438615669153eb86b26b61e09993921ebdd75385ddd748702c5adfddb"}, + {file = "cryptography-46.0.3-cp311-abi3-win_arm64.whl", hash = "sha256:5d7f93296ee28f68447397bf5198428c9aeeab45705a55d53a6343455dcb2c3c"}, + {file = "cryptography-46.0.3-cp314-cp314t-macosx_10_9_universal2.whl", hash = "sha256:00a5e7e87938e5ff9ff5447ab086a5706a957137e6e433841e9d24f38a065217"}, + {file = "cryptography-46.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c8daeb2d2174beb4575b77482320303f3d39b8e81153da4f0fb08eb5fe86a6c5"}, + {file = "cryptography-46.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:39b6755623145ad5eff1dab323f4eae2a32a77a7abef2c5089a04a3d04366715"}, + {file = "cryptography-46.0.3-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:db391fa7c66df6762ee3f00c95a89e6d428f4d60e7abc8328f4fe155b5ac6e54"}, + {file = "cryptography-46.0.3-cp314-cp314t-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:78a97cf6a8839a48c49271cdcbd5cf37ca2c1d6b7fdd86cc864f302b5e9bf459"}, + {file = "cryptography-46.0.3-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:dfb781ff7eaa91a6f7fd41776ec37c5853c795d3b358d4896fdbb5df168af422"}, + {file = "cryptography-46.0.3-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:6f61efb26e76c45c4a227835ddeae96d83624fb0d29eb5df5b96e14ed1a0afb7"}, + {file = "cryptography-46.0.3-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:23b1a8f26e43f47ceb6d6a43115f33a5a37d57df4ea0ca295b780ae8546e8044"}, + {file = "cryptography-46.0.3-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:b419ae593c86b87014b9be7396b385491ad7f320bde96826d0dd174459e54665"}, + {file = "cryptography-46.0.3-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:50fc3343ac490c6b08c0cf0d704e881d0d660be923fd3076db3e932007e726e3"}, + {file = "cryptography-46.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:22d7e97932f511d6b0b04f2bfd818d73dcd5928db509460aaf48384778eb6d20"}, + {file = "cryptography-46.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:d55f3dffadd674514ad19451161118fd010988540cee43d8bc20675e775925de"}, + {file = "cryptography-46.0.3-cp314-cp314t-win32.whl", hash = "sha256:8a6e050cb6164d3f830453754094c086ff2d0b2f3a897a1d9820f6139a1f0914"}, + {file = "cryptography-46.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:760f83faa07f8b64e9c33fc963d790a2edb24efb479e3520c14a45741cd9b2db"}, + {file = "cryptography-46.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:516ea134e703e9fe26bcd1277a4b59ad30586ea90c365a87781d7887a646fe21"}, + {file = "cryptography-46.0.3-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:cb3d760a6117f621261d662bccc8ef5bc32ca673e037c83fbe565324f5c46936"}, + {file = "cryptography-46.0.3-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:4b7387121ac7d15e550f5cb4a43aef2559ed759c35df7336c402bb8275ac9683"}, + {file = "cryptography-46.0.3-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:15ab9b093e8f09daab0f2159bb7e47532596075139dd74365da52ecc9cb46c5d"}, + {file = "cryptography-46.0.3-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:46acf53b40ea38f9c6c229599a4a13f0d46a6c3fa9ef19fc1a124d62e338dfa0"}, + {file = "cryptography-46.0.3-cp38-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:10ca84c4668d066a9878890047f03546f3ae0a6b8b39b697457b7757aaf18dbc"}, + {file = "cryptography-46.0.3-cp38-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:36e627112085bb3b81b19fed209c05ce2a52ee8b15d161b7c643a7d5a88491f3"}, + {file = "cryptography-46.0.3-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:1000713389b75c449a6e979ffc7dcc8ac90b437048766cef052d4d30b8220971"}, + {file = "cryptography-46.0.3-cp38-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:b02cf04496f6576afffef5ddd04a0cb7d49cf6be16a9059d793a30b035f6b6ac"}, + {file = "cryptography-46.0.3-cp38-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:71e842ec9bc7abf543b47cf86b9a743baa95f4677d22baa4c7d5c69e49e9bc04"}, + {file = "cryptography-46.0.3-cp38-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:402b58fc32614f00980b66d6e56a5b4118e6cb362ae8f3fda141ba4689bd4506"}, + {file = "cryptography-46.0.3-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ef639cb3372f69ec44915fafcd6698b6cc78fbe0c2ea41be867f6ed612811963"}, + {file = "cryptography-46.0.3-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:3b51b8ca4f1c6453d8829e1eb7299499ca7f313900dd4d89a24b8b87c0a780d4"}, + {file = "cryptography-46.0.3-cp38-abi3-win32.whl", hash = "sha256:6276eb85ef938dc035d59b87c8a7dc559a232f954962520137529d77b18ff1df"}, + {file = "cryptography-46.0.3-cp38-abi3-win_amd64.whl", hash = "sha256:416260257577718c05135c55958b674000baef9a1c7d9e8f306ec60d71db850f"}, + {file = "cryptography-46.0.3-cp38-abi3-win_arm64.whl", hash = "sha256:d89c3468de4cdc4f08a57e214384d0471911a3830fcdaf7a8cc587e42a866372"}, + {file = "cryptography-46.0.3-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a23582810fedb8c0bc47524558fb6c56aac3fc252cb306072fd2815da2a47c32"}, + {file = "cryptography-46.0.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:e7aec276d68421f9574040c26e2a7c3771060bc0cff408bae1dcb19d3ab1e63c"}, + {file = "cryptography-46.0.3-pp311-pypy311_pp73-macosx_10_9_x86_64.whl", hash = "sha256:7ce938a99998ed3c8aa7e7272dca1a610401ede816d36d0693907d863b10d9ea"}, + {file = "cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:191bb60a7be5e6f54e30ba16fdfae78ad3a342a0599eb4193ba88e3f3d6e185b"}, + {file = "cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c70cc23f12726be8f8bc72e41d5065d77e4515efae3690326764ea1b07845cfb"}, + {file = "cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:9394673a9f4de09e28b5356e7fff97d778f8abad85c9d5ac4a4b7e25a0de7717"}, + {file = "cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:94cd0549accc38d1494e1f8de71eca837d0509d0d44bf11d158524b0e12cebf9"}, + {file = "cryptography-46.0.3-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:6b5063083824e5509fdba180721d55909ffacccc8adbec85268b48439423d78c"}, + {file = "cryptography-46.0.3.tar.gz", hash = "sha256:a8b17438104fed022ce745b362294d9ce35b4c2e45c1d958ad4a4b019285f4a1"}, ] [package.dependencies] -cffi = {version = ">=1.12", markers = "platform_python_implementation != \"PyPy\""} +cffi = {version = ">=2.0.0", markers = "python_full_version >= \"3.9.0\" and platform_python_implementation != \"PyPy\""} [package.extras] -docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.1.1)"] -docstest = ["pyenchant (>=1.6.11)", "readme-renderer", "sphinxcontrib-spelling (>=4.0.1)"] -nox = ["nox"] -pep8test = ["check-sdist", "click", "mypy", "ruff"] -sdist = ["build"] +docs = ["sphinx (>=5.3.0)", "sphinx-inline-tabs", "sphinx-rtd-theme (>=3.0.0)"] +docstest = ["pyenchant (>=3)", "readme-renderer (>=30.0)", "sphinxcontrib-spelling (>=7.3.1)"] +nox = ["nox[uv] (>=2024.4.15)"] +pep8test = ["check-sdist", "click (>=8.0.1)", "mypy (>=1.14)", "ruff (>=0.11.11)"] +sdist = ["build (>=1.0.0)"] ssh = ["bcrypt (>=3.1.5)"] -test = ["certifi", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] +test = ["certifi (>=2024)", "cryptography-vectors (==46.0.3)", "pretend (>=0.7)", "pytest (>=7.4.0)", "pytest-benchmark (>=4.0)", "pytest-cov (>=2.10.1)", "pytest-xdist (>=3.5.0)"] test-randomorder = ["pytest-randomly"] [[package]] @@ -1639,14 +1661,14 @@ draw5 = ["Pillow", "PyMuPDF (>=1.20.0)", "PyQt5", "matplotlib"] [[package]] name = "factur-x" -version = "3.12" +version = "3.13" description = "Factur-X and Order-X: electronic invoicing and ordering standards" optional = false python-versions = ">=3.7" groups = ["main"] files = [ - {file = "factur_x-3.12-py3-none-any.whl", hash = "sha256:c3513e13bc5fe3babbcd533d177c055e07cad9dceed1c44052f8a0138bda9fc0"}, - {file = "factur_x-3.12.tar.gz", hash = "sha256:af0b8a7b97b843380c24bffde1b968213aa2e8d8ef972194792e5bd9aea56547"}, + {file = "factur_x-3.13-py3-none-any.whl", hash = "sha256:7ec460c48ae8e98a0d048a72b31f16d11904b0fe2667ae23b0821f0c9b290fb9"}, + {file = "factur_x-3.13.tar.gz", hash = "sha256:1dd9f872ed6d619070dd5300dc1879a899b2ffd54c28cde7be18e7159cfff93b"}, ] [package.dependencies] @@ -5293,21 +5315,22 @@ six = "*" [[package]] name = "pyopenssl" -version = "24.1.0" +version = "25.3.0" description = "Python wrapper module around the OpenSSL library" optional = false python-versions = ">=3.7" groups = ["main"] files = [ - {file = "pyOpenSSL-24.1.0-py3-none-any.whl", hash = "sha256:17ed5be5936449c5418d1cd269a1a9e9081bc54c17aed272b45856a3d3dc86ad"}, - {file = "pyOpenSSL-24.1.0.tar.gz", hash = "sha256:cabed4bfaa5df9f1a16c0ef64a0cb65318b5cd077a7eda7d6970131ca2f41a6f"}, + {file = "pyopenssl-25.3.0-py3-none-any.whl", hash = "sha256:1fda6fc034d5e3d179d39e59c1895c9faeaf40a79de5fc4cbbfbe0d36f4a77b6"}, + {file = "pyopenssl-25.3.0.tar.gz", hash = "sha256:c981cb0a3fd84e8602d7afc209522773b94c1c2446a3c710a75b06fe1beae329"}, ] [package.dependencies] -cryptography = ">=41.0.5,<43" +cryptography = ">=45.0.7,<47" +typing-extensions = {version = ">=4.9", markers = "python_version < \"3.13\" and python_version >= \"3.8\""} [package.extras] -docs = ["sphinx (!=5.2.0,!=5.2.0.post0,!=7.2.5)", "sphinx-rtd-theme"] +docs = ["sphinx (!=5.2.0,!=5.2.0.post0,!=7.2.5)", "sphinx_rtd_theme"] test = ["pretend", "pytest (>=3.0.1)", "pytest-rerunfailures"] [[package]] @@ -5466,24 +5489,26 @@ name = "pysaml2" version = "7.5.4" description = "Python implementation of SAML Version 2 Standard" optional = false -python-versions = ">=3.9" +python-versions = ">= 3.9" groups = ["main"] -files = [ - {file = "pysaml2-7.5.4-py3-none-any.whl", hash = "sha256:9cf4310a7b7627440b3f9f94126f2102f8472607878aa22aeae9d6831bb2af47"}, - {file = "pysaml2-7.5.4.tar.gz", hash = "sha256:b827dcaab73c4f7fe001c945401eb442cfda5d22001cea50c20c138e9adeffea"}, -] +files = [] +develop = false [package.dependencies] -cryptography = ">=3.1" +cryptography = ">=40.0" defusedxml = "*" -pyopenssl = "<24.3.0" -python-dateutil = "*" requests = ">=2.0.0,<3.0.0" xmlschema = ">=2.0.0,<3.0.0" [package.extras] s2repoze = ["paste", "repoze.who", "zope.interface"] +[package.source] +type = "git" +url = "https://github.com/prauscher/pysaml2.git" +reference = "replace-pyopenssl" +resolved_reference = "a9b7b78dadf2f403e83c3f647c79a6eb84f1746b" + [[package]] name = "pyserial" version = "3.5" @@ -6313,14 +6338,14 @@ unleash = ["UnleashClient (>=6.0.1)"] [[package]] name = "setuptools" -version = "78.1.1" +version = "80.9.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.9" groups = ["main"] files = [ - {file = "setuptools-78.1.1-py3-none-any.whl", hash = "sha256:c3a9c4211ff4c309edb8b8c4f1cbfa7ae324c4ba9f91ff254e3d305b9fd54561"}, - {file = "setuptools-78.1.1.tar.gz", hash = "sha256:fcc17fd9cd898242f6b4adfaca46137a9edef687f43e6f78469692a5e70d851d"}, + {file = "setuptools-80.9.0-py3-none-any.whl", hash = "sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922"}, + {file = "setuptools-80.9.0.tar.gz", hash = "sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c"}, ] [package.extras] @@ -7326,4 +7351,4 @@ bindings = ["ghostscript"] [metadata] lock-version = "2.1" python-versions = ">=3.12.10,<3.13" -content-hash = "b36c08b14814854d1a29e709fb3edcae88714da4ac463f79b8ea3fc2ac15b82f" +content-hash = "0e97844a7cf0de05cca9a8c0a75bd07adea905a048463f4a11440b44085c0094" diff --git a/requirement/pyproject.odoo18.0_python3.12.10.toml b/requirement/pyproject.odoo18.0_python3.12.10.toml index 0a7de8e..ee45259 100644 --- a/requirement/pyproject.odoo18.0_python3.12.10.toml +++ b/requirement/pyproject.odoo18.0_python3.12.10.toml @@ -27,14 +27,14 @@ bandit = "^1.8.6" base64io = "^1.0.3" beautifulsoup4 = "4.13.5" bokeh = "3.6.3" -boto3 = "^1.40.63" +boto3 = "^1.40.64" cachetools = "^6.2.1" cairosvg = "^2.8.2" caldav = "1.3.9" cbor2 = "5.6.2" chardet = "5.2.0" code-writer = "^1.2.0" -cryptography = "42.0.8" +cryptography = "46.0.3" cssselect = "^1.3.0" cython = "^3.1.6" decorator = "5.1.1" @@ -44,7 +44,7 @@ email-validator = "^2.3.0" extract-msg = "^0.55.0" extruct = "^0.18.0" ezdxf = "^1.4.3" -factur-x = "^3.12" +factur-x = "^3.13" filetype = "^1.2.0" flake8 = "^7.3.0" formio-data = "^2.1.6" @@ -113,10 +113,9 @@ pylint-odoo = "^9.3.22" pymssql = "^2.3.8" pymysql = "^1.1.2" pyncclient = "^0.7" -pyopenssl = "24.1.0" +pyopenssl = "25.3.0" pypdf2 = "2.12.1" pyproj = "^3.7.2" -pysaml2 = "^7.5.4" pyserial = "3.5" pysftp = "^0.2.9" pytesseract = "^0.3.13" @@ -146,7 +145,7 @@ rjsmin = "1.2.0" roulier = "^1.1.1" schwifty = "2024.4.0" sentry-sdk = ">=2.0.0,<=2.22.0" -setuptools = "78.1.1" +setuptools = "80.9.0" shapely = "^2.1.2" statsd = "^4.0.1" tweepy = "^4.16.0" @@ -172,6 +171,10 @@ rev = "24.8.0" extras = [ "s3",] version = "^2025.10.0" +[tool.poetry.dependencies.pysaml2] +git = "https://github.com/prauscher/pysaml2.git" +rev = "replace-pyopenssl" + [tool.poetry.dependencies.webdav4] extras = [ "fsspec",] version = "^0.10.0" diff --git a/requirement/requirements.odoo18.0_python3.12.10.txt b/requirement/requirements.odoo18.0_python3.12.10.txt index 0b5015e..84522ab 100644 --- a/requirement/requirements.odoo18.0_python3.12.10.txt +++ b/requirement/requirements.odoo18.0_python3.12.10.txt @@ -1,7 +1,7 @@ # For OSX cython -setuptools==78.1.1 +setuptools==80.9.0 # Module voice_to_text #SpeechRecognition==3.10.0 @@ -58,3 +58,9 @@ beautifulsoup4==4.13.5 #pylint-odoo==9.3.22 pylint==3.3.9 isort==6.1.0 + +# Fix some OS +cryptography==46.0.3 +pyopenssl==25.3.0 +# This will ignore pyopenssl from pysaml2==7.5.4 +git+https://github.com/prauscher/pysaml2.git@replace-pyopenssl diff --git a/script/deployment/README.md b/script/deployment/README.md new file mode 100644 index 0000000..2e44ad4 --- /dev/null +++ b/script/deployment/README.md @@ -0,0 +1,5 @@ +# Information about deployment with cloudflare + +The script update_dns_cloudflare.py is used to update all DNS for case of DDNS, when ip address change, with a cron. This version support an old version of cloudflare==2.20.0 + +The script cloudflare_dns.py is used to update specific address at a deployment. diff --git a/script/deployment/cloudflare_dns.py b/script/deployment/cloudflare_dns.py new file mode 100755 index 0000000..45a5744 --- /dev/null +++ b/script/deployment/cloudflare_dns.py @@ -0,0 +1,127 @@ +#!/usr/bin/env python3 +# © 2021-2024 TechnoLibre (http://www.technolibre.ca) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +import argparse +import logging +import os +from datetime import datetime + +import requests +import tldextract +from cloudflare import Cloudflare + +logging.basicConfig() +logging.getLogger().setLevel(logging.INFO) +_logger = logging.getLogger(__name__) + + +def get_config(): + """Parse command line arguments, extracting the config file name, + returning the union of config file and command line arguments + + :return: dict of config file settings and command line arguments + """ + + # TODO update description + parser = argparse.ArgumentParser( + formatter_class=argparse.RawDescriptionHelpFormatter, + description="""\ + You need to setup your environment key CLOUDFLARE_API_TOKEN +""", + epilog="""\ +""", + ) + parser.add_argument( + "--ip", required=False, help="Ip to replace the old ip." + ) + parser.add_argument( + "--domain", + required=False, + help="DNS name to output his ip and sync.", + ) + parser.add_argument( + "--zone_name", + required=False, + help="The CloudFlare zone name to check.", + ) + args = parser.parse_args() + return args + + +class ManageCloudFlare: + @staticmethod + def get_public_ip(): + r = requests.get(r"https://api.ipify.org") + ip = r.text + return ip + + def set_ip_to_domain(self, parser): + api_token = os.environ.get("CLOUDFLARE_API_TOKEN") + if not api_token: + raise Exception( + "Missing environment variable CLOUDFLARE_API_TOKEN" + ) + public_ip = parser.ip + website_domain = parser.domain + cf = Cloudflare(api_token=api_token) + url_extract = tldextract.extract(website_domain) + url_domain_only = url_extract.top_domain_under_public_suffix + domain_to_create = url_extract.fqdn + zones = [a for a in cf.zones.list() if a.name == url_domain_only] + if not zones: + raise Exception( + "Cannot found domain %s on your cloudflare account." + % url_domain_only + ) + zone = zones[0] + # id_zone = zone.account.id + id_zone = zone.id + + # Comment is limited to 100 char + records_dns = cf.dns.records.list( + zone_id=id_zone, name=domain_to_create + ) + lst_dns = [a for a in records_dns] + if lst_dns: + for dns in lst_dns: + # update comment + comment = dns.comment + new_comment = "Updated from ERPLibre at %s" % (datetime.now(),) + # if comment: + # comment += "\n" + new_comment + # else: + # comment = new_comment + comment = new_comment + try: + record_response = cf.dns.records.edit( + zone_id=id_zone, + content=public_ip, + dns_record_id=dns.id, + name=domain_to_create, + type="A", + comment=comment, + ) + except Exception as e: + _logger.error(e) + else: + try: + record_response = cf.dns.records.create( + zone_id=id_zone, + name=domain_to_create, + type="A", + content=public_ip, + comment="Generated with ERPLibre", + ) + except Exception as e: + _logger.error(e) + + +def main(): + config = get_config() + cl = ManageCloudFlare() + cl.set_ip_to_domain(config) + + +if __name__ == "__main__": + main() diff --git a/script/deployment/update_dns_cloudflare.py b/script/deployment/update_dns_cloudflare.py index 1263b90..98d1d27 100755 --- a/script/deployment/update_dns_cloudflare.py +++ b/script/deployment/update_dns_cloudflare.py @@ -5,8 +5,8 @@ import argparse import logging -import CloudFlare import requests +from cloudflare import Cloudflare logging.basicConfig() logging.getLogger().setLevel(logging.INFO) @@ -82,7 +82,7 @@ def get_config(): class ManageCloudFlare: def __init__(self, profile, debug=False, raw=False): - self.cf = CloudFlare.CloudFlare(profile=profile, debug=debug, raw=raw) + self.cf = Cloudflare(profile=profile, debug=debug, raw=raw) self.raw = raw @staticmethod diff --git a/script/install/install_debian_dependency.sh b/script/install/install_debian_dependency.sh index 364e304..f058c97 100755 --- a/script/install/install_debian_dependency.sh +++ b/script/install/install_debian_dependency.sh @@ -34,6 +34,14 @@ else exit 1 fi +#-------------------------------------------------- +# Mainframe 390x +#-------------------------------------------------- +if [ "$(uname -m)" = "s390x" ]; then + echo "Arch s390x detected" + sudo apt install wkhtmltopdf rust-all libqpdf-dev libgeos-dev libproj-dev proj-bin proj-data libgeographiclib-dev freetds-dev freetds-bin libkrb5-dev libssl-dev pkg-config build-essential -y +fi + #-------------------------------------------------- # Update Server #-------------------------------------------------- diff --git a/script/install/install_production.sh b/script/install/install_production.sh index 5895003..e113acb 100755 --- a/script/install/install_production.sh +++ b/script/install/install_production.sh @@ -8,7 +8,7 @@ sudo adduser --system --quiet --shell=/bin/bash --home=/${EL_USER} --gecos 'ERPL sudo adduser ${EL_USER} sudo echo -e "\n---- Creating the ERPLIBRE PostgreSQL User ----" -sudo su - postgres -c "createuser -s ${EL_USER}" 2> /dev/null || true +sudo su - postgres -c "createuser -s ${EL_USER}" 2>/dev/null || true #echo -e "\n---- Create Log directory ----" #sudo mkdir /var/log/${EL_USER} @@ -22,8 +22,8 @@ sudo chown -R ${EL_USER}:${EL_USER} ${EL_HOME} # Install ERPLIBRE #-------------------------------------------------- echo -e "\n==== Clone this installation ====" -REMOTE_URL_GIT=`git remote get-url origin` -BRANCH_GIT=`git rev-parse --abbrev-ref HEAD` +REMOTE_URL_GIT=$(git remote get-url origin) +BRANCH_GIT=$(git rev-parse --abbrev-ref HEAD) if [ "HEAD" = "${BRANCH_GIT}" ]; then # Checkout version of env_var.sh sudo su ${EL_USER} -c "git clone --branch v${ERPLIBRE_VERSION} ${REMOTE_URL_GIT} ${EL_HOME_ERPLIBRE}" @@ -43,9 +43,9 @@ cd ${LAST_PWD} #-------------------------------------------------- # Adding ERPLIBRE as a daemon #-------------------------------------------------- -./script/install/install_daemon.sh +./script/systemd/install_daemon.sh #-------------------------------------------------- # Install Nginx if needed #-------------------------------------------------- -./script/install/install_production_nginx.sh \ No newline at end of file +./script/install/install_production_nginx.sh diff --git a/script/nginx/deploy_nginx_and_certbot.py b/script/nginx/deploy_nginx_and_certbot.py index ed19bb6..c6db1b6 100755 --- a/script/nginx/deploy_nginx_and_certbot.py +++ b/script/nginx/deploy_nginx_and_certbot.py @@ -51,6 +51,10 @@ def get_config(): required=True, help="Separate by ; for multiple domains. Main domain is first on the list.", ) + parser.add_argument( + "--admin_email", + help="Will configure certbot with admin email to receive information about the certificate.", + ) parser.add_argument( "--odoo_version", default="18.0", @@ -131,7 +135,16 @@ def main(): if config.generate_nginx: time.sleep(10) cmd_lst_domain = " -d " + " -d ".join(lst_domain) - cmd_certbot = "sudo certbot --nginx%s" % cmd_lst_domain + cmd_more_certbot_cmd = "" + + if config.admin_email: + cmd_more_certbot_cmd += ( + f"--email {config.admin_email} --non-interactive --agree-tos " + ) + + cmd_certbot = ( + f"sudo certbot {cmd_more_certbot_cmd}--nginx{cmd_lst_domain}" + ) print(cmd_certbot) os.system(cmd_certbot) diff --git a/script/performance/test_performance.sh b/script/performance/test_performance.sh new file mode 100755 index 0000000..5d642f0 --- /dev/null +++ b/script/performance/test_performance.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# test_performance.sh https://website.com + +#ulimit -n 200000 + +# (facultatif mais utile) sysctl temporaires pour la machine de test : +#sudo sysctl -w net.core.somaxconn=65535 +#sudo sysctl -w net.core.netdev_max_backlog=250000 +#sudo sysctl -w net.ipv4.ip_local_port_range="1024 65000" +#sudo sysctl -w net.ipv4.tcp_fin_timeout=15 + +for c in 25 50 100 200 400; do + echo "== Concurrency: $c ==" + #oha -z 30s -c $c $1 | tee -a results.txt + wrk -t$(nproc) -c$c -d30s "$1" | tee -a results.txt +done diff --git a/script/selenium/selenium_lib.py b/script/selenium/selenium_lib.py index aca1223..c3d7dea 100644 --- a/script/selenium/selenium_lib.py +++ b/script/selenium/selenium_lib.py @@ -47,10 +47,6 @@ logging.basicConfig( ) _logger = logging.getLogger(__name__) -# TODO maybe use TODO lib -CONFIG_FILE = "./script/todo/todo.json" -CONFIG_OVERRIDE_FILE = "./private/todo/todo.json" -LOGO_ASCII_FILE = "./script/todo/logo_ascii.txt" MONTHS_FR = { "janvier": 1, @@ -70,11 +66,6 @@ MONTHS_FR = { "decembre": 12, } -# TODO maybe use TODO lib -CONFIG_FILE = "./script/todo/todo.json" -CONFIG_OVERRIDE_FILE = "./private/todo/todo.json" -LOGO_ASCII_FILE = "./script/todo/logo_ascii.txt" - class SeleniumLib(object): def __init__(self, config): @@ -422,53 +413,6 @@ class SeleniumLib(object): self.kdbx = kp return kp - def get_kdbx(self): - if self.kdbx: - return self.kdbx - # Open file - chemin_fichier_kdbx = self.get_config(["kdbx", "path"]) - if not chemin_fichier_kdbx: - root = tk.Tk() - root.withdraw() # Hide the main window - chemin_fichier_kdbx = filedialog.askopenfilename( - title="Select a File", - filetypes=(("KeepassX files", "*.kdbx"),), - ) - if not chemin_fichier_kdbx: - # _logger.error(f"KDBX is not configured, please fill {CONFIG_FILE}") - return - - mot_de_passe_kdbx = self.get_config(["kdbx", "password"]) - if not mot_de_passe_kdbx: - mot_de_passe_kdbx = getpass.getpass( - prompt="Entrez votre mot de passe : " - ) - - kp = PyKeePass(chemin_fichier_kdbx, password=mot_de_passe_kdbx) - - if kp: - self.kdbx = kp - return kp - - def get_config(self, lst_params): - # Open file - config_file = CONFIG_FILE - if os.path.exists(CONFIG_OVERRIDE_FILE): - config_file = CONFIG_OVERRIDE_FILE - - with open(config_file) as cfg: - dct_data = json.load(cfg) - for param in lst_params: - try: - dct_data = dct_data[param] - except KeyError: - # _logger.error( - # f"KeyError on file {config_file} with keys" - # f" {lst_params}" - # ) - return - return dct_data - @staticmethod def get_french_word_no_space_no_accent(): word = "" diff --git a/script/systemd/install_daemon.py b/script/systemd/install_daemon.py new file mode 100755 index 0000000..bfd6008 --- /dev/null +++ b/script/systemd/install_daemon.py @@ -0,0 +1,180 @@ +#!/usr/bin/env python3 +# © 2021-2024 TechnoLibre (http://www.technolibre.ca) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +import argparse +import os +import stat +import subprocess +import sys +from pathlib import Path + +UNIT_TEMPLATE = """[Unit] +Description=ERPLibre for {user} +Requires=postgresql.service +After=network.target network-online.target postgresql.service + +[Service] +Type=simple +SyslogIdentifier={user} +PermissionsStartOnly=true +User={user} +Group={user} +Restart=always +RestartSec=5 +PIDFile={home_erplibre}/.venv.erplibre/service.pid +ExecStart={home_erplibre}/run.sh{EXEC_PARAM} +WorkingDirectory={home_erplibre} +StandardOutput=journal+console + +[Install] +WantedBy=multi-user.target +""" + + +def ensure_root(): + if os.geteuid() != 0: + sys.exit("❌ This script must be run as root (use sudo or root).") + + +def run(cmd: list[str]) -> None: + subprocess.run(cmd, check=True) + + +def w_cmd(param: str, arg: str = None) -> str: + if not arg: + if type(arg) is str: + return "" + return param + return f"{param} {arg}" + + +def main(): + parser = argparse.ArgumentParser( + description="Create and enable a SystemD service for ERPLibre (Python equivalent of the bash script)." + ) + + # Exposed variables as configurable parameters + parser.add_argument( + "--user", + required=True, + help="Linux user running the service (e.g. erplibre)", + ) + parser.add_argument( + "--home-erplibre", + help="Path to erplibre directory, workspace root path.", + ) + parser.add_argument("--port", help="Application port (for information).") + parser.add_argument( + "--database", + help="Database name to run only with it (for information).", + ) + parser.add_argument( + "--config-name", + help="Service name (and systemd file name without .service). Default: user", + ) + + # Utility flags + parser.add_argument( + "--no-enable", + action="store_true", + help="Do not enable service on boot.", + ) + parser.add_argument( + "--no-restart", + action="store_true", + help="Do not restart the service after setup.", + ) + parser.add_argument( + "--dry-run", + action="store_true", + help="Show what would be done without changing the system.", + ) + args = parser.parse_args() + + ensure_root() + + # Default paths and fallback values (same logic as in the bash script) + el_user = args.user + el_home_erplibre = args.home_erplibre or os.getcwd() + el_config_name = args.config_name or f"erplibre_{el_user}_{os.path.basename(os.getcwd())}" + exec_param = ( + " " + + f" {w_cmd("-d", args.database or "")} {w_cmd("-p", args.port or "")}".strip() + ) + + # Render the systemd service file content + unit_content = UNIT_TEMPLATE.format( + user=el_user, + home_erplibre=el_home_erplibre, + EXEC_PARAM=exec_param, + ) + + unit_dest_path = Path(f"/etc/systemd/system/{el_config_name}.service") + + print("* Final systemd file location:", unit_dest_path) + + if args.dry_run: + print("\n--- GENERATED CONTENT ---\n") + print(unit_content) + print("\n--- END ---") + print("\n(dry-run) No files written, no systemctl commands executed.") + return + + # Write temporary unit file + unit_dest_path.write_text(unit_content, encoding="utf-8") + + # chmod 755 + print("* Setting permissions to 755") + unit_dest_path.chmod( + stat.S_IRUSR + | stat.S_IWUSR + | stat.S_IXUSR + | stat.S_IRGRP + | stat.S_IXGRP + | stat.S_IROTH + | stat.S_IXOTH + ) + + # chown root:root + print("* Changing owner to root:root") + os.chown(unit_dest_path, 0, 0) + + # Sanity checks + if not Path(el_home_erplibre).exists(): + print(f"⚠️ Warning: {el_home_erplibre} does not exist.") + if not Path(el_home_erplibre, "run.sh").exists(): + print(f"⚠️ Warning: {el_home_erplibre}/run.sh does not exist.") + + # Reload systemd and enable service + print("* Reloading systemd daemon") + run(["systemctl", "daemon-reload"]) + + if not args.no_enable: + print(f"* Enabling service at boot: {el_config_name}.service") + run(["systemctl", "enable", f"{el_config_name}.service"]) + else: + print("* (skip) enable step") + + if not args.no_restart: + print(f"* Restarting service: {el_config_name}.service") + run(["systemctl", "restart", f"{el_config_name}.service"]) + else: + print("* (skip) restart step") + + # Summary (equivalent of bash echo block) + print("\n-----------------------------------------------------------") + print("Done! ERPLibre service created and started. Details:") + print(f"Port: {args.port}") + print(f"Service user: {el_user}") + print(f"Systemd file: {unit_dest_path}") + print(f"Start: systemctl start {el_config_name}") + print(f"Stop: systemctl stop {el_config_name}") + print(f"Restart: systemctl restart {el_config_name}") + print(f"Status: systemctl status {el_config_name}") + print(f"Logs: journalctl -feu {el_config_name}") + print("-----------------------------------------------------------") + + +if __name__ == "__main__": + main() diff --git a/script/install/install_daemon.sh b/script/systemd/install_daemon.sh similarity index 98% rename from script/install/install_daemon.sh rename to script/systemd/install_daemon.sh index c1330ed..cfc2bd2 100755 --- a/script/install/install_daemon.sh +++ b/script/systemd/install_daemon.sh @@ -16,7 +16,7 @@ #-------------------------------------------------- echo -e "\n* Create init file" sudo rm -f /tmp/${EL_CONFIG} -cat < /tmp/${EL_CONFIG} +cat </tmp/${EL_CONFIG} [Unit] Description=${EL_USER} Requires=postgresql.service diff --git a/script/todo/todo.py b/script/todo/todo.py index c5de8f1..c412e78 100755 --- a/script/todo/todo.py +++ b/script/todo/todo.py @@ -784,6 +784,9 @@ class TODO: if not source_odoo and os.path.exists("./.erplibre-version"): with open("./.erplibre-version") as f: source_odoo = f.read() + if not source_odoo: + _logger.error(f"You cannot execute Odoo command if no version is installed. Command : {commande}") + return -1 commande = ( f"source ./.venv.{source_odoo}/bin/activate && {commande}" )