From 9718147374584706a5e26176ecf33f71cca53971 Mon Sep 17 00:00:00 2001 From: Kelvin Steiner Date: Wed, 12 Jun 2024 19:35:46 -0300 Subject: [PATCH] manage Python package dependencies with pipenv (bugged) --- .envrc | 1 + Makefile | 5 -- Pipfile | 12 +++ Pipfile.lock | 229 +++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 4 +- 5 files changed, 244 insertions(+), 7 deletions(-) create mode 100644 Pipfile create mode 100644 Pipfile.lock diff --git a/.envrc b/.envrc index 3550a30..0d54e92 100644 --- a/.envrc +++ b/.envrc @@ -1 +1,2 @@ use flake +layout pipenv diff --git a/Makefile b/Makefile index e47c4ce..89a19e2 100644 --- a/Makefile +++ b/Makefile @@ -14,11 +14,6 @@ rust-check-fmt: rust-fmt: cargo fmt --all -create-venv: - python3 -m venv venv - @echo "Enter venv with:" - @echo "source venv/bin/activate" - build: cd crates/benda; \ maturin develop diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000..5763ce4 --- /dev/null +++ b/Pipfile @@ -0,0 +1,12 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[dev-packages] +# linter +ruff = ">=0.4.8,<0.5.0" +# static analysis +pylyzer = ">=0.0.54,<0.1.0" +# interactive shell +ipython = ">=8.25.0,<9.0.0" diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 0000000..ae94421 --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,229 @@ +{ + "_meta": { + "hash": { + "sha256": "c2532dff66c3c54343f27276b3500e7c324b3a849c6dbfe1e9c0b9f9e7fb71ec" + }, + "pipfile-spec": 6, + "requires": {}, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": {}, + "develop": { + "asttokens": { + "hashes": [ + "sha256:051ed49c3dcae8913ea7cd08e46a606dba30b79993209636c4875bc1d637bc24", + "sha256:b03869718ba9a6eb027e134bfdf69f38a236d681c83c160d510768af11254ba0" + ], + "version": "==2.4.1" + }, + "decorator": { + "hashes": [ + "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330", + "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186" + ], + "markers": "python_version >= '3.5'", + "version": "==5.1.1" + }, + "executing": { + "hashes": [ + "sha256:35afe2ce3affba8ee97f2d69927fa823b08b472b7b994e36a52a964b93d16147", + "sha256:eac49ca94516ccc753f9fb5ce82603156e590b27525a8bc32cce8ae302eb61bc" + ], + "markers": "python_version >= '3.5'", + "version": "==2.0.1" + }, + "ipython": { + "hashes": [ + "sha256:53eee7ad44df903a06655871cbab66d156a051fd86f3ec6750470ac9604ac1ab", + "sha256:c6ed726a140b6e725b911528f80439c534fac915246af3efc39440a6b0f9d716" + ], + "index": "pypi", + "version": "==8.25.0" + }, + "jedi": { + "hashes": [ + "sha256:cf0496f3651bc65d7174ac1b7d043eff454892c708a87d1b683e57b569927ffd", + "sha256:e983c654fe5c02867aef4cdfce5a2fbb4a50adc0af145f70504238f18ef5e7e0" + ], + "markers": "python_version >= '3.6'", + "version": "==0.19.1" + }, + "matplotlib-inline": { + "hashes": [ + "sha256:8423b23ec666be3d16e16b60bdd8ac4e86e840ebd1dd11a30b9f117f2fa0ab90", + "sha256:df192d39a4ff8f21b1895d72e6a13f5fcc5099f00fa84384e0ea28c2cc0653ca" + ], + "markers": "python_version >= '3.8'", + "version": "==0.1.7" + }, + "parso": { + "hashes": [ + "sha256:a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18", + "sha256:eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d" + ], + "markers": "python_version >= '3.6'", + "version": "==0.8.4" + }, + "pexpect": { + "hashes": [ + "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523", + "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f" + ], + "markers": "sys_platform != 'win32' and sys_platform != 'emscripten'", + "version": "==4.9.0" + }, + "prompt-toolkit": { + "hashes": [ + "sha256:0d7bfa67001d5e39d02c224b663abc33687405033a8c422d0d675a5a13361d10", + "sha256:1e1b29cb58080b1e69f207c893a1a7bf16d127a5c30c9d17a25a5d77792e5360" + ], + "markers": "python_full_version >= '3.7.0'", + "version": "==3.0.47" + }, + "ptyprocess": { + "hashes": [ + "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", + "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220" + ], + "version": "==0.7.0" + }, + "pure-eval": { + "hashes": [ + "sha256:01eaab343580944bc56080ebe0a674b39ec44a945e6d09ba7db3cb8cec289350", + "sha256:2b45320af6dfaa1750f543d714b6d1c520a1688dec6fd24d339063ce0aaa9ac3" + ], + "version": "==0.2.2" + }, + "pygments": { + "hashes": [ + "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199", + "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a" + ], + "markers": "python_version >= '3.8'", + "version": "==2.18.0" + }, + "pylyzer": { + "hashes": [ + "sha256:01e2661c96488b5d87db93ba37197d8eda3cc5cf58ada28be2f8b0a4f726184d", + "sha256:09803761dafa59a6e3e2f078e331202aab509cc3f3b796142333bcbede6266b4", + "sha256:1c9275b9c11f595ea7b317ad5db4b31b57c96955534aee17975c12c96323aea4", + "sha256:1df6c8fdaebc835b72e80c51ae141a704ec070836e31bae223a3a20a8e535a26", + "sha256:1f1e856dda24b9cbfc7939e48c76f72e112aea4970733ad81921d6f19d402739", + "sha256:215ba741e6a61f00bee8359aaa8cac05e9f2ed19427b68bcc273935f66455228", + "sha256:217494f3162263287a7054472b8b46a116ba1219e50f4a6dba4129b77ee2de11", + "sha256:249e43db618170a2027d492eb1e26c32480a976e746255c92a76be598f6b098d", + "sha256:35e2f6e2890eff85727d4e83c41e4a095eca387af8e9893450775c165857d8b2", + "sha256:3c0585f2b5d75e2af33a572831260703b16b4a41f70cee0fcf85a6e8e6aead3b", + "sha256:438324431c873a093a1a9be6c1942d19096fc968767cbbfab6ea8b80ba233d68", + "sha256:43e22587436d1f539523eefd5fd03e2fdcff89e33e0cbf618a861b18f52e9711", + "sha256:49cadac9b309673945236e603aab62f15bee51ff6e128553f139346718664c17", + "sha256:4b90f79bbdbdab9b188873a837fc2b56f05d52ba1207a66677b90261b26da6b2", + "sha256:4e0b65c89162c01c049d315f857cfe54c445957c234e8a8031c46ae85186d9bd", + "sha256:598a75b4e7419de866fa84e52510f4346e92313a312eb1a258a7f9c4cfd97f28", + "sha256:5bd38d272a45c03a93d2e840d6efbcaf508a265d95231747c6d8cdc53b2fc042", + "sha256:5d2e679c0dd60e2783c8b8bea13bd25d0403759843afd76bfc54a0d32fe01d88", + "sha256:5d4bd19fcf702eda5f0b6e1b2e57d094ff6adefefadaedfcc86471c43e0689fb", + "sha256:70f173a40020fa5759b5def6fc79fbeaa2220d057e24ba17c1fc39914a6cd074", + "sha256:76af6877379a133dbcbf20d03b9ecbf004d9153936c7071a7cef78daf870bd06", + "sha256:7898c42693d75b850c0f422ddc4a29fa46f2a81face18faae17e85b84dc852a1", + "sha256:7b36f48d189874256c675b5c94d7fc8cec891edd0f73460780e850630264c6d8", + "sha256:7ff929dab9cd1ed7887ed1c998e0d7caa9a6d33e3faae390dff8d2f67d0ef84a", + "sha256:85e1142b1b11719c42b531ca5ad1a9c7f6eff9dd5a2c38b858076305277ef7a2", + "sha256:8d4187e83d95a880e6a1764ad949309f1457f222cfce59d89c8c3c38f8a333ad", + "sha256:9a7c9f4bd731896b87c3434d6285960f057c6dc3a8a7d2b0e5e5bb2c8ebf2133", + "sha256:9bcee2aeeff1e6a6f4507c14a01f1ae4202560314c5dc6d6a09bed984bde9d44", + "sha256:a19a5daece7c005172a29834193fb1254ad7cf2b6282520538931dcfa206340b", + "sha256:a3f5aef669ce1ea7baab32a7d764839916d7c5a606eb2c9489e20c436c0966b8", + "sha256:a4a3881202effc9ca1ac923f5d24dc761fad6f95dfe5b64003550bc902fed653", + "sha256:a8b2a466c3c920c437fabb3aa3d00198b3f9a04cd946cdd6d95b05f4e0d70454", + "sha256:aa544f78f8728164ae85ee7dc9d4de13c6ddddd8aacc62e21b075880376e6172", + "sha256:aad68b68f9c1a726a9d119a56447a2c7e775ed241ab5b4730a115480b44a1165", + "sha256:ab2466781b96e6b5810f2b4092f47ae110811ca2ddee4978161f7a271271bab7", + "sha256:ad9e37963c157e4f14a234d1c72822a3e586fd1e7fade68e486eff542958b442", + "sha256:b1e8513f0d85ec93f39ed529d8b647b0c85ac79b842609e373de7cb0c6e07f2c", + "sha256:b7243a26e2ac42b9fcb04381cfb3a650175e85167f23756659fa50ec0a4fbdfa", + "sha256:b788aa1731e75e04295e3b61a33c9e39bc84eab26b5131a24228cbd14e7544ee", + "sha256:b79db22be52eebb231b532d8ca80c6adae41dcaa996a1a47e17f6125664c218b", + "sha256:c16d95ac261eb85c65c6e2d3e7babfcf36373ea6e48f95a1ec1320b2c499d226", + "sha256:cbced42fa8a80b634aa3b31b8542dde9f3b9e6169570f833bd250750fbf70657", + "sha256:cc4478ef9958b695617ed2342b0c68ffd5fb43c0e634cbf2f95b82b46659375b", + "sha256:d350738033aa9656d58cb1f71d67d063a4062b04b7b2f62411660a40bd4e93f2", + "sha256:d35684c402a4985cef399038e5dfbd084258dc6c4c95fb986079a78b47a5d9be", + "sha256:d496ee7655fc0c25d9519f61722d25d54ab8a59fac5c20bb899563138567b32d", + "sha256:dd43e930626be0cd5986f046891f2b8aec228f6914d90e00e94184ed64f172e7", + "sha256:e654af2cd2119cee63d52c135c65d5fea7397ab55a7606fc2c28585067a0b5c9", + "sha256:f0c851b6cd126e7f65740ecc8079148789ff25bb61b9685089b9d692298b5dac", + "sha256:f6563ed0f661f68d62c0b40c872a9e42c344e1cec1a11b78df111dcdc0ddbe4a" + ], + "index": "pypi", + "version": "==0.0.54" + }, + "ruff": { + "hashes": [ + "sha256:14019a06dbe29b608f6b7cbcec300e3170a8d86efaddb7b23405cb7f7dcaf780", + "sha256:16d717b1d57b2e2fd68bd0bf80fb43931b79d05a7131aa477d66fc40fbd86268", + "sha256:284c2e3f3396fb05f5f803c9fffb53ebbe09a3ebe7dda2929ed8d73ded736deb", + "sha256:384154a1c3f4bf537bac69f33720957ee49ac8d484bfc91720cc94172026ceed", + "sha256:6d795d7639212c2dfd01991259460101c22aabf420d9b943f153ab9d9706e6a9", + "sha256:6ea874950daca5697309d976c9afba830d3bf0ed66887481d6bca1673fc5b66a", + "sha256:704977a658131651a22b5ebeb28b717ef42ac6ee3b11e91dc87b633b5d83142b", + "sha256:72584676164e15a68a15778fd1b17c28a519e7a0622161eb2debdcdabdc71883", + "sha256:7663a6d78f6adb0eab270fa9cf1ff2d28618ca3a652b60f2a234d92b9ec89066", + "sha256:9678d5c9b43315f323af2233a04d747409d1e3aa6789620083a82d1066a35199", + "sha256:a7354f921e3fbe04d2a62d46707e569f9315e1a613307f7311a935743c51a764", + "sha256:aad360893e92486662ef3be0a339c5ca3c1b109e0134fcd37d534d4be9fb8de3", + "sha256:d05f8d6f0c3cce5026cecd83b7a143dcad503045857bc49662f736437380ad45", + "sha256:e14a3a095d07560a9d6769a72f781d73259655919d9b396c650fc98a8157555d", + "sha256:e9d5ce97cacc99878aa0d084c626a15cd21e6b3d53fd6f9112b7fc485918e1fa", + "sha256:eeceb78da8afb6de0ddada93112869852d04f1cd0f6b80fe464fd4e35c330913", + "sha256:fc95aac2943ddf360376be9aa3107c8cf9640083940a8c5bd824be692d2216dc" + ], + "index": "pypi", + "version": "==0.4.8" + }, + "six": { + "hashes": [ + "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", + "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.16.0" + }, + "stack-data": { + "hashes": [ + "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9", + "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695" + ], + "version": "==0.6.3" + }, + "traitlets": { + "hashes": [ + "sha256:9ed0579d3502c94b4b3732ac120375cda96f923114522847de4b3bb98b96b6b7", + "sha256:b74e89e397b1ed28cc831db7aea759ba6640cb3de13090ca145426688ff1ac4f" + ], + "markers": "python_version >= '3.8'", + "version": "==5.14.3" + }, + "typing-extensions": { + "hashes": [ + "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d", + "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8" + ], + "markers": "python_version < '3.12'", + "version": "==4.12.2" + }, + "wcwidth": { + "hashes": [ + "sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859", + "sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5" + ], + "version": "==0.2.13" + } + } +} diff --git a/flake.nix b/flake.nix index 9eb9f9c..b7d4df2 100644 --- a/flake.nix +++ b/flake.nix @@ -16,7 +16,7 @@ inherit system overlays; }; - python3 = pkgs.python312; + python3 = pkgs.python3; rust_toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; nativeBuildInputs = [ @@ -36,7 +36,7 @@ # Build tools pkgs.maturin # Python - pkgs.pyenv + (pkgs.pipenv.override { inherit python3; }) ]; naersk' = pkgs.callPackage naersk {