├── templates └── app │ ├── README.md │ ├── app │ └── __init__.py │ ├── poetry.lock │ └── pyproject.toml ├── tests ├── extras │ ├── extras.py │ ├── default.nix │ └── pyproject.toml ├── in-list │ ├── inlist.py │ ├── default.nix │ └── pyproject.toml ├── awscli │ ├── test_awscli.py │ ├── default.nix │ └── pyproject.toml ├── bcrypt │ ├── test_bcrypt.py │ ├── default.nix │ └── pyproject.toml ├── pyqt6 │ ├── test_pyqt6.py │ ├── default.nix │ └── pyproject.toml ├── source-filter │ ├── testhest │ ├── ignored.pyc │ ├── .gitignore │ ├── __pycache__ │ │ └── somefile │ ├── trivial │ │ └── __init__.py │ ├── pyproject.toml │ └── default.nix ├── env │ ├── trivial │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── gdal │ ├── gdal_test │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── legacy │ ├── legacy │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── manylinux │ ├── test │ │ └── __init__.py │ ├── pyproject.toml │ └── default.nix ├── operators │ ├── operators_test.py │ ├── default.nix │ └── pyproject.toml ├── pendulum │ ├── test_pendulum.py │ ├── default.nix │ └── pyproject.toml ├── trivial │ ├── trivial │ │ └── __init__.py │ ├── dist │ │ ├── trivial-0.1.0.tar.gz │ │ └── trivial-0.1.0-py3-none-any.whl │ ├── default.nix │ └── pyproject.toml ├── affine │ ├── affine_test │ │ └── __init__.py │ ├── default.nix │ ├── pyproject.toml │ └── poetry.lock ├── git-deps │ ├── git_deps │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── path-deps │ ├── path_deps │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── prefer-wheel │ ├── test_preferwheel.py │ └── pyproject.toml ├── python-versions-or │ ├── README.md │ ├── python_versions_or.py │ ├── default.nix │ └── pyproject.toml ├── scipy1_11 │ ├── scipy1_11 │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── scipy1_9 │ ├── scipy1_9 │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── shapely │ ├── shapely_test │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── trivial-poetry-1_2_0 │ ├── README.md │ ├── trivial_poetry_1_2_0 │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── wandb │ ├── wandb_build │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── closure-size │ ├── closure_size │ │ ├── __init__.py │ │ └── main.py │ ├── pyproject.toml │ └── default.nix ├── git-deps-1_2_0 │ ├── git_deps │ │ └── __init__.py │ ├── default.nix │ ├── pyproject.toml │ └── poetry.lock ├── pytest-metadata │ ├── trivial │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── pytest-randomly │ ├── trivial │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── rasterio │ ├── rasterio_test │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── test-extras │ ├── test_extras │ │ ├── __init__.py │ │ └── test_simple.py │ ├── default.nix │ └── pyproject.toml ├── test-group │ ├── test_group │ │ ├── __init__.py │ │ └── test_simple.py │ ├── default.nix │ └── pyproject.toml ├── tzlocal │ ├── tzlocal_build │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── vllm-wheel │ ├── vllm_wheel │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── affine-pre-2-4 │ ├── affine_test │ │ └── __init__.py │ ├── default.nix │ ├── pyproject.toml │ └── poetry.lock ├── assorted-pkgs │ ├── assorted_pkgs │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── common-pkgs-1 │ ├── common_pkgs_1 │ │ └── __init__.py │ └── default.nix ├── common-pkgs-2 │ ├── common_pkgs_2 │ │ └── __init__.py │ └── default.nix ├── extended-cross │ ├── extended_cross │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── file-src-deps │ ├── file_src_deps │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── gnureadline │ ├── test_gnureadline │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── orjson-test │ ├── orjson_test_build │ │ └── __init__.py │ └── pyproject.toml ├── path-deps-develop │ ├── dep1 │ │ ├── dep1 │ │ │ └── __init__.py │ │ └── setup.py │ ├── pyproject.toml │ ├── poetry.lock │ └── default.nix ├── rpds-py-no-wheel │ ├── rpds_py_build │ │ └── __init__.py │ ├── pyproject.toml │ └── default.nix ├── rpds-py-wheel │ ├── rpds_py_build │ │ └── __init__.py │ └── pyproject.toml ├── scientific │ ├── scientific_test │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── setuptools │ ├── setuptools_test │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── shapely-pre-2 │ ├── shapely_test │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── sqlalchemy │ ├── sqlalchemy_build │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── sqlalchemy2 │ ├── sqlalchemy2_build │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── test-no-extras │ ├── test_no_extras │ │ ├── __init__.py │ │ └── test_simple.py │ ├── default.nix │ └── pyproject.toml ├── trivial-cross │ ├── trivial_cross │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── utf8-pyproject │ ├── utf8_pyproject │ │ └── __init__.py │ ├── default.nix │ ├── poetry.lock │ └── pyproject.toml ├── ansible-molecule │ ├── ansible_molecule │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── file-wheel-deps │ ├── file_wheel_deps │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── git-deps-pinned │ ├── git_deps_pinned │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── override-support │ ├── override_support │ │ └── __init__.py │ ├── pyproject.toml │ └── default.nix ├── path-deps-level2 │ ├── path_deps_level2 │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── pendulum-with-rust │ ├── test_pendulum_with_rust.py │ ├── default.nix │ └── pyproject.toml ├── canonical-module-names │ ├── canonical_module_names.py │ ├── pyproject.toml │ ├── poetry-git-overlay.nix │ └── default.nix ├── composable-defaults │ ├── composable_defaults │ │ └── __init__.py │ ├── pyproject.toml │ └── default.nix ├── editable │ ├── src │ │ └── trivial │ │ │ └── __main__.py │ ├── poetry.lock │ ├── pyproject.toml │ └── default.nix ├── file-src-deps-level2 │ ├── file_src_deps_level2 │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── file-wheel-deps-level2 │ ├── file_wheel_deps_level2 │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── override-default-support │ ├── override_support │ │ └── __init__.py │ ├── pyproject.toml │ └── default.nix ├── virtualenv-post-20-18 │ ├── virtualenv_post_20_18 │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── virtualenv-pre-20-18 │ ├── virtualenv_pre_20_18 │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── text-generation-webui │ ├── text_generation_webui_build │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── editable-egg │ ├── paste.ini │ ├── src │ │ └── trivial │ │ │ └── __init__.py │ └── pyproject.toml ├── cdk-nag │ ├── default.nix │ └── pyproject.toml ├── use-url-src │ ├── use_url_src │ │ └── main.py │ ├── pyproject.toml │ └── default.nix ├── tensorflow │ ├── default.nix │ └── pyproject.toml ├── gobject-introspection │ ├── gobject_introspection_test │ │ └── __init__.py │ ├── default.nix │ └── pyproject.toml ├── use-url-wheel │ ├── whl_test │ │ └── main.py │ ├── default.nix │ └── pyproject.toml ├── markupsafe2 │ ├── default.nix │ └── pyproject.toml ├── gitlint │ ├── default.nix │ └── pyproject.toml ├── pyside6 │ ├── test_pyside6 │ │ └── __init__.py │ ├── pyproject.toml │ └── default.nix ├── gitlint-core │ ├── default.nix │ └── pyproject.toml ├── jupyterlab │ ├── default.nix │ └── pyproject.toml ├── cattrs │ ├── default.nix │ └── pyproject.toml ├── jupyterlab-3 │ ├── default.nix │ └── pyproject.toml ├── pandas │ ├── default.nix │ └── pyproject.toml ├── pyproj │ ├── default.nix │ └── pyproject.toml ├── pytesseract │ ├── pyproject.toml │ └── default.nix ├── blinker │ ├── default.nix │ ├── pyproject.toml │ └── poetry.lock ├── blinker-1_6_2 │ ├── default.nix │ ├── pyproject.toml │ └── poetry.lock ├── cattrs-pre-23-2 │ ├── default.nix │ └── pyproject.toml ├── missing-iswheel │ ├── default.nix │ └── pyproject.toml ├── mysqlclient │ ├── default.nix │ └── pyproject.toml ├── arrow │ ├── default.nix │ └── pyproject.toml ├── jupyter-ydoc │ ├── default.nix │ └── pyproject.toml ├── mutmut │ ├── default.nix │ └── pyproject.toml ├── procrastinate │ ├── default.nix │ └── pyproject.toml ├── pylint-django │ ├── default.nix │ └── pyproject.toml ├── pytest-redis │ ├── default.nix │ └── pyproject.toml ├── fiona-source │ ├── default.nix │ └── pyproject.toml ├── soundfile │ ├── default.nix │ └── pyproject.toml ├── black │ ├── default.nix │ └── pyproject.toml ├── pylint-django-pre-2-5-4 │ ├── default.nix │ └── pyproject.toml ├── mailchimp3 │ ├── default.nix │ └── pyproject.toml ├── click │ ├── default.nix │ └── pyproject.toml ├── cryptography │ ├── default.nix │ └── pyproject.toml ├── decli │ ├── default.nix │ ├── pyproject.toml │ └── poetry.lock ├── cryptography-43 │ ├── default.nix │ └── pyproject.toml ├── color-operations │ ├── default.nix │ └── pyproject.toml ├── sphinx5 │ ├── default.nix │ └── pyproject.toml ├── awsume │ ├── default.nix │ └── pyproject.toml ├── click-pre-8_1_8 │ ├── default.nix │ └── pyproject.toml ├── commitizen │ ├── default.nix │ └── pyproject.toml ├── decli-pre-0_6_2 │ ├── default.nix │ ├── pyproject.toml │ └── poetry.lock ├── plyvel │ ├── default.nix │ └── pyproject.toml ├── rfc3986-validator │ ├── default.nix │ ├── pyproject.toml │ └── poetry.lock ├── shellcheck-py │ ├── default.nix │ └── pyproject.toml ├── python-markers │ ├── default.nix │ └── pyproject.toml ├── propcache │ ├── default.nix │ └── pyproject.toml ├── no-infinite-recur-on-missing-gitignores │ ├── poetry.lock │ ├── pyproject.toml │ └── default.nix ├── apsw │ ├── default.nix │ └── pyproject.toml ├── ckzg │ ├── default.nix │ └── pyproject.toml ├── jq │ ├── default.nix │ └── pyproject.toml ├── option │ ├── default.nix │ └── pyproject.toml ├── shandy-sqlfmt │ ├── default.nix │ └── pyproject.toml ├── textual-dev │ ├── default.nix │ └── pyproject.toml ├── thrift │ ├── default.nix │ └── pyproject.toml ├── flink │ ├── pyproject.toml │ └── default.nix ├── pyzmq │ ├── default.nix │ └── pyproject.toml ├── returns │ ├── default.nix │ └── pyproject.toml ├── dependency-environment │ ├── pyproject.toml │ ├── trivial.py │ ├── default.nix │ └── poetry.lock ├── gmsh │ ├── pyproject.toml │ └── default.nix ├── pydantic-1 │ ├── pyproject.toml │ └── default.nix ├── ubersmith │ ├── default.nix │ └── pyproject.toml ├── eth-utils │ ├── default.nix │ └── pyproject.toml ├── fastapi │ ├── default.nix │ └── pyproject.toml ├── mpi4py-test │ ├── default.nix │ └── pyproject.toml ├── prefer-wheels │ ├── default.nix │ └── pyproject.toml ├── scikit-learn │ ├── pyproject.toml │ └── default.nix ├── aiopath │ ├── default.nix │ └── pyproject.toml ├── avro-python3 │ ├── default.nix │ ├── pyproject.toml │ └── poetry.lock ├── cmdstanpy │ ├── pyproject.toml │ └── default.nix ├── textual-textarea │ ├── default.nix │ └── pyproject.toml ├── watchfiles │ ├── default.nix │ └── pyproject.toml ├── fastapi-utils │ ├── default.nix │ └── pyproject.toml ├── matplotlib-3-6 │ ├── pyproject.toml │ └── default.nix ├── matplotlib-3-7 │ ├── pyproject.toml │ └── default.nix ├── matplotlib-3-9 │ ├── pyproject.toml │ └── default.nix ├── python-magic │ ├── pyproject.toml │ ├── default.nix │ └── poetry.lock ├── ruff │ ├── pyproject.toml │ └── default.nix ├── fiona-wheel │ ├── pyproject.toml │ └── default.nix ├── pyogrio │ └── pyproject.toml ├── twisted │ ├── default.nix │ └── pyproject.toml ├── argon2-cffi-bindings-python-3-12 │ ├── default.nix │ └── pyproject.toml ├── colour │ ├── pyproject.toml │ ├── default.nix │ └── poetry.lock ├── grpcio-wheel │ ├── pyproject.toml │ └── default.nix ├── mkdocstrings-wheel │ ├── default.nix │ └── pyproject.toml ├── pyodbc-wheel │ ├── pyproject.toml │ └── default.nix ├── ml-stack │ └── pyproject.toml ├── cairocffi-wheel │ ├── pyproject.toml │ └── default.nix ├── contourpy-wheel │ ├── pyproject.toml │ └── default.nix ├── duckdb-wheel │ ├── default.nix │ └── pyproject.toml ├── fancycompleter-wheel │ ├── default.nix │ └── pyproject.toml ├── ml-stack-old │ └── pyproject.toml ├── nbconvert-wheel │ ├── pyproject.toml │ └── default.nix ├── wheel-wheel │ ├── pyproject.toml │ ├── default.nix │ └── poetry.lock ├── contourpy-no-wheel │ ├── pyproject.toml │ └── default.nix ├── mkdocs-material │ ├── pyproject.toml │ └── default.nix ├── pyarrow-wheel │ ├── pyproject.toml │ └── default.nix ├── shapely-wheel │ ├── pyproject.toml │ └── default.nix ├── soundfile-wheel │ ├── pyproject.toml │ └── default.nix ├── cairocffi-no-wheel │ ├── pyproject.toml │ └── default.nix ├── jake │ ├── pyproject.toml │ └── default.nix ├── cffi-pandas-wheel │ ├── pyproject.toml │ └── default.nix ├── markdown-it-py-wheel │ ├── pyproject.toml │ └── default.nix ├── subdirectory │ ├── pyproject.toml │ └── default.nix ├── mk-poetry-packages │ └── pyproject.toml ├── dask-dataframe │ ├── default.nix │ └── pyproject.toml ├── panel-wheels │ └── pyproject.toml ├── cyclonedx-and-sarif-tools │ ├── pyproject.toml │ └── default.nix ├── git-subdirectory-hook │ ├── pyproject.toml │ └── default.nix ├── dependency-groups │ ├── pyproject.toml │ └── default.nix ├── pep600 │ ├── pyproject.toml │ └── default.nix └── fetched-projectdir │ └── default.nix ├── .envrc ├── overlay.nix ├── .gitignore ├── Makefile ├── vendor └── pyproject.nix │ ├── default.nix │ └── lib │ ├── pep518.nix │ ├── util.nix │ ├── pep599.nix │ └── default.nix ├── extensions.json ├── .mergify.yml ├── known-build-systems.json ├── hooks ├── python-requires-patch-hook.sh ├── wheel-unpack-hook.sh ├── fixup-hook.sh └── remove-special-dependencies.sh ├── tools ├── auto_version.py └── pyproject.toml ├── .github ├── renovate.json └── PULL_REQUEST_TEMPLATE.md ├── overrides ├── poetry-to-poetry-core.jq └── sort-build-systems.jq ├── generate.py ├── fetchers └── fetch-from-pypi.sh └── dev └── treefmt.nix /templates/app/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/extras/extras.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/in-list/inlist.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/awscli/test_awscli.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/bcrypt/test_bcrypt.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/pyqt6/test_pyqt6.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/source-filter/testhest: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/app/app/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/env/trivial/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/gdal/gdal_test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/legacy/legacy/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/manylinux/test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/operators/operators_test.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/pendulum/test_pendulum.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/source-filter/ignored.pyc: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/trivial/trivial/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/affine/affine_test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/git-deps/git_deps/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/path-deps/path_deps/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/prefer-wheel/test_preferwheel.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/python-versions-or/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/scipy1_11/scipy1_11/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/scipy1_9/scipy1_9/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/shapely/shapely_test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/trivial-poetry-1_2_0/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/wandb/wandb_build/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.envrc: -------------------------------------------------------------------------------- 1 | use flake 2 | watch_file ./nix/* 3 | -------------------------------------------------------------------------------- /tests/closure-size/closure_size/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/closure-size/closure_size/main.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/git-deps-1_2_0/git_deps/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/pytest-metadata/trivial/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/pytest-randomly/trivial/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/rasterio/rasterio_test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/source-filter/.gitignore: -------------------------------------------------------------------------------- 1 | testhest 2 | -------------------------------------------------------------------------------- /tests/source-filter/__pycache__/somefile: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/source-filter/trivial/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/test-extras/test_extras/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/test-group/test_group/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/tzlocal/tzlocal_build/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/vllm-wheel/vllm_wheel/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/affine-pre-2-4/affine_test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/assorted-pkgs/assorted_pkgs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/common-pkgs-1/common_pkgs_1/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/common-pkgs-2/common_pkgs_2/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/extended-cross/extended_cross/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/file-src-deps/file_src_deps/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/gnureadline/test_gnureadline/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/orjson-test/orjson_test_build/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/path-deps-develop/dep1/dep1/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/python-versions-or/python_versions_or.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/rpds-py-no-wheel/rpds_py_build/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/rpds-py-wheel/rpds_py_build/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/scientific/scientific_test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/setuptools/setuptools_test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/shapely-pre-2/shapely_test/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/sqlalchemy/sqlalchemy_build/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/sqlalchemy2/sqlalchemy2_build/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/test-no-extras/test_no_extras/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/trivial-cross/trivial_cross/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/utf8-pyproject/utf8_pyproject/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/ansible-molecule/ansible_molecule/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/file-wheel-deps/file_wheel_deps/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/git-deps-pinned/git_deps_pinned/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/override-support/override_support/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/path-deps-level2/path_deps_level2/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/pendulum-with-rust/test_pendulum_with_rust.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/canonical-module-names/canonical_module_names.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/composable-defaults/composable_defaults/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/editable/src/trivial/__main__.py: -------------------------------------------------------------------------------- 1 | print("Original") 2 | -------------------------------------------------------------------------------- /tests/file-src-deps-level2/file_src_deps_level2/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/file-wheel-deps-level2/file_wheel_deps_level2/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/override-default-support/override_support/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/trivial-poetry-1_2_0/trivial_poetry_1_2_0/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/virtualenv-post-20-18/virtualenv_post_20_18/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/virtualenv-pre-20-18/virtualenv_pre_20_18/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/text-generation-webui/text_generation_webui_build/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/editable-egg/paste.ini: -------------------------------------------------------------------------------- 1 | [app:main] 2 | use = egg:trivial 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/test-group/test_group/test_simple.py: -------------------------------------------------------------------------------- 1 | def test_simple(): 2 | assert True 3 | -------------------------------------------------------------------------------- /overlay.nix: -------------------------------------------------------------------------------- 1 | final: _prev: { 2 | poetry2nix = import ./default.nix { pkgs = final; }; 3 | } 4 | -------------------------------------------------------------------------------- /tests/test-extras/test_extras/test_simple.py: -------------------------------------------------------------------------------- 1 | def test_simple(): 2 | import black # noqa: F401 3 | -------------------------------------------------------------------------------- /tests/cdk-nag/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix }: 2 | poetry2nix.mkPoetryEnv { 3 | projectDir = ./.; 4 | } 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.egg-info 2 | result* 3 | artifacts 4 | poetry2nix-flamegraph.svg 5 | .direnv 6 | 7 | .idea/ 8 | -------------------------------------------------------------------------------- /tests/affine/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix }: 2 | poetry2nix.mkPoetryApplication { 3 | projectDir = ./.; 4 | } 5 | -------------------------------------------------------------------------------- /tests/awscli/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix }: 2 | poetry2nix.mkPoetryApplication { 3 | projectDir = ./.; 4 | } 5 | -------------------------------------------------------------------------------- /tests/shapely/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix }: 2 | poetry2nix.mkPoetryApplication { 3 | projectDir = ./.; 4 | } 5 | -------------------------------------------------------------------------------- /tests/use-url-src/use_url_src/main.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import sys 3 | 4 | 5 | def main(): 6 | pass 7 | -------------------------------------------------------------------------------- /tests/in-list/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | projectDir = ./.; 5 | } 6 | -------------------------------------------------------------------------------- /tests/affine-pre-2-4/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix }: 2 | poetry2nix.mkPoetryApplication { 3 | projectDir = ./.; 4 | } 5 | -------------------------------------------------------------------------------- /tests/virtualenv-post-20-18/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix }: 2 | poetry2nix.mkPoetryApplication { 3 | projectDir = ./.; 4 | } 5 | -------------------------------------------------------------------------------- /tests/virtualenv-pre-20-18/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix }: 2 | poetry2nix.mkPoetryApplication { 3 | projectDir = ./.; 4 | } 5 | -------------------------------------------------------------------------------- /tests/trivial/dist/trivial-0.1.0.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nix-community/poetry2nix/HEAD/tests/trivial/dist/trivial-0.1.0.tar.gz -------------------------------------------------------------------------------- /tests/legacy/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | projectDir = ./.; 6 | } 7 | -------------------------------------------------------------------------------- /tests/trivial/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | projectDir = ./.; 6 | } 7 | -------------------------------------------------------------------------------- /tests/assorted-pkgs/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | projectDir = ./.; 6 | } 7 | -------------------------------------------------------------------------------- /tests/gnureadline/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | projectDir = ./.; 6 | } 7 | -------------------------------------------------------------------------------- /tests/shapely-pre-2/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python310 }: 2 | poetry2nix.mkPoetryApplication { 3 | projectDir = ./.; 4 | python = python310; 5 | } 6 | -------------------------------------------------------------------------------- /tests/trivial/dist/trivial-0.1.0-py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nix-community/poetry2nix/HEAD/tests/trivial/dist/trivial-0.1.0-py3-none-any.whl -------------------------------------------------------------------------------- /tests/path-deps-develop/dep1/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import find_packages, setup 2 | 3 | setup( 4 | name="dep1", 5 | packages=find_packages(), 6 | ) 7 | -------------------------------------------------------------------------------- /tests/python-versions-or/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | projectDir = ./.; 6 | } 7 | -------------------------------------------------------------------------------- /tests/utf8-pyproject/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python39 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python39; 5 | projectDir = ./.; 6 | } 7 | -------------------------------------------------------------------------------- /tests/tensorflow/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python311 }: 2 | poetry2nix.mkPoetryEnv { 3 | projectDir = ./.; 4 | python = python311; 5 | preferWheels = true; 6 | } 7 | -------------------------------------------------------------------------------- /tests/test-no-extras/test_no_extras/test_simple.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | 4 | def test_simple(): 5 | with pytest.raises(ImportError): 6 | import black # noqa: F401 7 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all generate 2 | 3 | all: generate test 4 | 5 | generate: 6 | ./generate.py 7 | 8 | test: 9 | nix-shell -p python3Packages.flake8 --run 'flake8 ./*.py' 10 | -------------------------------------------------------------------------------- /tests/gobject-introspection/gobject_introspection_test/__init__.py: -------------------------------------------------------------------------------- 1 | import gi 2 | 3 | gi.require_version("Notify", "0.7") 4 | 5 | from gi.repository import Notify # noqa: E402, F401 6 | -------------------------------------------------------------------------------- /tests/use-url-wheel/whl_test/main.py: -------------------------------------------------------------------------------- 1 | import de_core_news_sm 2 | import sys 3 | 4 | 5 | def main(): 6 | nlp = de_core_news_sm.load() 7 | print(nlp("Dies ist ein Testsatz.")) 8 | -------------------------------------------------------------------------------- /tests/markupsafe2/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | } 8 | -------------------------------------------------------------------------------- /tests/bcrypt/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix }: 2 | poetry2nix.mkPoetryApplication { 3 | pyproject = ./pyproject.toml; 4 | poetrylock = ./poetry.lock; 5 | src = lib.cleanSource ./.; 6 | } 7 | -------------------------------------------------------------------------------- /tests/editable/poetry.lock: -------------------------------------------------------------------------------- 1 | package = [] 2 | 3 | [metadata] 4 | content-hash = "115cf985d932e9bf5f540555bbdd75decbb62cac81e399375fc19f6277f8c1d8" 5 | python-versions = "*" 6 | 7 | [metadata.files] 8 | -------------------------------------------------------------------------------- /vendor/pyproject.nix/default.nix: -------------------------------------------------------------------------------- 1 | { lib }: 2 | lib.fix (self: { 3 | lib = import ./lib { inherit lib; }; 4 | build = import ./build { 5 | pyproject-nix = self; 6 | inherit lib; 7 | }; 8 | }) 9 | -------------------------------------------------------------------------------- /extensions.json: -------------------------------------------------------------------------------- 1 | [ 2 | "egg", 3 | "tar", 4 | "tar.bz2", 5 | "tar.gz", 6 | "tar.lz", 7 | "tar.lzma", 8 | "tar.xz", 9 | "tbz", 10 | "tgz", 11 | "tlz", 12 | "txz", 13 | "whl", 14 | "zip" 15 | ] 16 | -------------------------------------------------------------------------------- /tests/extras/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | } 9 | -------------------------------------------------------------------------------- /tests/gdal/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python39 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python39; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | } 9 | -------------------------------------------------------------------------------- /tests/pendulum/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python39 }: 2 | poetry2nix.mkPoetryApplication { 3 | pyproject = ./pyproject.toml; 4 | poetrylock = ./poetry.lock; 5 | src = lib.cleanSource ./.; 6 | python = python39; 7 | } 8 | -------------------------------------------------------------------------------- /tests/git-deps/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | } 9 | -------------------------------------------------------------------------------- /tests/operators/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | } 9 | -------------------------------------------------------------------------------- /tests/rasterio/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python39 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python39; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | } 9 | -------------------------------------------------------------------------------- /tests/scipy1_11/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | } 9 | -------------------------------------------------------------------------------- /tests/setuptools/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | } 9 | -------------------------------------------------------------------------------- /tests/tzlocal/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python310 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python310; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | } 9 | -------------------------------------------------------------------------------- /tests/wandb/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python39 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python39; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | } 9 | -------------------------------------------------------------------------------- /.mergify.yml: -------------------------------------------------------------------------------- 1 | pull_request_rules: 2 | - name: automatic merge for Renovate pull requests 3 | conditions: 4 | - author=renovate[bot] 5 | - check-success=collect 6 | actions: 7 | merge: 8 | method: rebase 9 | -------------------------------------------------------------------------------- /tests/common-pkgs-1/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python39 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python39; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | } 9 | -------------------------------------------------------------------------------- /tests/common-pkgs-2/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python39 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python39; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | } 9 | -------------------------------------------------------------------------------- /tests/extended-cross/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, pkgsCross }: 2 | 3 | let 4 | pkgs = pkgsCross.aarch64-multiplatform; 5 | in 6 | pkgs.poetry2nix.mkPoetryApplication { 7 | python = pkgs.python3; 8 | projectDir = ./.; 9 | } 10 | -------------------------------------------------------------------------------- /tests/git-deps-1_2_0/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | } 9 | -------------------------------------------------------------------------------- /tests/gitlint/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "gitlint-test" { } '' 8 | ${env}/bin/gitlint --version > $out 9 | '' 10 | -------------------------------------------------------------------------------- /tests/pendulum-with-rust/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python39 }: 2 | poetry2nix.mkPoetryApplication { 3 | pyproject = ./pyproject.toml; 4 | poetrylock = ./poetry.lock; 5 | src = lib.cleanSource ./.; 6 | python = python39; 7 | } 8 | -------------------------------------------------------------------------------- /tests/pytest-metadata/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | } 9 | -------------------------------------------------------------------------------- /tests/scientific/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python311 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python311; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | } 9 | -------------------------------------------------------------------------------- /tests/scipy1_9/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python311 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python311; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | } 9 | -------------------------------------------------------------------------------- /tests/sqlalchemy/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python310 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python310; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | } 9 | -------------------------------------------------------------------------------- /tests/sqlalchemy2/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python310 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python310; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | } 9 | -------------------------------------------------------------------------------- /tests/trivial-cross/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, pkgsCross }: 2 | 3 | let 4 | pkgs = pkgsCross.aarch64-multiplatform; 5 | in 6 | pkgs.poetry2nix.mkPoetryApplication { 7 | python = pkgs.python3; 8 | projectDir = ./.; 9 | } 10 | -------------------------------------------------------------------------------- /tests/pyside6/test_pyside6/__init__.py: -------------------------------------------------------------------------------- 1 | from PySide6.QtCore import QPoint 2 | import sys 3 | 4 | 5 | def main(): 6 | print(QPoint(2.5, 6.0)) 7 | 8 | print("Success") 9 | 10 | 11 | if __name__ == "__main__": 12 | main() 13 | -------------------------------------------------------------------------------- /known-build-systems.json: -------------------------------------------------------------------------------- 1 | [ 2 | "cython", 3 | "cython_0", 4 | "flit", 5 | "flit-core", 6 | "hatch-vcs", 7 | "hatchling", 8 | "pbr", 9 | "pdm-backend", 10 | "poetry-core", 11 | "setuptools", 12 | "setuptools-scm" 13 | ] 14 | -------------------------------------------------------------------------------- /tests/gitlint-core/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "gitlint-core-test" { } '' 8 | ${env}/bin/gitlint --version > $out 9 | '' 10 | -------------------------------------------------------------------------------- /tests/jupyterlab/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "jupyterlab-test" { } '' 8 | ${env}/bin/jupyter-lab --version > $out 9 | '' 10 | -------------------------------------------------------------------------------- /tests/cattrs/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "cattrs-test" { } '' 8 | ${env}/bin/python -c 'import cattrs' 9 | touch $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/jupyterlab-3/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "jupyterlab-3-test" { } '' 8 | ${env}/bin/jupyter-lab --version > $out 9 | '' 10 | -------------------------------------------------------------------------------- /tests/pandas/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "pandas-test" { } '' 8 | ${env}/bin/python -c 'import pandas' 9 | touch $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/pyproj/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "pyproj-test" { } '' 8 | ${env}/bin/python -c 'import pyproj' 9 | touch $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/pytesseract/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "pytesseract-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | pytesseract = "*" 10 | -------------------------------------------------------------------------------- /tests/blinker/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "blinker-test" { } '' 8 | ${env}/bin/python -c 'import blinker' 9 | touch $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/path-deps/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | pwd = ./.; 9 | } 10 | -------------------------------------------------------------------------------- /tests/blinker-1_6_2/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "blinker-test" { } '' 8 | ${env}/bin/python -c 'import blinker' 9 | touch $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/cattrs-pre-23-2/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "cattrs-test" { } '' 8 | ${env}/bin/python -c 'import cattrs' 9 | touch $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/missing-iswheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3 }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | env.python.pkgs.mkdocstrings 10 | -------------------------------------------------------------------------------- /tests/mysqlclient/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "mysqlclient-test" { } '' 8 | ${env}/bin/python -c 'import MySQLdb' 9 | touch $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/arrow/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "arrow-test" { } '' 8 | ${env}/bin/python -c 'import arrow; print(arrow.__version__)' > $out 9 | '' 10 | -------------------------------------------------------------------------------- /tests/file-wheel-deps/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | pwd = ./.; 9 | } 10 | -------------------------------------------------------------------------------- /tests/path-deps-level2/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | pwd = ./.; 9 | } 10 | -------------------------------------------------------------------------------- /tests/pyqt6/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python310 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python310; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | preferWheels = true; 9 | } 10 | -------------------------------------------------------------------------------- /hooks/python-requires-patch-hook.sh: -------------------------------------------------------------------------------- 1 | poetry2nix-python-requires-patch-hook() { 2 | if [ -z "${dontFixupPythonRequires-}" ]; then 3 | @pythonInterpreter@ @patchScript@ @pythonPath@ 4 | fi 5 | } 6 | 7 | postPatchHooks+=(poetry2nix-python-requires-patch-hook) 8 | -------------------------------------------------------------------------------- /tests/file-wheel-deps-level2/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | pwd = ./.; 9 | } 10 | -------------------------------------------------------------------------------- /tests/jupyter-ydoc/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "jupyter-ydoc-test" { } '' 8 | ${env}/bin/python -c 'import jupyter_ydoc' 9 | touch $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/mutmut/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python310, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | python = python310; 6 | }; 7 | in 8 | runCommand "mutmut-test" { } '' 9 | ${env}/bin/mutmut version > $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/procrastinate/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix 2 | , runCommand 3 | , 4 | }: 5 | let 6 | env = poetry2nix.mkPoetryEnv { 7 | projectDir = ./.; 8 | }; 9 | in 10 | runCommand "procrastinate-test" { } '' 11 | ${env}/bin/procrastinate --version > $out 12 | '' 13 | -------------------------------------------------------------------------------- /tests/pylint-django/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "pylint-django-test" { } '' 8 | ${env}/bin/python -c 'import pylint_django' 9 | touch $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/pytest-redis/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "pytest-redis-test" { } '' 8 | ${env}/bin/python -c 'import pytest_redis' 9 | touch $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/fiona-source/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "fiona-source-test" { } '' 8 | ${env}/bin/python -c 'import fiona; print(fiona.__version__)' > $out 9 | '' 10 | -------------------------------------------------------------------------------- /tests/soundfile/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "soundfile" { } '' 8 | ${env}/bin/python -c 'import soundfile; print(soundfile.__version__)' > $out 9 | '' 10 | -------------------------------------------------------------------------------- /tests/black/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "black-test" { } '' 8 | ${env}/bin/python -c 'import black' 9 | ${env}/bin/black --version 10 | touch $out 11 | '' 12 | -------------------------------------------------------------------------------- /tests/pylint-django-pre-2-5-4/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "pylint-django-test" { } '' 8 | ${env}/bin/python -c 'import pylint_django' 9 | touch $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/ansible-molecule/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python310 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python310; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | dontCheckRuntimeDeps = true; 9 | } 10 | -------------------------------------------------------------------------------- /tests/mailchimp3/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "mailchimp3-test" { } '' 8 | ${env}/bin/python -c 'import mailchimp3; mailchimp3.MailChimp' 9 | touch $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/text-generation-webui/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python310 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python310; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | preferWheels = true; 9 | } 10 | -------------------------------------------------------------------------------- /templates/app/poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. 2 | package = [] 3 | 4 | [metadata] 5 | lock-version = "2.0" 6 | python-versions = "^3.11" 7 | content-hash = "81b2fa642d7f2d1219cf80112ace12d689d053d81be7f7addb98144d56fc0fb2" 8 | -------------------------------------------------------------------------------- /tests/click/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python310, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | python = python310; 6 | }; 7 | in 8 | runCommand "click-test" { } '' 9 | ${env}/bin/python -c 'import click' 10 | touch $out 11 | '' 12 | -------------------------------------------------------------------------------- /tests/cryptography/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "cryptography-test" { } '' 8 | ${env}/bin/python -c 'import cryptography; print(cryptography.__version__)' > $out 9 | '' 10 | -------------------------------------------------------------------------------- /tests/decli/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python310, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | python = python310; 6 | }; 7 | in 8 | runCommand "decli-test" { } '' 9 | ${env}/bin/python -c 'import decli' 10 | touch $out 11 | '' 12 | -------------------------------------------------------------------------------- /tests/cryptography-43/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "cryptography-test" { } '' 8 | ${env}/bin/python -c 'import cryptography; print(cryptography.__version__)' > $out 9 | '' 10 | -------------------------------------------------------------------------------- /tests/utf8-pyproject/poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. 2 | package = [] 3 | 4 | [metadata] 5 | lock-version = "2.0" 6 | python-versions = "^3.9" 7 | content-hash = "ce2aa767160f871dd3652615ba0a0dceb7733d62eb8cb4665b87f30a562e3adf" 8 | -------------------------------------------------------------------------------- /tests/color-operations/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "color-operations-test" { } '' 8 | ${env}/bin/python -c 'import color_operations; print(color_operations.__version__)' > $out 9 | '' 10 | -------------------------------------------------------------------------------- /tests/sphinx5/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | projectDir = ./.; 6 | }; 7 | in 8 | runCommand "sphinx5-test" { } '' 9 | ${env}/bin/python -c 'import sphinx; print(sphinx.__version__)' > $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/awsume/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | projectDir = ./.; 6 | }; 7 | in 8 | runCommand "awsume-test" { } '' 9 | "${lib.getExe env}" -c 'import awsume; print(awsume.__VERSION__)' > $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/click-pre-8_1_8/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python310, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | python = python310; 6 | }; 7 | in 8 | runCommand "click-pre-8_1_8-test" { } '' 9 | ${env}/bin/python -c 'import click' 10 | touch $out 11 | '' 12 | -------------------------------------------------------------------------------- /tests/commitizen/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python310, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | python = python310; 6 | }; 7 | in 8 | runCommand "commitizen-test" { } '' 9 | ${env}/bin/cz ls | grep -q "cz_gitmoji" || exit 1 10 | touch $out 11 | '' 12 | -------------------------------------------------------------------------------- /tests/decli-pre-0_6_2/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python310, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | python = python310; 6 | }; 7 | in 8 | runCommand "decli-pre-0_6_2-test" { } '' 9 | ${env}/bin/python -c 'import decli' 10 | touch $out 11 | '' 12 | -------------------------------------------------------------------------------- /tests/plyvel/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | projectDir = ./.; 6 | }; 7 | in 8 | runCommand "plyvel-test" { } '' 9 | "${lib.getExe env}" -c 'import plyvel; print(plyvel.__version__)' > $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/rfc3986-validator/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "rfc3986-validator-test" { } '' 8 | ${env}/bin/python -c 'import rfc3986_validator; print(rfc3986_validator.__version__)' > $out 9 | '' 10 | -------------------------------------------------------------------------------- /tests/shellcheck-py/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | }; 6 | in 7 | runCommand "shellcheck-py-test" { } '' 8 | ${env}/bin/python -c 'import os; assert os.path.isfile("${env}/bin/shellcheck")' 9 | touch $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/python-markers/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | projectDir = ./.; 6 | }; 7 | in 8 | runCommand "python-markers-test" { } '' 9 | ${env}/bin/python -c 'import plum; print(plum.__version__)' > $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/propcache/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python310, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python310; 5 | projectDir = ./.; 6 | }; 7 | in 8 | runCommand "propcache-test" { } '' 9 | ${env}/bin/python -c 'import propcache; print(propcache.__version__)' > $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/no-infinite-recur-on-missing-gitignores/poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. 2 | package = [] 3 | 4 | [metadata] 5 | lock-version = "2.0" 6 | python-versions = "^3.10" 7 | content-hash = "53f2eabc9c26446fbcc00d348c47878e118afc2054778c3c803a0a8028af27d9" 8 | -------------------------------------------------------------------------------- /tests/apsw/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "apsw-test" { } '' 10 | ${env}/bin/python -c 'import apsw' 11 | touch $out 12 | '' 13 | -------------------------------------------------------------------------------- /tests/ckzg/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "ckzg-test" { } '' 10 | ${env}/bin/python -c 'import ckzg' 11 | touch $out 12 | '' 13 | -------------------------------------------------------------------------------- /tests/cryptography/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test_cryptography" 3 | version = "0.1.0" 4 | description = "" 5 | authors = [] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | cryptography = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/cryptography-43/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test_cryptography" 3 | version = "0.1.0" 4 | description = "" 5 | authors = [] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | cryptography = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/env/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "env-test" 10 | { } '' 11 | ${env}/bin/python -c 'import alembic' 12 | touch $out 13 | '' 14 | -------------------------------------------------------------------------------- /tests/jq/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python311, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python311; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "jq-test" 10 | { } '' 11 | ${env}/bin/python -c 'import jq' 12 | touch $out 13 | '' 14 | -------------------------------------------------------------------------------- /tests/black/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "black-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | black = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/mutmut/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "mutmut-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | mutmut = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/option/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "option-test" 10 | { } '' 11 | ${env}/bin/python -c 'import option' 12 | touch $out 13 | '' 14 | -------------------------------------------------------------------------------- /tests/shandy-sqlfmt/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "shandy-sqlfmt-test" { } '' 10 | ${env}/bin/python -c 'import sqlfmt' > $out 11 | '' 12 | -------------------------------------------------------------------------------- /tests/textual-dev/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "textual-dev-test" { } '' 10 | ${env}/bin/python -c 'import textual_dev' > $out 11 | '' 12 | -------------------------------------------------------------------------------- /tests/thrift/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python312, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python312; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "thrift-test" { } '' 10 | ${env}/bin/python -c 'import thrift' 11 | touch $out 12 | '' 13 | -------------------------------------------------------------------------------- /tests/thrift/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "thrift-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["You "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.11" 9 | thrift = "^0.20.0" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/cattrs/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "cattrs-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | cattrs = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/cdk-nag/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "cdk-nag-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | cdk-nag = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/click/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "click-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | click = ">=8.1.8" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/decli/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "decli-tests" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | decli = ">=0.6.2" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/flink/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "flink-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["You "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.11" 9 | apache-flink = "^1.19.0" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/gitlint/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "gitlint-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | gitlint = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/gobject-introspection/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, poetry2nix, python310 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python310; 5 | projectDir = ./.; 6 | pythonImportsCheck = [ "gobject_introspection_test" ]; 7 | 8 | buildInputs = [ pkgs.libnotify ]; 9 | nativeBuildInputs = [ pkgs.gobject-introspection ]; 10 | } 11 | -------------------------------------------------------------------------------- /tests/pandas/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "pandas-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | pandas = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/pyproj/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "pyproj-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.11" 9 | pyproj = "3.5.0" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/pyzmq/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "pyzmq-test" { } '' 10 | ${env}/bin/python -c 'import zmq; print(zmq.__version__)' > $out 11 | '' 12 | -------------------------------------------------------------------------------- /tests/returns/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "returns-test" 10 | { } '' 11 | ${env}/bin/python -c 'import returns' 12 | touch $out 13 | '' 14 | -------------------------------------------------------------------------------- /tests/scipy1_9/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "scipy1_9" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | scipy = "~1.9.0" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/blinker/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "blinker-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | blinker = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/ckzg/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-ckzg" 3 | version = "0.1.0" 4 | description = "Test ckzg" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | ckzg = "^1" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/dependency-environment/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "trivial" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | gunicorn = "*" 9 | 10 | [build-system] 11 | requires = ["poetry-core"] 12 | build-backend = "poetry.core.masonry.api" 13 | -------------------------------------------------------------------------------- /tests/editable/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "trivial" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | packages = [ 7 | { include = "trivial", from = "src" }, 8 | ] 9 | 10 | [build-system] 11 | requires = ["poetry-core"] 12 | build-backend = "poetry.core.masonry.api" 13 | -------------------------------------------------------------------------------- /tests/gmsh/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test_gmsh" 3 | version = "0.1.0" 4 | description = "" 5 | authors = [] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | gmsh = "*" 10 | 11 | [tool.poetry.dev-dependencies] 12 | 13 | [build-system] 14 | requires = ["poetry-core"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/pydantic-1/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "pydantic-1-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["You "] 6 | 7 | [tool.poetry.dependencies] 8 | python = ">=3.7" 9 | pydantic = "^1.0.0" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/scipy1_11/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "scipy1_11" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | scipy = "~1.11.0" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/tzlocal/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "tzlocal-build" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | trino = "0.322" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.5"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/ubersmith/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "ubersmith-test" 10 | { } '' 11 | ${env}/bin/python -c 'import ubersmith' 12 | touch $out 13 | '' 14 | -------------------------------------------------------------------------------- /tests/bcrypt/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test_bcrypt" 3 | version = "0.1.0" 4 | description = "" 5 | authors = [] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | bcrypt = "*" 10 | 11 | [tool.poetry.dev-dependencies] 12 | 13 | [build-system] 14 | requires = ["poetry-core"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/eth-utils/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python311, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python311; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "eth-utils-test" 10 | { } '' 11 | ${env}/bin/python -c 'import eth_utils' 12 | touch $out 13 | '' 14 | -------------------------------------------------------------------------------- /tests/fastapi/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "fastapi-test" { } '' 10 | ${env}/bin/python -c 'import fastapi; print(fastapi.__version__)' > $out 11 | '' 12 | -------------------------------------------------------------------------------- /tests/gmsh/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | poetry2nix, 3 | python3, 4 | runCommand, 5 | }: 6 | let 7 | env = poetry2nix.mkPoetryEnv { 8 | python = python3; 9 | pyproject = ./pyproject.toml; 10 | poetrylock = ./poetry.lock; 11 | }; 12 | in 13 | runCommand "gmsh-test" { } '' 14 | ${env}/bin/python -c 'import gmsh' 15 | touch $out 16 | '' 17 | -------------------------------------------------------------------------------- /tests/mpi4py-test/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "mpi4py-test" { } '' 10 | ${env}/bin/python -c 'import mpi4py; print(mpi4py.__version__)' > $out 11 | '' 12 | -------------------------------------------------------------------------------- /tests/orjson-test/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "orjson-test-build" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | orjson = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/prefer-wheels/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | py = poetry2nix.mkPoetryPackages { 4 | python = python3; 5 | projectDir = ./.; 6 | preferWheels = true; 7 | }; 8 | isWheelAttr = py.python.pkgs.maturin.src.isWheel or false; 9 | in 10 | assert isWheelAttr; runCommand "prefer-wheels" { } "touch $out" 11 | -------------------------------------------------------------------------------- /tests/pyzmq/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-pyzmq" 3 | version = "0.1.0" 4 | description = "Test of pyzmq" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | pyzmq = ">=26" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/scikit-learn/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "scikit-learn-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["You "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.11" 9 | scikit-learn = "^1.5" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/aiopath/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "aiopath-test" 10 | { } '' 11 | ${env}/bin/python -c 'from aiopath import AsyncPath' 12 | touch $out 13 | '' 14 | -------------------------------------------------------------------------------- /tests/avro-python3/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "avro-python3-test" { } '' 10 | ${env}/bin/python -c 'import avro; print(avro.__version__)' > $out 11 | '' 12 | -------------------------------------------------------------------------------- /tests/blinker-1_6_2/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "blinker-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | blinker = "<1.6.3" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/cattrs-pre-23-2/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "cattrs-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | cattrs = "23.1.2" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/click-pre-8_1_8/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "click-pre-8_1_8" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | click = "<8.1.8" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/cmdstanpy/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "cmdstanpy-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | cmdstanpy = "^1.1" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.5"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/decli-pre-0_6_2/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "decli-pre-0_6_2" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | decli = "<0.6.2" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/gitlint-core/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "gitlint-core-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | gitlint-core = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/jq/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-jq" 3 | version = "0.1.0" 4 | description = "Test of python jq package" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.6" 9 | jq = "^1.2.1" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/jupyter-ydoc/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-jupyter-ydoc" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | jupyter-ydoc = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/mailchimp3/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "mailchimp3-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | mailchimp3 = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/mysqlclient/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "mysqlclient-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | mysqlclient = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/procrastinate/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "procrastinate-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | procrastinate = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/setuptools/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "setuptools_test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | setuptools = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/shandy-sqlfmt/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "shandy-sqlfmt-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["You "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | shandy-sqlfmt = "^0.19.2" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/soundfile/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "soundfile-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | soundfile = "^0.12.1" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/textual-dev/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "textual-dev-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["You "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | textual-dev = "^1.1.0" 10 | 11 | 12 | [build-system] 13 | requires = ["poetry-core"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/textual-textarea/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python311, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python311; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "textual-textarea-test" { } '' 10 | ${env}/bin/python -c 'import textual_textarea' > $out 11 | '' 12 | -------------------------------------------------------------------------------- /tests/watchfiles/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "watchfiles-test" { } '' 10 | ${env}/bin/python -c 'from watchfiles import watch' 11 | touch $out 12 | '' 13 | -------------------------------------------------------------------------------- /tests/apsw/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-apsw" 3 | version = "0.1.0" 4 | description = "Test of python apsw package" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | apsw = "^3" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/avro-python3/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "avro-python3-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | avro-python3 = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.5"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/commitizen/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "commitizen-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | cz-conventional-gitmoji = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/fastapi-utils/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python311, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python311; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "fastapi-utils-test" 10 | { } '' 11 | ${env}/bin/python -c 'import fastapi_utils' 12 | touch $out 13 | '' 14 | -------------------------------------------------------------------------------- /tests/in-list/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "inlist" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | SQLAlchemy = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.0.0"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/manylinux/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | opencv-python = "^4.9.0.80" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/matplotlib-3-6/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "matplotlib-3-6" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | matplotlib = "<3.7" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/matplotlib-3-7/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "matplotlib-3-7" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | matplotlib = "~3.7" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/matplotlib-3-9/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "matplotlib-3-9" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | matplotlib = "~3.9" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/pytest-randomly/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python39, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python39; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "pytest_randomly" 10 | { } '' 11 | ${env}/bin/python -c 'import pytest_randomly' 12 | touch $out 13 | '' 14 | -------------------------------------------------------------------------------- /tests/python-magic/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "python-magic-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | python-magic = "^0.4" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.5"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/ruff/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-ruff" 3 | version = "0.1.0" 4 | description = "Test of the ruff package" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.11" 9 | ruff = "0.8.6" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/sphinx5/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-sphinx5" 3 | version = "0.1.0" 4 | description = "Test of sphinx 5+" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | sphinx = "^5" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/sqlalchemy/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "sqlalchemy-build" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | sqlalchemy = "1.4.47" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.5"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/sqlalchemy2/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "sqlalchemy2-build" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | sqlalchemy = "^2" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.5"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/tensorflow/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-tensorflow" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = ">=3.9, <3.12" 9 | tensorflow = "^2.14" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /templates/app/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "app" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | license = "MIT" 7 | readme = "README.md" 8 | 9 | [tool.poetry.dependencies] 10 | python = "^3.11" 11 | 12 | 13 | [build-system] 14 | requires = ["poetry-core"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/arrow/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test_arrow" 3 | version = "0.1.0" 4 | description = "" 5 | authors = [] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" # https://github.com/arrow-py/arrow/blob/master/CHANGELOG.rst 9 | arrow = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/fiona-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "fiona-wheel" 3 | version = "0.1.0" 4 | description = "Test of fiona wheel" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | fiona = "^1.9.6" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/mpi4py-test/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-mpi4py" 3 | version = "0.1.0" 4 | description = "Test of mpi4py" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | mpi4py = "^3.1.6" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/plyvel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "plyvel-test" 3 | version = "0.1.0" 4 | description = "Test of plyvel package" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | plyvel = "^1.5.0" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/propcache/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "propcache-test" 3 | version = "0.1.0" 4 | description = "Test of propcache" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | propcache = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/pylint-django/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "pylint-django-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | pylint-django = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/pyogrio/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-pyogrio" 3 | version = "0.1.0" 4 | description = "Test of pyogrio" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | pyogrio = "^0.9.0" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/env/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "trivial" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.6" 9 | alembic = "1.0.10" 10 | Flask = "^1.1.1" 11 | 12 | [build-system] 13 | requires = ["poetry-core"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/fiona-source/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "fiona-source" 3 | version = "0.1.0" 4 | description = "Test of fiona source" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | fiona = ">=1.9" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/git-deps-pinned/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, lib, poetry2nix, python311 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python311; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | 9 | overrides = poetry2nix.overrides.withDefaults (import ./poetry-git-overlay.nix { inherit pkgs; }); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /tests/pendulum/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test_pendulum" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | license = "MIT" 7 | 8 | [tool.poetry.dependencies] 9 | python = "^3.11" 10 | pendulum = "^3.0.0" 11 | 12 | [build-system] 13 | requires = ["poetry-core"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/textual-textarea/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "textual-textarea-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["You "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | textual-textarea = "^0.7.0" 10 | 11 | 12 | [build-system] 13 | requires = ["poetry-core"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/twisted/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python311, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python311; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "twisted-test" 10 | { } '' 11 | ${env}/bin/python -c 'from twisted.web import server, resource' 12 | touch $out 13 | '' 14 | -------------------------------------------------------------------------------- /tests/virtualenv-post-20-18/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "virtualenv-post-20-18" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | virtualenv = "20.18.0" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/virtualenv-pre-20-18/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "virtualenv-pre-20-18" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | virtualenv = "<20.18" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/argon2-cffi-bindings-python-3-12/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python312, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | python = python312; 6 | }; 7 | in 8 | runCommand "argon2-cffi-bindings-python-3-12-test" { } '' 9 | ${env}/bin/python -c 'import _cffi_backend as backend; print(backend.__version__)' > $out 10 | '' 11 | -------------------------------------------------------------------------------- /tests/argon2-cffi-bindings-python-3-12/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test_argon2_cffi_bindings_python_3_12" 3 | version = "0.1.0" 4 | description = "" 5 | authors = [] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.12" 9 | argon2-cffi-bindings = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/awscli/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test_awscli" 3 | version = "0.1.0" 4 | description = "" 5 | authors = [] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | awscli = "*" 10 | awscli-cwlogs = "*" 11 | 12 | [tool.poetry.dev-dependencies] 13 | 14 | [build-system] 15 | requires = ["poetry-core"] 16 | build-backend = "poetry.core.masonry.api" 17 | -------------------------------------------------------------------------------- /tests/colour/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-colour" 3 | version = "0.1.0" 4 | description = "Test of python colour package" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | colour = "^0.1.5" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/fastapi/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-fastapi" 3 | version = "0.1.0" 4 | description = "Test of python fastapi package" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | fastapi = "^0.111" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/no-infinite-recur-on-missing-gitignores/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-infrec" 3 | version = "0.1.0" 4 | description = "Test of nix infrec" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | 10 | [build-system] 11 | requires = ["poetry-core>=1"] 12 | build-backend = "poetry.core.masonry.api" 13 | -------------------------------------------------------------------------------- /tests/path-deps/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "path-deps" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.6" 9 | trivial = { path = "../trivial" } 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/test-extras/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python310 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python310; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | extras = [ "more" ]; 9 | 10 | checkPhase = '' 11 | runHook preCheck 12 | pytest 13 | runHook postCheck 14 | ''; 15 | } 16 | -------------------------------------------------------------------------------- /tests/test-no-extras/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python310 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python310; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | extras = [ ]; 9 | 10 | checkPhase = '' 11 | runHook preCheck 12 | pytest 13 | runHook postCheck 14 | ''; 15 | } 16 | -------------------------------------------------------------------------------- /tests/trivial/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "trivial" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | alembic = "^1.0.10" 10 | Flask = "^1.1.1" 11 | 12 | [build-system] 13 | requires = ["poetry-core"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/twisted/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-twisted" 3 | version = "0.1.0" 4 | description = "Test of python twisted package" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.6" 9 | twisted = "^24.3.0" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/watchfiles/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-watchfiles" 3 | version = "0.1.0" 4 | description = "" 5 | authors = [] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | watchfiles = "0.24.0" 10 | 11 | [tool.poetry.dev-dependencies] 12 | 13 | [build-system] 14 | requires = ["poetry-core>=1.0.0"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/affine/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "affine-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "~3.10" 9 | affine = "*" 10 | 11 | [tool.poetry.dev-dependencies] 12 | 13 | [build-system] 14 | requires = ["poetry-core>=1"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/eth-utils/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "eth-utils-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.11" 9 | eth-utils = "^5.1.0" 10 | eth-hash = "^0.7.0" 11 | 12 | 13 | [build-system] 14 | requires = ["poetry-core"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/fiona-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = true; 8 | }; 9 | in 10 | runCommand "fiona-test" { } '' 11 | ${env}/bin/python -c 'import fiona; print(fiona.__version__)' > $out 12 | '' 13 | -------------------------------------------------------------------------------- /tests/grpcio-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-grpcio-wheel" 3 | version = "0.1.0" 4 | description = "Test of wheel for grpcio" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | grpcio = "^1.51.1" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/mkdocstrings-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3 }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = true; 8 | }; 9 | pkg = env.python.pkgs.mkdocstrings; 10 | isMkdocstringsWheel = pkg.src.isWheel; 11 | in 12 | assert isMkdocstringsWheel; pkg 13 | -------------------------------------------------------------------------------- /tests/pendulum-with-rust/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test_pendulum_with_rust" 3 | version = "0.1.0" 4 | description = "" 5 | authors = [] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | pendulum = "^3.0.0" 10 | 11 | [tool.poetry.dev-dependencies] 12 | 13 | [build-system] 14 | requires = ["poetry-core"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/pylint-django-pre-2-5-4/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "pylint-django-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | pylint-django = "<2.5.4" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1.1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/pyodbc-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-pyodbc-wheel" 3 | version = "0.1.0" 4 | description = "Test of pyodbc as wheel" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | pyodbc = "^5.0.1" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/pytest-metadata/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "trivial" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.7" 9 | pytest-metadata = "*" 10 | pytest-select = "*" 11 | 12 | [build-system] 13 | requires = ["poetry-core>=1.1"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/pytest-redis/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "pytest-redis-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | pytest-redis = "*" 10 | psutil = "5.9.5" 11 | 12 | [build-system] 13 | requires = ["poetry-core>=1.1"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/shellcheck-py/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test_shellcheck_py" 3 | version = "0.1.0" 4 | description = "" 5 | authors = [] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" # Based on https://pypi.org/project/shellcheck-py/ 9 | shellcheck-py = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/source-filter/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "trivial" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.6" 9 | alembic = "1.0.10" 10 | Flask = "^1.1.1" 11 | 12 | [build-system] 13 | requires = ["poetry-core"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/test-group/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python310 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python310; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | checkGroups = [ "test" ]; 9 | 10 | checkPhase = '' 11 | runHook preCheck 12 | pytest 13 | runHook postCheck 14 | ''; 15 | } 16 | -------------------------------------------------------------------------------- /tests/utf8-pyproject/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "utf8-pyproject" 3 | version = "0.1.0" 4 | description = "🌮" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | 10 | [tool.poetry.dev-dependencies] 11 | 12 | [build-system] 13 | requires = ["poetry-core>=1.0.0"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/ml-stack/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "ml-stack" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Star Dorminey "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | torch = "^2.1.2" 10 | torchvision = "^0.16" 11 | 12 | [build-system] 13 | requires = ["poetry-core"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/pydantic-1/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "pydantic-1-test" { } '' 10 | ${env}/bin/python -c 'import pydantic.main; pydantic.main.Field(default=0, ge=0)' 11 | touch $out 12 | '' 13 | -------------------------------------------------------------------------------- /tests/pytest-randomly/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "trivial" 3 | version = "0.1.0" 4 | description = "poetry2nix pytest-randomly test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | pytest-randomly = "^3.10.1" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/rasterio/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "rasterio-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "~3.9" 9 | rasterio = "*" 10 | 11 | [tool.poetry.dev-dependencies] 12 | 13 | [build-system] 14 | requires = ["poetry-core>=1"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/ubersmith/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-ubersmith" 3 | version = "0.1.0" 4 | description = "Test of python-ubersmith package" 5 | authors = ["Pegasust "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.6" 9 | ubersmith = "^0.4.0" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/wandb/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "wandb-build" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.6" 9 | wandb = "0.8.28" 10 | 11 | 12 | [tool.poetry.dev-dependencies] 13 | 14 | [build-system] 15 | requires = ["poetry-core"] 16 | build-backend = "poetry.core.masonry.api" 17 | -------------------------------------------------------------------------------- /tests/awsume/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "awsume-test" 3 | version = "0.1.0" 4 | description = "Test of awsume package" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | awsume = "^4.5.3" 10 | psutil = "5.9.5" 11 | 12 | [build-system] 13 | requires = ["poetry-core>=1"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/cairocffi-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-cairocffi-wheel" 3 | version = "0.1.0" 4 | description = "Test of wheel for cairocffi" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | cairocffi = "^1.6.0" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/color-operations/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test_color_operations" 3 | version = "0.1.0" 4 | description = "" 5 | authors = [] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" # Based on https://pypi.org/project/color-operations/ 9 | color-operations = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/contourpy-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-contourpy-wheel" 3 | version = "0.1.0" 4 | description = "Test of wheel for contourpy" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | contourpy = "^1.1.0" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/duckdb-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python39, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python39; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = true; 8 | }; 9 | in 10 | runCommand "duckdb-wheel-test" { } '' 11 | ${env}/bin/python -c 'import duckdb; print(duckdb.__version__)' > $out 12 | '' 13 | -------------------------------------------------------------------------------- /tests/duckdb-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-duckdb-wheel" 3 | version = "0.1.0" 4 | description = "Test of python duckdb-wheel package" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | duckdb = "0.8.1" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/fancycompleter-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3 }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = true; 8 | }; 9 | pkg = env.python.pkgs.fancycompleter; 10 | isFancycompleterWheel = pkg.src.isWheel; 11 | in 12 | assert isFancycompleterWheel; pkg 13 | -------------------------------------------------------------------------------- /tests/ml-stack-old/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "ml-stack-old" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Star Dorminey "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | torch = "2.0.0" 10 | torchvision = "0.15.1" 11 | 12 | [build-system] 13 | requires = ["poetry-core"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/nbconvert-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-nbconvert-wheel" 3 | version = "0.1.0" 4 | description = "Test of wheel for nbconvert" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | nbconvert = "^7.2.6" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/path-deps-level2/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "path-deps-level2" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.6" 9 | path-deps = { path = "../path-deps" } 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/shapely/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "shapely-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | shapely = ">=2.0.4" 10 | 11 | [tool.poetry.dev-dependencies] 12 | 13 | [build-system] 14 | requires = ["poetry-core>=1"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/wheel-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-wheel-wheel" 3 | version = "0.1.0" 4 | description = "Test of python wheel-wheel package" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | wheel = "^0.41.2" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tools/auto_version.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | from datetime import datetime 3 | 4 | # Outputs a version number to be tagged by github actions 5 | if __name__ == "__main__": 6 | now = datetime.utcnow() 7 | modifier = int( 8 | (now - now.replace(hour=0, minute=0, second=0, microsecond=0)).total_seconds() 9 | ) 10 | print(now.strftime(f"%-Y.%-m.%-d{modifier}")) 11 | -------------------------------------------------------------------------------- /tests/affine-pre-2-4/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "affine-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "~3.10" 9 | affine = "<2.4" 10 | 11 | [tool.poetry.dev-dependencies] 12 | 13 | [build-system] 14 | requires = ["poetry-core>=1"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/contourpy-no-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-contourpy-wheel" 3 | version = "0.1.0" 4 | description = "Test of wheel for contourpy" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | contourpy = "^1.1.0" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/dependency-environment/trivial.py: -------------------------------------------------------------------------------- 1 | def app(environ, start_response): 2 | """Simplest possible application object""" 3 | data = b"Hello, World!\n" 4 | status = "200 OK" 5 | response_headers = [ 6 | ("Content-type", "text/plain"), 7 | ("Content-Length", str(len(data))), 8 | ] 9 | start_response(status, response_headers) 10 | return iter([data]) 11 | -------------------------------------------------------------------------------- /tests/fastapi-utils/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-fastapi-utils" 3 | version = "0.1.0" 4 | description = "Test of python fastapi-utils package" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.6" 9 | fastapi-utils = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/gdal/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "gdal-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | gdal = "3.9.0" 10 | numpy = "<2" 11 | 12 | [tool.poetry.dev-dependencies] 13 | 14 | [build-system] 15 | requires = ["poetry-core>=1"] 16 | build-backend = "poetry.core.masonry.api" 17 | -------------------------------------------------------------------------------- /tests/gobject-introspection/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "gobject-introspection-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["You "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | python-mpd2 = "^3.1.0" 10 | PyGObject = "^3.46.0" 11 | 12 | [build-system] 13 | requires = ["poetry-core"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/jupyterlab/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "jupyterlab-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "~3.10" 9 | jupyterlab = "*" 10 | 11 | [tool.poetry.dev-dependencies] 12 | 13 | [build-system] 14 | requires = ["poetry-core>=1"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/markupsafe2/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "markupsafe2" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.6" 9 | MarkupSafe = "^2.0" 10 | 11 | 12 | [tool.poetry.dev-dependencies] 13 | 14 | [build-system] 15 | requires = ["poetry-core"] 16 | build-backend = "poetry.core.masonry.api" 17 | -------------------------------------------------------------------------------- /tests/mkdocs-material/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "mkdocs-material-test" 3 | version = "0.1.0" 4 | description = "Test of mkdocs-material" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | mkdocs-material = "8.5.4" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/override-support/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "override-support" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.6" 9 | alembic = "1.0.10" 10 | Flask = "^1.1.1" 11 | 12 | [build-system] 13 | requires = ["poetry-core"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/prefer-wheels/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "prefer-wheels-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | maturin = "*" 10 | 11 | [tool.poetry.dev-dependencies] 12 | 13 | [build-system] 14 | requires = ["poetry-core"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/pyarrow-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "pyarrow-wheel" 3 | version = "0.1.0" 4 | description = "Test of pyarrow wheel" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | pyarrow = "^14.0.0" 10 | numpy = "^1.26" 11 | 12 | [build-system] 13 | requires = ["poetry-core>=1"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/python-markers/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "python-markers-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | plum-dispatch = { version = "*", python = "^3.10" } 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/shapely-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-shapely-wheel" 3 | version = "0.1.0" 4 | description = "Test of python shapely-wheel package" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | shapely = "^2.0.0" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/soundfile-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-soundfile-wheel" 3 | version = "0.1.0" 4 | description = "Test of wheel for soundfile" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | soundfile = "^0.12.1" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/composable-defaults/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "composable_defaults" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.6" 9 | alembic = "1.0.10" 10 | Flask = "^1.1.1" 11 | 12 | [build-system] 13 | requires = ["poetry-core"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/jupyterlab-3/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "jupyterlab-3-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "~3.10" 9 | jupyterlab = "<4" 10 | 11 | [tool.poetry.dev-dependencies] 12 | 13 | [build-system] 14 | requires = ["poetry-core>=1"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/mkdocstrings-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "mkdocstrings-wheel" 3 | version = "0.1.0" 4 | description = "Test of mkdocstrings wheel" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | mkdocstrings = ">=0.17,<0.18" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/override-default-support/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "override-support" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.6" 9 | alembic = "1.0.10" 10 | Flask = "^1.1.1" 11 | 12 | [build-system] 13 | requires = ["poetry-core"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/rfc3986-validator/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-rfc3986-validator" 3 | version = "0.1.0" 4 | description = "Test of rfc3986-validator" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | rfc3986-validator = "*" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/trivial-cross/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "trivial-cross" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | Flask = "^2.0.2" 10 | 11 | [tool.poetry.dev-dependencies] 12 | 13 | [build-system] 14 | requires = ["poetry-core>=1.0.0"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/trivial-poetry-1_2_0/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | 3 | let 4 | 5 | app = poetry2nix.mkPoetryApplication { 6 | projectDir = ./.; 7 | }; 8 | 9 | env = poetry2nix.mkPoetryEnv { 10 | projectDir = ./.; 11 | }; 12 | 13 | in 14 | runCommand "trivial-1_2_0-aggregate" { } '' 15 | echo ${app} 16 | ${env}/bin/python -c 'import requests' 17 | touch $out 18 | '' 19 | -------------------------------------------------------------------------------- /.github/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:base", 5 | "group:all", 6 | "schedule:weekly" 7 | ], 8 | "lockFileMaintenance": { 9 | "enabled": true 10 | }, 11 | "dependencyDashboard": true, 12 | "nix": { 13 | "enabled": true 14 | }, 15 | "python": { 16 | "enabled": false 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tests/cairocffi-no-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-cairocffi-no-wheel" 3 | version = "0.1.0" 4 | description = "Test of source build for cairocffi" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | cairocffi = "^1.6.0" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/file-src-deps-level2/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | pwd = ./.; 9 | overrides = poetry2nix.overrides.withDefaults (final: prev: { 10 | trivial = final.addBuildSystem "poetry" prev.trivial; 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /tests/file-src-deps-level2/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "file-src-deps-level2" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | file-src-deps = { path = "../file-src-deps" } 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/file-src-deps/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python310 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python310; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | pwd = ./.; 9 | overrides = poetry2nix.overrides.withDefaults (final: prev: { 10 | trivial = final.addBuildSystem "poetry" prev.trivial; 11 | }); 12 | } 13 | -------------------------------------------------------------------------------- /tests/file-src-deps/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "file-src-deps" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | trivial = { path = "../trivial/dist/trivial-0.1.0.tar.gz" } 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/jake/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "jake-test" 3 | version = "0.1.0" 4 | description = "Test of jake package" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | 10 | [tool.poetry.group.dev.dependencies] 11 | jake = "^3.0.11" 12 | 13 | [build-system] 14 | requires = ["poetry-core"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/shapely-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = true; 8 | }; 9 | in 10 | runCommand "shapely-wheel-test" { } '' 11 | ${env}/bin/python -c 'import shapely, shapely.geos; print(shapely.__version__)' > $out 12 | '' 13 | -------------------------------------------------------------------------------- /tests/cffi-pandas-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "cffi-pandas-wheel" 3 | version = "0.1.0" 4 | description = "Test of cffi-pandas wheel" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | cffi = "^1.15.1" 10 | pandas = "^1.5.2" 11 | 12 | [build-system] 13 | requires = ["poetry-core>=1"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/markdown-it-py-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-markdown-it-py-wheel" 3 | version = "0.1.0" 4 | description = "Test of wheel for markdown-it-py" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | markdown-it-py = "^2.2.0" 10 | 11 | [build-system] 12 | requires = ["poetry-core>=1"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/pytesseract/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand, python3 }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = true; 8 | }; 9 | in 10 | runCommand "pytesseract-test" { } '' 11 | ${env}/bin/python -c 'import pytesseract; print(pytesseract.get_tesseract_version())' > $out 12 | '' 13 | -------------------------------------------------------------------------------- /tests/shapely-pre-2/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "shapely-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | shapely = "<2" 10 | numpy = "*" 11 | 12 | [tool.poetry.dev-dependencies] 13 | 14 | [build-system] 15 | requires = ["poetry-core>=1"] 16 | build-backend = "poetry.core.masonry.api" 17 | -------------------------------------------------------------------------------- /tests/subdirectory/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "subdirectory-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = [] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | psycopg = {git = "https://github.com/psycopg/psycopg.git", rev = "3.1.10", subdirectory = "psycopg"} 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/assorted-pkgs/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "assorted-pkgs" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | sacred = "^0.8.2" 10 | mypy = "^1" 11 | 12 | [tool.poetry.dev-dependencies] 13 | 14 | [build-system] 15 | requires = ["poetry-core>=1.0.0"] 16 | build-backend = "poetry.core.masonry.api" 17 | -------------------------------------------------------------------------------- /tests/file-wheel-deps-level2/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "file-wheel-deps-level2" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | file-wheel-deps = { path = "../file-wheel-deps" } 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/mk-poetry-packages/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "mk-poetry-packages" 3 | version = "0.1.0" 4 | description = "Tests if mkPoetryPackages API is stable" 5 | authors = [] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | requests = "^2.25.1" 10 | 11 | [tool.poetry.dev-dependencies] 12 | 13 | [build-system] 14 | requires = ["poetry-core"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/pyodbc-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = true; 8 | }; 9 | in 10 | assert env.python.pkgs.pyodbc.src.isWheel; runCommand "pyodbc-wheel-test" { } '' 11 | ${env}/bin/python -c 'import pyodbc' 12 | touch $out 13 | '' 14 | -------------------------------------------------------------------------------- /tests/closure-size/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "closure-size" 3 | version = "1.0.0" 4 | description = "" 5 | authors = [] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | psycopg2 = "*" 10 | trivial = { path = "../trivial" } 11 | 12 | [tool.poetry.scripts] 13 | main = "closure_size:main" 14 | 15 | [build-system] 16 | requires = ["poetry-core"] 17 | build-backend = "poetry.core.masonry.api" 18 | -------------------------------------------------------------------------------- /tests/file-wheel-deps/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "file-wheel-deps" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | trivial = { path = "../trivial/dist/trivial-0.1.0-py3-none-any.whl" } 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/prefer-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test_preferwheel" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["adisbladis "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.7" 9 | maturin = "0.7.7" 10 | funcy = "1.17" 11 | 12 | [tool.poetry.dev-dependencies] 13 | 14 | [build-system] 15 | requires = ["poetry-core"] 16 | build-backend = "poetry.core.masonry.api" 17 | -------------------------------------------------------------------------------- /overrides/poetry-to-poetry-core.jq: -------------------------------------------------------------------------------- 1 | # replace poetry.masonry.api with poetry.core.masonry.api if it's the build backend 2 | (.["build-system"]["build-backend"] |= (select(. == "poetry.masonry.api") |= "poetry.core.masonry.api")) | 3 | # replace build-system.requires with poetry-core if it's poetry 4 | (.["build-system"]["requires"] |= map(if test("^\\s*poetry\\s*(>=|<=|==|!=|~=)\\s*([0-9]|\\.)*") then "poetry-core" else . end)) 5 | -------------------------------------------------------------------------------- /tests/extended-cross/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "extended-cross" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | cffi = "^1.15.0" 10 | credis = "^2.0.1" 11 | 12 | [tool.poetry.dev-dependencies] 13 | 14 | [build-system] 15 | requires = ["poetry-core>=1.0.0"] 16 | build-backend = "poetry.core.masonry.api" 17 | -------------------------------------------------------------------------------- /tests/pyqt6/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test_pyqt6" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["considerate "] 6 | 7 | [tool.poetry.dependencies] 8 | python = ">=3.10,<3.13" 9 | pyqt6 = "6.5.2" 10 | pyqt6-qt6 = "6.5.2" 11 | 12 | [tool.poetry.dev-dependencies] 13 | 14 | [build-system] 15 | requires = ["poetry-core>=1"] 16 | build-backend = "poetry.core.masonry.api" 17 | -------------------------------------------------------------------------------- /tests/vllm-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python311, runCommand }: 2 | 3 | let 4 | env = poetry2nix.mkPoetryEnv { 5 | python = python311; 6 | pyproject = ./pyproject.toml; 7 | poetrylock = ./poetry.lock; 8 | preferWheels = true; 9 | }; 10 | in 11 | runCommand "vllm-wheel" { } '' 12 | export HF_HOME="$(mktemp -d)" 13 | ${env}/bin/python -c 'import vllm; print(vllm.__version__)' > $out 14 | '' 15 | -------------------------------------------------------------------------------- /tests/dask-dataframe/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python311, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python311; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = true; 8 | }; 9 | in 10 | runCommand "dask-dataframe-infinite-recursion-test" { } '' 11 | ${env}/bin/python -c 'import dask.dataframe as dd; import dask_expr' 12 | touch $out 13 | '' 14 | -------------------------------------------------------------------------------- /tests/path-deps-develop/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "path_deps_develop" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = ">=3.6" 9 | dep1 = {path = "dep1", develop = true} 10 | 11 | [tool.poetry.dev-dependencies] 12 | 13 | [build-system] 14 | requires = ["poetry-core>=1.0.0"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/gnureadline/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-gnureadline" 3 | version = "0.1.0" 4 | description = "Test of gnureadline package" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | 10 | [tool.poetry.group.dev.dependencies] 11 | gnureadline = "^8.1.2" 12 | 13 | [build-system] 14 | requires = ["poetry-core>=1.1"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/missing-iswheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "missing-iswheel" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Person "] 6 | readme = "README.md" 7 | 8 | [tool.poetry.dependencies] 9 | python = "^3.10" 10 | 11 | [tool.poetry.group.dev.dependencies] 12 | pytest-flake8 = "^1.1.1" 13 | 14 | [build-system] 15 | requires = ["poetry-core"] 16 | build-backend = "poetry.core.masonry.api" 17 | -------------------------------------------------------------------------------- /tests/panel-wheels/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-panel-wheels" 3 | version = "0.1.0" 4 | description = "Test of wheel for panel, pillow and bokeh" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | bokeh = "~2.4" 10 | panel = "^0.14.2" 11 | pillow = "^9.3.0" 12 | 13 | [build-system] 14 | requires = ["poetry-core>=1"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tools/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "poetry2nix-tools-env" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["adisbladis "] 6 | license = "MIT" 7 | 8 | [tool.poetry.dependencies] 9 | python = "^3.9" 10 | black = "*" 11 | pynixutil = "^0.5.0" 12 | 13 | [tool.poetry.dev-dependencies] 14 | 15 | [build-system] 16 | requires = ["poetry-core>=1.0.0"] 17 | build-backend = "poetry.core.masonry.api" 18 | -------------------------------------------------------------------------------- /tests/ansible-molecule/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "ansible-molecule" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | jinja2 = "^3.0.3" 10 | ansible = "~5.1.0" 11 | molecule = "^3.5.2" 12 | 13 | [tool.poetry.dev-dependencies] 14 | 15 | [build-system] 16 | requires = ["poetry-core"] 17 | build-backend = "poetry.core.masonry.api" 18 | -------------------------------------------------------------------------------- /tests/cyclonedx-and-sarif-tools/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "cyclonedx-and-sarif-tools-test" 3 | version = "0.1.0" 4 | description = "Test of cyclonedx and sarif-tools" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | cyclonedx-python-lib = "*" 10 | sarif-tools = "*" 11 | 12 | [build-system] 13 | requires = ["poetry-core>=1"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/fancycompleter-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "fancycompleter-wheel" 3 | version = "0.1.0" 4 | description = "Test of fancycompleter wheel" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | pdbpp = "^0.10.3" 10 | fancycompleter = "^0.9.1" 11 | wmctrl = "^0.4" 12 | 13 | [build-system] 14 | requires = ["poetry-core>=1"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/git-deps/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "git-deps" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.6" 9 | alembic = { git = "https://github.com/sqlalchemy/alembic.git", tag = "rel_1_3_1" } 10 | gitlab-lint = "0.3.0" 11 | 12 | [build-system] 13 | requires = ["poetry-core"] 14 | build-backend = "poetry.core.masonry.api" 15 | -------------------------------------------------------------------------------- /tests/subdirectory/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, postgresql_14, runCommandCC, stdenv }: 2 | 3 | let env = poetry2nix.mkPoetryEnv { projectDir = ./.; }; 4 | in if stdenv.isDarwin then 5 | env 6 | else 7 | runCommandCC "subdirectory-test" 8 | { 9 | PSYCOPG_IMPL = "python"; 10 | LD_LIBRARY_PATH = lib.makeLibraryPath [ postgresql_14 ]; 11 | } '' 12 | '${env}/bin/python' -c 'import psycopg' 13 | touch "$out" 14 | '' 15 | -------------------------------------------------------------------------------- /tests/closure-size/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, poetry, postgresql }: 2 | poetry2nix.mkPoetryApplication { 3 | pyproject = ./pyproject.toml; 4 | poetrylock = ./poetry.lock; 5 | src = lib.cleanSource ./.; 6 | pwd = ./.; 7 | 8 | inherit poetry; 9 | 10 | # Make sure these packages are missing from runtime closure 11 | disallowedRequisites = [ 12 | poetry 13 | postgresql.stdenv.cc.cc 14 | postgresql.out 15 | ]; 16 | } 17 | -------------------------------------------------------------------------------- /tests/python-versions-or/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "python-versions-or" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["adisbladis "] 6 | readme = "README.md" 7 | 8 | [tool.poetry.dependencies] 9 | python = "^3.10" 10 | ndg-httpsclient = "0.5.1" 11 | cryptography = "43.0.3" 12 | bcrypt = "4.1.3" 13 | 14 | [build-system] 15 | requires = ["poetry-core"] 16 | build-backend = "poetry.core.masonry.api" 17 | -------------------------------------------------------------------------------- /tests/canonical-module-names/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "canonical_module_names" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.6" 9 | pyramid-deferred-sqla = {git = "https://github.com/niteoweb/pyramid_deferred_sqla.git"} 10 | 11 | [build-system] 12 | requires = ["poetry-core"] 13 | build-backend = "poetry.core.masonry.api" 14 | -------------------------------------------------------------------------------- /tests/dask-dataframe/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "dask-dataframe-infinite-recursion-test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | dask = { version = ">=2024.8.0", extras = ["dataframe"] } 10 | dask_expr = "*" 11 | pyarrow = "^17" 12 | 13 | [build-system] 14 | requires = ["poetry-core"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/jake/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | envWheel = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | projectDir = ./.; 6 | preferWheels = true; 7 | }; 8 | env = poetry2nix.mkPoetryEnv { 9 | python = python3; 10 | projectDir = ./.; 11 | }; 12 | in 13 | runCommand "jake-test" { } '' 14 | ${envWheel}/bin/python -c 'import jake' 15 | ${env}/bin/python -c 'import jake' 16 | touch $out 17 | '' 18 | -------------------------------------------------------------------------------- /tests/cairocffi-no-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, pkgs, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = false; 8 | }; 9 | in 10 | assert !(env.python.pkgs.cairocffi.src.isWheel or false); runCommand "cairocffi-no-wheel" { } '' 11 | ${env}/bin/python -c 'import cairocffi; print(cairocffi.__version__)' > $out 12 | '' 13 | -------------------------------------------------------------------------------- /tests/rpds-py-no-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "rpds-py-build-wheel" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | rpds-py = "^0.22" 10 | referencing = "^0.29.1" 11 | jsonschema-specifications = "^2023.6.1" 12 | jsonschema = "^4.18.3" 13 | 14 | [build-system] 15 | requires = ["poetry-core>=1.5"] 16 | build-backend = "poetry.core.masonry.api" 17 | -------------------------------------------------------------------------------- /tests/rpds-py-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "rpds-py-build-wheel" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | rpds-py = "^0.22" 10 | referencing = "^0.29.1" 11 | jsonschema-specifications = "^2023.6.1" 12 | jsonschema = "^4.18.3" 13 | 14 | [build-system] 15 | requires = ["poetry-core>=1.5"] 16 | build-backend = "poetry.core.masonry.api" 17 | -------------------------------------------------------------------------------- /tests/operators/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "operators_test" 3 | version = "0.1.0" 4 | description = "A set of packages that are using all sorts of version check operators" 5 | authors = ["poetry2nix "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.7" 9 | pytest-mypy = "^0.8.1" 10 | 11 | [tool.poetry.dev-dependencies] 12 | 13 | [build-system] 14 | requires = ["poetry-core"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/pyarrow-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = true; 8 | }; 9 | isPyArrowWheel = env.python.pkgs.pyarrow.src.isWheel; 10 | in 11 | assert isPyArrowWheel; runCommand "pyarrow-test" { } '' 12 | ${env}/bin/python -c 'import pyarrow; print(pyarrow.__version__)' > $out 13 | '' 14 | -------------------------------------------------------------------------------- /tests/test-group/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-group" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | pyparsing = "^2.4.5" 10 | 11 | [tool.poetry.group.dev.dependencies] 12 | 13 | [tool.poetry.group.test.dependencies] 14 | pytest = "^6" 15 | 16 | [build-system] 17 | requires = ["poetry-core>=1.1"] 18 | build-backend = "poetry.core.masonry.api" 19 | -------------------------------------------------------------------------------- /tests/canonical-module-names/poetry-git-overlay.nix: -------------------------------------------------------------------------------- 1 | { pkgs }: 2 | _final: prev: { 3 | 4 | pyramid-deferred-sqla = prev.pyramid-deferred-sqla.overridePythonAttrs ( 5 | _: { 6 | src = pkgs.fetchgit { 7 | url = "https://github.com/niteoweb/pyramid_deferred_sqla.git"; 8 | rev = "639b822d16aff7d732a4da2d3752cfdecee00aef"; 9 | sha256 = "0k3azmnqkriy0nz8g2g8fjhfa25i0973pjqhqsfd33ir0prwllz7"; 10 | }; 11 | } 12 | ); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /tests/editable-egg/src/trivial/__init__.py: -------------------------------------------------------------------------------- 1 | def app(environ, start_response): 2 | """Simplest possible application object""" 3 | data = b"Original\n" 4 | status = "200 OK" 5 | response_headers = [ 6 | ("Content-type", "text/plain"), 7 | ("Content-Length", str(len(data))), 8 | ] 9 | start_response(status, response_headers) 10 | return iter([data]) 11 | 12 | 13 | def app_factory(global_config, **local_conf): 14 | return app 15 | -------------------------------------------------------------------------------- /tests/flink/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python311, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python311; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | # necessary otherwise we can't use older versions of pyarrow 8 | # and flink requires pyarrow<12 9 | preferWheels = true; 10 | }; 11 | in 12 | runCommand "flink-test" { } '' 13 | ${env}/bin/python -c 'import pyflink' 14 | touch $out 15 | '' 16 | -------------------------------------------------------------------------------- /tests/path-deps-develop/poetry.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "dep1" 3 | version = "0.0.0" 4 | description = "" 5 | category = "main" 6 | optional = false 7 | python-versions = "*" 8 | develop = true 9 | 10 | [package.source] 11 | type = "directory" 12 | url = "dep1" 13 | 14 | [metadata] 15 | lock-version = "1.1" 16 | python-versions = ">=3.6" 17 | content-hash = "fda111f4898026d22d40f4d601bf3782b8ef7795da41cb780d59894a4732f8bc" 18 | 19 | [metadata.files] 20 | dep1 = [] 21 | -------------------------------------------------------------------------------- /tests/wheel-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = true; 8 | }; 9 | isWheelWheel = env.python.pkgs.wheel.src.isWheel or false; 10 | in 11 | assert (!isWheelWheel); runCommand "wheel-wheel-test" { } '' 12 | ${env}/bin/python -c 'import wheel; print(wheel.__version__)' > $out 13 | '' 14 | -------------------------------------------------------------------------------- /tests/rpds-py-no-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, pkgs }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = false; 8 | }; 9 | in 10 | assert !(env.python.pkgs.rpds-py.src.isWheel || 11 | env.python.pkgs.referencing.src.isWheel || 12 | env.python.pkgs.jsonschema-specifications.src.isWheel || 13 | env.python.pkgs.jsonschema.src.isWheel 14 | ); env 15 | -------------------------------------------------------------------------------- /vendor/pyproject.nix/lib/pep518.nix: -------------------------------------------------------------------------------- 1 | { pep508, ... }: 2 | 3 | { 4 | /* 5 | Parse PEP-518 `build-system.requires` from pyproject.toml. 6 | Type: readPyproject :: AttrSet -> list 7 | 8 | Example: 9 | # parseBuildSystems (lib.importTOML ./pyproject.toml) 10 | [ ] # List of parsed PEP-508 strings as returned by `lib.pep508.parseString`. 11 | */ 12 | parseBuildSystems = pyproject: map pep508.parseString (pyproject.build-system.requires or [ ]); 13 | } 14 | -------------------------------------------------------------------------------- /tests/cyclonedx-and-sarif-tools/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | in 9 | runCommand "cyclonedx-and-sarif-tools-test" { } '' 10 | export HOME=$(mktemp -d) 11 | ${env}/bin/python -c 'import cyclonedx; print(f"cyclonedx {cyclonedx.__version__}")' | tee $out 12 | ${env}/bin/sarif --version | tee -a $out 13 | '' 14 | -------------------------------------------------------------------------------- /tests/mkdocs-material/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, stdenv }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | overrides = poetry2nix.overrides.withDefaults (_: prev: { 8 | watchdog = prev.watchdog.override { 9 | preferWheel = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64; 10 | }; 11 | }); 12 | }; 13 | in 14 | env.python.pkgs.mkdocs-material 15 | -------------------------------------------------------------------------------- /tests/option/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-option" 3 | version = "0.1.0" 4 | description = "Test of python option package" 5 | authors = ["Pegasust "] 6 | homepage = "https://github.com/MaT1g3R/option" 7 | documentation = "https://mat1g3r.github.io/option/option.html" 8 | 9 | [tool.poetry.dependencies] 10 | python = "^3.7" 11 | option = "^2.1.0" 12 | 13 | [build-system] 14 | requires = ["poetry-core"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/vllm-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "vllm-wheel" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | bitsandbytes = "^0.43.0" 10 | torch = "^2.2.1" 11 | vllm = "^0.4.2" 12 | 13 | # See https://docs.vllm.ai/en/latest/quantization/auto_awq.html 14 | autoawq = "^0.2.5" 15 | 16 | [build-system] 17 | requires = ["poetry-core"] 18 | build-backend = "poetry.core.masonry.api" 19 | -------------------------------------------------------------------------------- /generate.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env nix-shell 2 | #! nix-shell -i python3 -p python3 poetry 3 | 4 | # Run code generation used by poetry2nix 5 | 6 | from poetry.packages.utils.utils import SUPPORTED_EXTENSIONS 7 | import json 8 | 9 | EXT_FILE = "extensions.json" 10 | 11 | if __name__ == "__main__": 12 | with open(EXT_FILE, "w") as f: 13 | ext = set(ext.lstrip(".") for ext in SUPPORTED_EXTENSIONS) 14 | ext.add("egg") 15 | f.write(json.dumps(sorted(ext), indent=2) + "\n") 16 | -------------------------------------------------------------------------------- /tests/test-extras/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-extras" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | black = { version = "22.10", optional = true} 10 | 11 | [tool.poetry.extras] 12 | more = ["black"] 13 | 14 | [tool.poetry.group.dev.dependencies] 15 | pytest = "^6" 16 | 17 | [build-system] 18 | requires = ["poetry-core>=1.1"] 19 | build-backend = "poetry.core.masonry.api" 20 | -------------------------------------------------------------------------------- /tests/git-deps-1_2_0/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "git-deps" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.6" 9 | 10 | [tool.poetry.group.dev.dependencies] 11 | colorama = { git = "https://github.com/tartley/colorama.git", rev = "4321bbfda9aa190acdad05eb901d3b59439f0ec9" } 12 | 13 | [build-system] 14 | requires = ["poetry-core"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/source-filter/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | projectDir = ./.; 6 | 7 | # Assert expected ignored files not in sources 8 | preConfigure = 9 | let 10 | assertNotExists = name: "! test -f ${name} || (echo ${name} exists && false)"; 11 | in 12 | '' 13 | ${assertNotExists "ignored.pyc"} 14 | ${assertNotExists "__pycache__"} 15 | ${assertNotExists "testhest"} 16 | ''; 17 | } 18 | -------------------------------------------------------------------------------- /tests/test-no-extras/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-no-extras" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | black = { version = "22.10", optional = true} 10 | 11 | [tool.poetry.extras] 12 | more = ["black"] 13 | 14 | [tool.poetry.group.dev.dependencies] 15 | pytest = "^6" 16 | 17 | [build-system] 18 | requires = ["poetry-core>=1.1"] 19 | build-backend = "poetry.core.masonry.api" 20 | -------------------------------------------------------------------------------- /tests/extras/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "extras" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.6" 9 | setuptools-scm = { version = ">=3.4", extras = ["toml"] } 10 | 11 | # Extra with dash in the name should work 12 | boto3-stubs = {extras = ["cognito-idp"], version = "^1.17.82"} 13 | 14 | [build-system] 15 | requires = ["poetry-core"] 16 | build-backend = "poetry.core.masonry.api" 17 | -------------------------------------------------------------------------------- /tests/git-subdirectory-hook/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-subdirectory" 3 | version = "0.1.0" 4 | description = "Test of subdirectory" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.9" 9 | 10 | [tool.poetry.dependencies.trivial] 11 | git = "https://github.com/nix-community/poetry2nix" 12 | subdirectory = "tests/pytest-randomly" 13 | 14 | [build-system] 15 | requires = ["poetry-core>=1"] 16 | build-backend = "poetry.core.masonry.api" 17 | -------------------------------------------------------------------------------- /tests/returns/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-returns" 3 | version = "0.1.0" 4 | description = "Test of python returns package" 5 | authors = ["Pegasust "] 6 | homepage = "https://github.com/dry-python/returns" 7 | documentation = "https://returns.readthedocs.io/en/latest/pages/quickstart.html" 8 | 9 | [tool.poetry.dependencies] 10 | python = "^3.7" 11 | returns = "^0.19.0" 12 | 13 | [build-system] 14 | requires = ["poetry-core"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/soundfile-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = true; 8 | }; 9 | py = env.python; 10 | pkg = py.pkgs.soundfile; 11 | isSoundfileWheel = pkg.src.isWheel; 12 | in 13 | assert isSoundfileWheel; runCommand "soundfile-wheel" { } '' 14 | ${env}/bin/python -c 'import soundfile; print(soundfile.__version__)' > $out 15 | '' 16 | -------------------------------------------------------------------------------- /overrides/sort-build-systems.jq: -------------------------------------------------------------------------------- 1 | # Sort each entry in the top-level dictionary 2 | .[] |= sort_by( 3 | # Put all strings before objects 4 | type == "object", 5 | if type == "string" 6 | then 7 | # Sort string overrides alphabetically 8 | . 9 | else 10 | # Sort entries with an `until` field above entries with a `from` field 11 | .from, 12 | .until, 13 | # Sort build systems with the same `from` and `until` values 14 | .buildSystem 15 | end 16 | ) 17 | -------------------------------------------------------------------------------- /tests/aiopath/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-aiopath" 3 | version = "0.1.0" 4 | description = "Test of aiopath package" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | aiopath = [ 10 | { version = "0.5.12", python = ">=3.7,<3.10" }, 11 | { version = ">=0.6,<0.7", python = ">=3.10,<3.11" }, 12 | { version = ">=0.7,<1", python = ">=3.12,<4" }, 13 | ] 14 | 15 | [build-system] 16 | requires = ["poetry-core"] 17 | build-backend = "poetry.core.masonry.api" 18 | -------------------------------------------------------------------------------- /tests/composable-defaults/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3 }: 2 | let 3 | p2nix = poetry2nix.overrideScope (_final: prev: { 4 | defaultPoetryOverrides = prev.defaultPoetryOverrides.extend (_pyfinal: _pyprev: { 5 | my-custom-pkg = prev.my-custom-pkg.overridePythonAttrs (_oldAttrs: { }); 6 | }); 7 | }); 8 | 9 | in 10 | p2nix.mkPoetryApplication { 11 | python = python3; 12 | projectDir = ./.; 13 | overrides = p2nix.overrides.withDefaults (_final: prev: { 14 | inherit (prev) customjox; 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /tests/ruff/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env1 = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | }; 8 | env2 = poetry2nix.mkPoetryEnv { 9 | python = python3; 10 | pyproject = ./pyproject.toml; 11 | poetrylock = ./poetry.lock; 12 | preferWheels = true; 13 | }; 14 | in 15 | runCommand "ruff-test" 16 | { } '' 17 | ${env1}/bin/ruff version 18 | ${env2}/bin/ruff version 19 | touch $out 20 | '' 21 | -------------------------------------------------------------------------------- /tests/editable-egg/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "trivial" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | packages = [ 7 | { include = "trivial", from = "src" }, 8 | ] 9 | 10 | [tool.poetry.plugins."paste.app_factory"] 11 | main = "trivial:app_factory" 12 | 13 | [tool.poetry.dependencies] 14 | python = "^3.7" 15 | gunicorn = "^20.0.4" 16 | pastedeploy = "^2.1.0" 17 | 18 | [build-system] 19 | requires = ["poetry-core"] 20 | build-backend = "poetry.core.masonry.api" 21 | -------------------------------------------------------------------------------- /tests/legacy/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "legacy" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.8" 9 | urllib3 = "1.26.2" 10 | 11 | # This is to force to use the Pypi legacy API 12 | [[tool.poetry.source]] 13 | name = "legacy" 14 | url = "https://pypi.org/simple/" 15 | 16 | [tool.poetry.dev-dependencies] 17 | 18 | [build-system] 19 | requires = ["poetry-core>=1.0.0"] 20 | build-backend = "poetry.core.masonry.api" 21 | -------------------------------------------------------------------------------- /tests/matplotlib-3-7/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | mkEnv = preferWheel: poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | overrides = poetry2nix.overrides.withDefaults ( 6 | _: prev: { 7 | matplotlib = prev.matplotlib.override { 8 | inherit preferWheel; 9 | }; 10 | } 11 | ); 12 | }; 13 | in 14 | runCommand "matplotlib-3-7-test" { } '' 15 | ${mkEnv true}/bin/python -c 'import matplotlib' 16 | ${mkEnv false}/bin/python -c 'import matplotlib' 17 | touch $out 18 | '' 19 | -------------------------------------------------------------------------------- /tests/matplotlib-3-9/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand }: 2 | let 3 | mkEnv = preferWheel: poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | overrides = poetry2nix.overrides.withDefaults ( 6 | _: prev: { 7 | matplotlib = prev.matplotlib.override { 8 | inherit preferWheel; 9 | }; 10 | } 11 | ); 12 | }; 13 | in 14 | runCommand "matplotlib-3-9-test" { } '' 15 | ${mkEnv true}/bin/python -c 'import matplotlib' 16 | ${mkEnv false}/bin/python -c 'import matplotlib' 17 | touch $out 18 | '' 19 | -------------------------------------------------------------------------------- /tests/trivial-poetry-1_2_0/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "trivial-poetry-1-2-0" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | readme = "README.md" 7 | packages = [{include = "trivial_poetry_1_2_0"}] 8 | 9 | [tool.poetry.dependencies] 10 | python = "^3.10" 11 | alembic = "^1.8.1" 12 | Flask = "^2.2.2" 13 | 14 | [tool.poetry.group.dev.dependencies] 15 | requests = "^2.28.1" 16 | 17 | [build-system] 18 | requires = ["poetry-core"] 19 | build-backend = "poetry.core.masonry.api" 20 | -------------------------------------------------------------------------------- /hooks/wheel-unpack-hook.sh: -------------------------------------------------------------------------------- 1 | # Setup hook to use in case a wheel is fetched 2 | echo "Sourcing wheel setup hook" 3 | 4 | wheelUnpackPhase(){ 5 | echo "Executing wheelUnpackPhase" 6 | runHook preUnpack 7 | 8 | mkdir -p dist 9 | cp "$src" "dist/$(stripHash "$src")" 10 | 11 | # runHook postUnpack # Calls find...? 12 | echo "Finished executing wheelUnpackPhase" 13 | } 14 | 15 | if [ -z "${dontUseWheelUnpack-}" ] && [ -z "${unpackPhase-}" ]; then 16 | echo "Using wheelUnpackPhase" 17 | unpackPhase=wheelUnpackPhase 18 | fi 19 | -------------------------------------------------------------------------------- /tests/grpcio-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, pkgs }: 2 | let 3 | inherit (pkgs.stdenv) isLinux; 4 | env = poetry2nix.mkPoetryEnv { 5 | python = python3; 6 | pyproject = ./pyproject.toml; 7 | poetrylock = ./poetry.lock; 8 | preferWheels = false; 9 | overrides = poetry2nix.overrides.withDefaults ( 10 | _final: prev: { 11 | grpcio = prev.grpcio.override { 12 | preferWheel = isLinux; 13 | }; 14 | } 15 | ); 16 | }; 17 | in 18 | assert isLinux -> env.python.pkgs.grpcio.src.isWheel; env 19 | -------------------------------------------------------------------------------- /vendor/pyproject.nix/lib/util.nix: -------------------------------------------------------------------------------- 1 | # Small utilities for internal reuse, not exposed externally 2 | { lib }: 3 | let 4 | inherit (builtins) 5 | filter 6 | match 7 | split 8 | head 9 | ; 10 | inherit (lib) isString; 11 | 12 | in 13 | rec { 14 | isEmptyStr = s: isString s && match " *" s == null; 15 | 16 | splitComma = s: if s == "" then [ ] else filter isEmptyStr (split " *, *" s); 17 | 18 | stripStr = 19 | s: 20 | let 21 | t = match "[\t ]*(.*[^\t ])[\t ]*" s; 22 | in 23 | if t == null then "" else head t; 24 | } 25 | -------------------------------------------------------------------------------- /tests/cffi-pandas-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python311, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python311; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = true; 8 | }; 9 | isWheelCffi = env.python.pkgs.cffi.src.isWheel; 10 | isWheelPandas = env.python.pkgs.pandas.src.isWheel; 11 | in 12 | assert isWheelCffi; assert isWheelPandas; runCommand "cffi-pandas-test" { } '' 13 | ${env}/bin/python -c 'import cffi, pandas; print(cffi.__version__); print(pandas.__version__)' > $out 14 | '' 15 | -------------------------------------------------------------------------------- /tests/markdown-it-py-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, pkgs }: 2 | let 3 | inherit (pkgs.stdenv) isLinux; 4 | env = poetry2nix.mkPoetryEnv { 5 | python = python3; 6 | pyproject = ./pyproject.toml; 7 | poetrylock = ./poetry.lock; 8 | preferWheels = false; 9 | overrides = poetry2nix.overrides.withDefaults ( 10 | _final: prev: { 11 | markdown-it-py = prev.markdown-it-py.override { 12 | preferWheel = isLinux; 13 | }; 14 | } 15 | ); 16 | }; 17 | in 18 | assert isLinux -> env.python.pkgs.markdown-it-py.src.isWheel; env 19 | -------------------------------------------------------------------------------- /tests/matplotlib-3-6/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand, python311 }: 2 | let 3 | mkEnv = preferWheel: poetry2nix.mkPoetryEnv { 4 | projectDir = ./.; 5 | python = python311; 6 | overrides = poetry2nix.overrides.withDefaults ( 7 | _: prev: { 8 | matplotlib = prev.matplotlib.override { 9 | inherit preferWheel; 10 | }; 11 | } 12 | ); 13 | }; 14 | in 15 | runCommand "matplotlib-3-6-test" { } '' 16 | ${mkEnv true}/bin/python -c 'import matplotlib' 17 | ${mkEnv false}/bin/python -c 'import matplotlib' 18 | touch $out 19 | '' 20 | -------------------------------------------------------------------------------- /tests/use-url-src/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "use-url-src" 3 | version = "0.1.0" 4 | description = "asserts that .tar.gz via .url works" 5 | authors = [ 6 | "tyberius prime " 7 | ] 8 | license = "MIT" 9 | 10 | [tool.poetry.dependencies] 11 | python = "^3.10" 12 | requests = {url = "https://files.pythonhosted.org/packages/63/70/2bf7780ad2d390a8d301ad0b550f1581eadbd9a20f896afe06353c2a2913/requests-2.32.3.tar.gz"} 13 | 14 | 15 | [build-system] 16 | requires = ["poetry-core>=1.0.0"] 17 | build-backend = "poetry.core.masonry.api" 18 | 19 | 20 | -------------------------------------------------------------------------------- /vendor/pyproject.nix/lib/pep599.nix: -------------------------------------------------------------------------------- 1 | _: 2 | 3 | { 4 | /* 5 | Map Nixpkgs CPU values to target machines known to be supported for manylinux* wheels (a.k.a. `uname -m`), 6 | in nixpkgs found under the attribute `stdenv.targetPlatform.parsed.cpu.name` 7 | 8 | Example: 9 | # legacyAliases.powerpc64 10 | "ppc64" 11 | */ 12 | manyLinuxTargetMachines = { 13 | x86_64 = "x86_64"; 14 | i686 = "i686"; 15 | aarch64 = "aarch64"; 16 | armv7l = "armv7l"; 17 | ppc64 = "powerpc64"; 18 | ppc64le = "powerpc64le"; 19 | s390x = "s390x"; 20 | }; 21 | } 22 | -------------------------------------------------------------------------------- /tests/git-subdirectory-hook/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | projectDir = ./.; 6 | overrides = [ 7 | (final: prev: { 8 | trivial = prev.trivial.overridePythonAttrs (attrs: { 9 | nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ final.poetry-core ]; 10 | }); 11 | }) 12 | poetry2nix.defaultPoetryOverrides 13 | ]; 14 | }; 15 | in 16 | runCommand "git-subdirectory" { } '' 17 | ${env}/bin/python -c 'import trivial' 18 | touch $out 19 | '' 20 | -------------------------------------------------------------------------------- /tests/scientific/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "scientific_test" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = ">=3.10,<3.12" 9 | numpy = "*" 10 | scipy = "~1.14" 11 | scikit-learn = "*" 12 | seaborn = "*" 13 | pandas = "*" 14 | jupyter = "*" 15 | psutil = "5.9.5" 16 | lxml = "^5" 17 | 18 | # FIXME: pin a lower version until we figure out how to build newer ones 19 | nbconvert = "<7" 20 | 21 | [build-system] 22 | requires = ["poetry-core>=1.1"] 23 | build-backend = "poetry.core.masonry.api" 24 | -------------------------------------------------------------------------------- /tests/dependency-groups/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "dependency-groups" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | readme = "README.md" 7 | packages = [{include = "dependency_groups"}] 8 | 9 | [tool.poetry.dependencies] 10 | python = "^3.10" 11 | 12 | [tool.poetry.group.foo.dependencies] 13 | Flask = "^2.2.2" 14 | 15 | [tool.poetry.group.bar.dependencies] 16 | alembic = "^1.8.1" 17 | 18 | [tool.poetry.group.dev.dependencies] 19 | requests = "^2.28.1" 20 | 21 | [build-system] 22 | requires = ["poetry-core"] 23 | build-backend = "poetry.core.masonry.api" 24 | -------------------------------------------------------------------------------- /tests/manylinux/default.nix: -------------------------------------------------------------------------------- 1 | { runCommand, lib, poetry2nix, python39 }: 2 | let 3 | pkg = poetry2nix.mkPoetryApplication { 4 | python = python39; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | overrides = poetry2nix.overrides.withDefaults (_: super: { 9 | opencv-python = super.opencv-python.override { 10 | preferWheel = true; 11 | }; 12 | }); 13 | }; 14 | p = pkg.python.withPackages (ps: [ ps.numpy ps.opencv-python ]); 15 | in 16 | runCommand "test" 17 | { } '' 18 | ${p}/bin/python -c "import cv2" 19 | touch $out 20 | '' 21 | -------------------------------------------------------------------------------- /tests/nbconvert-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = true; 8 | }; 9 | py = env.python; 10 | pkg = py.pkgs.nbconvert; 11 | isNbConvertWheel = pkg.src.isWheel; 12 | in 13 | assert isNbConvertWheel; runCommand "nbconvert-wheel" { } '' 14 | ${env}/bin/python -c 'import nbconvert as nbc; print(nbc.__version__)' > $out 15 | grep -q '"${pkg}", "share", "jupyter"' "${pkg}/${py.sitePackages}/nbconvert/exporters/templateexporter.py" 16 | '' 17 | -------------------------------------------------------------------------------- /tests/no-infinite-recur-on-missing-gitignores/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand, lib }: 2 | let 3 | fakeDir = runCommand "artificial-dir-for-test" { } '' 4 | mkdir -p $out 5 | cp ${./pyproject.toml} $out/pyproject.toml 6 | cp ${./poetry.lock} $out/poetry.lock 7 | echo "print('did not infinitely recurse')" > $out/thing.py 8 | ''; 9 | env = poetry2nix.mkPoetryEnv { 10 | python = python3; 11 | projectDir = poetry2nix.cleanPythonSources { 12 | src = fakeDir; 13 | }; 14 | }; 15 | in 16 | runCommand "infrec-test" { } '' 17 | ${env}/bin/python ${fakeDir}/thing.py > $out 18 | '' 19 | -------------------------------------------------------------------------------- /tests/git-deps-pinned/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "git-deps-pinned" 3 | version = "0.1.0" 4 | description = "poetry2nix test" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.7" 9 | alembic = { git = "https://github.com/sqlalchemy/alembic.git", tag = "rel_1_3_1" } 10 | colorama = { git = "https://github.com/tartley/colorama.git", rev = "4321bbfda9aa190acdad05eb901d3b59439f0ec9" } 11 | s3transfer = { git = "https://github.com/boto/s3transfer.git", branch = "develop" } 12 | 13 | [build-system] 14 | requires = ["poetry-core"] 15 | build-backend = "poetry.core.masonry.api" 16 | -------------------------------------------------------------------------------- /tests/pyside6/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test_pyside6" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["considerate "] 6 | packages = [{include = "test_pyside6", from = "."}] 7 | 8 | [tool.poetry.dependencies] 9 | python = ">=3.10,<3.12" 10 | # PySide6 >= 6.5.3 require MacOS >11, which is currently incompatible with the default github-actions 11 | pyside6 = "<6.5.3" 12 | 13 | [tool.poetry.dev-dependencies] 14 | 15 | [tool.poetry.scripts] 16 | test_pyside6 = "test_pyside6:main" 17 | 18 | [build-system] 19 | requires = ["poetry-core>=1"] 20 | build-backend = "poetry.core.masonry.api" 21 | -------------------------------------------------------------------------------- /tests/cairocffi-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, pkgs, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = false; 8 | overrides = poetry2nix.overrides.withDefaults ( 9 | _: prev: { 10 | cairocffi = prev.cairocffi.override { 11 | preferWheel = true; 12 | }; 13 | } 14 | ); 15 | }; 16 | in 17 | assert env.python.pkgs.cairocffi.src.isWheel; runCommand "cairocffi-wheel" { } '' 18 | ${env}/bin/python -c 'import cairocffi; print(cairocffi.__version__)' > $out 19 | '' 20 | -------------------------------------------------------------------------------- /tests/contourpy-no-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, pkgs, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = false; 8 | overrides = poetry2nix.overrides.withDefaults ( 9 | _: prev: { 10 | numpy = prev.numpy.override { 11 | preferWheel = true; 12 | }; 13 | } 14 | ); 15 | }; 16 | in 17 | assert !env.python.pkgs.contourpy.src.isWheel; runCommand "contourpy-no-wheel" { } '' 18 | ${env}/bin/python -c 'import contourpy; print(contourpy.__version__)' > $out 19 | '' 20 | -------------------------------------------------------------------------------- /tests/path-deps-develop/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | 3 | let 4 | env = poetry2nix.mkPoetryEnv { 5 | python = python3; 6 | projectDir = ./.; 7 | editablePackageSources = { 8 | dep1 = null; 9 | }; 10 | 11 | overrides = poetry2nix.overrides.withDefaults (final: prev: { 12 | dep1 = prev.dep1.overridePythonAttrs (old: { 13 | buildInputs = (old.buildInputs or [ ]) ++ [ final.setuptools ]; 14 | }); 15 | }); 16 | }; 17 | 18 | in 19 | runCommand "path-deps-develop-import" { } '' 20 | echo using ${env} 21 | ${env}/bin/python -c 'import dep1' 22 | echo $? > $out 23 | '' 24 | -------------------------------------------------------------------------------- /tests/pyside6/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python310, runCommand, gnugrep }: 2 | let 3 | app = poetry2nix.mkPoetryApplication { 4 | python = python310; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | pythonImportsCheck = [ 9 | "test_pyside6" 10 | ]; 11 | }; 12 | in 13 | (runCommand "test-pyside6" 14 | { 15 | nativeBuildInputs = [ gnugrep ]; 16 | } '' 17 | set -euo pipefail 18 | ${app}/bin/test_pyside6 > $out 19 | grep QPoint < $out 20 | grep Success < $out 21 | '') // { 22 | inherit (app.python.pkgs) pyside6-addons pyside6-essentials; 23 | } 24 | -------------------------------------------------------------------------------- /hooks/fixup-hook.sh: -------------------------------------------------------------------------------- 1 | poetry2nix-fixup-hook() { 2 | 3 | # Including tests in the output is a common mistake 4 | if [ -z "${dontFixupTests-}" ]; then 5 | rm -rf $out/@pythonSitePackages@/tests 6 | fi 7 | 8 | # Including files in site-packages is a common packaging mistake 9 | # 10 | # While we cannot remove all normal files dumped in site-packages 11 | # we can clean up some common mistakes 12 | if [ -z "${dontFixupSitePackages-}" ]; then 13 | for f in @filenames@; do 14 | rm -f $out/@pythonSitePackages@/$f 15 | done 16 | fi 17 | 18 | } 19 | 20 | postFixupHooks+=(poetry2nix-fixup-hook) 21 | -------------------------------------------------------------------------------- /tests/override-support/default.nix: -------------------------------------------------------------------------------- 1 | { python3, poetry2nix, runCommand }: 2 | let 3 | p = poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | src = ./.; 6 | poetrylock = ./poetry.lock; 7 | pyproject = ./pyproject.toml; 8 | overrides = poetry2nix.overrides.withDefaults ( 9 | _final: prev: { 10 | alembic = prev.alembic.overridePythonAttrs ( 11 | _old: { 12 | TESTING_FOOBAR = 42; 13 | } 14 | ); 15 | } 16 | ); 17 | }; 18 | in 19 | runCommand "test" 20 | { } '' 21 | x=${builtins.toString p.python.pkgs.alembic.TESTING_FOOBAR} 22 | [ "$x" = "42" ] || exit 1 23 | mkdir $out 24 | '' 25 | -------------------------------------------------------------------------------- /tests/dependency-groups/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, runCommand, writeText }: 2 | 3 | let 4 | env = poetry2nix.mkPoetryEnv { 5 | projectDir = ./.; 6 | groups = [ 7 | "dev" 8 | "foo" 9 | ]; 10 | }; 11 | 12 | alembicFailImportCheck = writeText "alembic-import-fail.py" '' 13 | try: 14 | import alembic 15 | except ImportError: 16 | pass 17 | else: 18 | raise ValueError("Alembic import expected to fail!") 19 | ''; 20 | 21 | in 22 | runCommand "dependency-groups" { } '' 23 | ${env}/bin/python -c 'import flask' 24 | ${env}/bin/python -c 'import requests' 25 | ${env}/bin/python ${alembicFailImportCheck} 26 | touch $out 27 | '' 28 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | [Contribution](https://github.com/nix-community/poetry2nix/blob/master/README.md#contributing) checklist (recommended but not always applicable/required): 2 | 3 | - [ ] There's an _[automated test](https://github.com/nix-community/poetry2nix/blob/master/tests/default.nix)_ for this change 4 | - [ ] Commit messages or code include _references to related issues or PRs_ (including third parties) 5 | - [ ] Commit messages are _[conventional](https://www.conventionalcommits.org/)_ - examples from [the log](https://github.com/nix-community/poetry2nix/commits/master) include "feat: add changelog files to fixup hook", "fix(contourpy): allow wheel usage", and "test: add sqlalchemy2 test" 6 | -------------------------------------------------------------------------------- /tests/avro-python3/poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. 2 | 3 | [[package]] 4 | name = "avro-python3" 5 | version = "1.10.2" 6 | description = "Avro is a serialization and RPC framework." 7 | optional = false 8 | python-versions = ">=3.5" 9 | files = [ 10 | {file = "avro-python3-1.10.2.tar.gz", hash = "sha256:3b63f24e6b04368c3e4a6f923f484be0230d821aad65ac36108edbff29e9aaab"}, 11 | ] 12 | 13 | [package.extras] 14 | snappy = ["python-snappy"] 15 | zstandard = ["zstandard"] 16 | 17 | [metadata] 18 | lock-version = "2.0" 19 | python-versions = "^3.10" 20 | content-hash = "c13c79a4d02e7658dd2226b023c630ece7b181eb0777eefcdd1ed96b791ea116" 21 | -------------------------------------------------------------------------------- /tests/git-deps-1_2_0/poetry.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "colorama" 3 | version = "0.4.4" 4 | description = "Cross-platform colored terminal text." 5 | category = "dev" 6 | optional = false 7 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" 8 | develop = false 9 | 10 | [package.source] 11 | type = "git" 12 | url = "https://github.com/tartley/colorama.git" 13 | reference = "4321bbfda9aa190acdad05eb901d3b59439f0ec9" 14 | resolved_reference = "4321bbfda9aa190acdad05eb901d3b59439f0ec9" 15 | 16 | [metadata] 17 | lock-version = "1.1" 18 | python-versions = "^3.6" 19 | content-hash = "cf3328f9b1d26a4b56fa6280838582940d6af2352ed39272c062503e302b8445" 20 | 21 | [metadata.files] 22 | colorama = [] 23 | -------------------------------------------------------------------------------- /tests/use-url-src/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python3, stdenv }: 2 | let 3 | args = { 4 | python = python3; 5 | projectDir = ./.; 6 | preferWheels = true; 7 | }; 8 | py = poetry2nix.mkPoetryPackages args; 9 | app = poetry2nix.mkPoetryApplication args; 10 | url_nix_store = py.python.pkgs.requests.src; 11 | url_is_wheel = url_nix_store.isWheel or false; 12 | is_wheel_attr_test = x: lib.warnIf (!stdenv.isLinux && url_is_wheel) 13 | "url should resolve to a not wheel" 14 | x; 15 | is_wheel_test = x: assert lib.strings.hasSuffix "tar.gz" url_nix_store; x; 16 | app_builds = x: assert lib.isDerivation app; x; 17 | in 18 | lib.pipe app [ is_wheel_attr_test is_wheel_test app_builds ] 19 | -------------------------------------------------------------------------------- /tests/python-magic/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python310, runCommand }: 2 | 3 | let 4 | mkEnv = preferWheel: poetry2nix.mkPoetryEnv { 5 | python = python310; 6 | pyproject = ./pyproject.toml; 7 | poetrylock = ./poetry.lock; 8 | overrides = poetry2nix.overrides.withDefaults ( 9 | _: prev: { 10 | python-magic = prev.python-magic.override { 11 | inherit preferWheel; 12 | }; 13 | } 14 | ); 15 | }; 16 | wheelEnv = mkEnv true; 17 | srcEnv = mkEnv false; 18 | in 19 | runCommand "python-magic-test" { } '' 20 | set -euo pipefail 21 | ${wheelEnv}/bin/python -c 'import magic' > $out 22 | ${srcEnv}/bin/python -c 'import magic' >> $out 23 | touch $out 24 | '' 25 | -------------------------------------------------------------------------------- /tests/decli/poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. 2 | 3 | [[package]] 4 | name = "decli" 5 | version = "0.6.2" 6 | description = "Minimal, easy-to-use, declarative cli tool" 7 | optional = false 8 | python-versions = ">=3.7" 9 | files = [ 10 | {file = "decli-0.6.2-py3-none-any.whl", hash = "sha256:2fc84106ce9a8f523ed501ca543bdb7e416c064917c12a59ebdc7f311a97b7ed"}, 11 | {file = "decli-0.6.2.tar.gz", hash = "sha256:36f71eb55fd0093895efb4f416ec32b7f6e00147dda448e3365cf73ceab42d6f"}, 12 | ] 13 | 14 | [metadata] 15 | lock-version = "2.0" 16 | python-versions = "^3.10" 17 | content-hash = "59965a2a319bea959173f0af909d76b5e5c2d0c623793b2ca4968d59e38c50a5" 18 | -------------------------------------------------------------------------------- /tests/pep600/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "test-pep600" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | # this is a mess https://github.com/isl-org/Open3D/issues/2991 10 | # https://github.com/isl-org/Open3D/issues/5747#issuecomment-1332731934 11 | open3d = "*" 12 | scikit-learn = "*" 13 | jupyter-packaging = "=0.12.3" 14 | addict = "*" 15 | pillow = "*" 16 | matplotlib = "*" 17 | numpy = "*" 18 | pandas = "*" 19 | pyyaml = "*" 20 | tqdm = "*" 21 | pyquaternion = "*" 22 | 23 | [tool.poetry.dev-dependencies] 24 | 25 | [build-system] 26 | requires = ["poetry-core>=1.0.0"] 27 | build-backend = "poetry.core.masonry.api" 28 | -------------------------------------------------------------------------------- /tests/decli-pre-0_6_2/poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. 2 | 3 | [[package]] 4 | name = "decli" 5 | version = "0.6.1" 6 | description = "Minimal, easy-to-use, declarative cli tool" 7 | optional = false 8 | python-versions = ">=3.7" 9 | files = [ 10 | {file = "decli-0.6.1-py3-none-any.whl", hash = "sha256:7815ac58617764e1a200d7cadac6315fcaacc24d727d182f9878dd6378ccf869"}, 11 | {file = "decli-0.6.1.tar.gz", hash = "sha256:ed88ccb947701e8e5509b7945fda56e150e2ac74a69f25d47ac85ef30ab0c0f0"}, 12 | ] 13 | 14 | [metadata] 15 | lock-version = "2.0" 16 | python-versions = "^3.10" 17 | content-hash = "4da538054da4456e47fc2c9625e24408683a5b5f79f078187316423f8b27872d" 18 | -------------------------------------------------------------------------------- /tests/contourpy-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, pkgs, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = false; 8 | overrides = poetry2nix.overrides.withDefaults ( 9 | _: prev: { 10 | contourpy = prev.contourpy.override { 11 | preferWheel = true; 12 | }; 13 | numpy = prev.numpy.override { 14 | preferWheel = true; 15 | }; 16 | } 17 | ); 18 | }; 19 | in 20 | assert env.python.pkgs.contourpy.src.isWheel; runCommand "contourpy-wheel" { } '' 21 | ${env}/bin/python -c 'import contourpy; print(contourpy.__version__)' > $out 22 | '' 23 | -------------------------------------------------------------------------------- /tests/scikit-learn/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | overrides = poetry2nix.overrides.withDefaults ( 8 | _: prev: { 9 | numpy = prev.numpy.override { 10 | preferWheel = true; 11 | }; 12 | scipy = prev.scipy.override { 13 | preferWheel = true; 14 | }; 15 | pandas = prev.pandas.override { 16 | preferWheel = true; 17 | }; 18 | } 19 | ); 20 | }; 21 | in 22 | runCommand "scikit-learn-test" { } '' 23 | ${env}/bin/python -c 'import sklearn; print(sklearn.__version__)' > $out 24 | '' 25 | -------------------------------------------------------------------------------- /tests/use-url-wheel/default.nix: -------------------------------------------------------------------------------- 1 | { lib, poetry2nix, python311, stdenv }: 2 | let 3 | args = { 4 | python = python311; 5 | projectDir = ./.; 6 | preferWheels = true; 7 | }; 8 | py = poetry2nix.mkPoetryPackages args; 9 | app = poetry2nix.mkPoetryApplication args; 10 | url_nix_store = py.python.pkgs.de-core-news-sm.src; 11 | url_is_wheel = url_nix_store.isWheel or false; 12 | is_wheel_attr_test = x: lib.warnIf (!stdenv.isLinux && !url_is_wheel) 13 | "url should resolve to have src with .isWheel" 14 | x; 15 | is_wheel_test = x: assert lib.strings.hasSuffix "whl" url_nix_store; x; 16 | app_builds = x: assert lib.isDerivation app; x; 17 | in 18 | lib.pipe app [ is_wheel_attr_test is_wheel_test app_builds ] 19 | -------------------------------------------------------------------------------- /vendor/pyproject.nix/lib/default.nix: -------------------------------------------------------------------------------- 1 | { lib }: 2 | let 3 | inherit (builtins) mapAttrs; 4 | inherit (lib) fix; 5 | in 6 | 7 | fix ( 8 | self: 9 | mapAttrs (_: path: import path ({ inherit lib; } // self)) { 10 | pip = ./pip.nix; 11 | pypa = ./pypa.nix; 12 | project = ./project.nix; 13 | renderers = ./renderers.nix; 14 | validators = ./validators.nix; 15 | scripts = ./scripts.nix; 16 | poetry = ./poetry.nix; 17 | eggs = ./eggs.nix; 18 | pep440 = ./pep440.nix; 19 | pep508 = ./pep508.nix; 20 | pep518 = ./pep518.nix; 21 | pep599 = ./pep599.nix; 22 | pep600 = ./pep600.nix; 23 | pep621 = ./pep621.nix; 24 | pep656 = ./pep656.nix; 25 | pep723 = ./pep723.nix; 26 | } 27 | ) 28 | -------------------------------------------------------------------------------- /tests/pep600/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python310, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python310; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | overrides = poetry2nix.overrides.withDefaults (_final: prev: { 8 | threadpoolctl = prev.threadpoolctl.override { preferWheel = true; }; 9 | pandas = prev.pandas.override { preferWheel = true; }; 10 | pyquaternion = prev.pyquaternion.override { preferWheel = true; }; 11 | scikit-learn = prev.scikit-learn.override { preferWheel = true; }; 12 | }); 13 | }; 14 | in 15 | runCommand "pep600-test" 16 | { } '' 17 | ${env}/bin/python -c 'import open3d; print(open3d.__version__)' 18 | touch $out 19 | '' 20 | -------------------------------------------------------------------------------- /tests/use-url-wheel/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "use-url-wheel" 3 | version = "0.1.0" 4 | description = "asserts that .whl via .url works" 5 | authors = [ 6 | "pegasust ", 7 | "joopitz " 8 | ] 9 | license = "MIT" 10 | 11 | [tool.poetry.dependencies] 12 | python = "^3.10" 13 | de_core_news_sm = {url = "https://github.com/explosion/spacy-models/releases/download/de_core_news_sm-3.6.0/de_core_news_sm-3.6.0-py3-none-any.whl"} 14 | torch = "2.0.0" 15 | 16 | [tool.poetry.scripts] 17 | test = "whl_test.main:main" 18 | 19 | [build-system] 20 | requires = ["poetry-core>=1.0.0"] 21 | build-backend = "poetry.core.masonry.api" 22 | 23 | [[tool.poetry.packages]] 24 | include = "whl_test" 25 | 26 | -------------------------------------------------------------------------------- /tests/blinker/poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. 2 | 3 | [[package]] 4 | name = "blinker" 5 | version = "1.6.3" 6 | description = "Fast, simple object-to-object and broadcast signaling" 7 | category = "main" 8 | optional = false 9 | python-versions = ">=3.7" 10 | files = [ 11 | {file = "blinker-1.6.3-py3-none-any.whl", hash = "sha256:296320d6c28b006eb5e32d4712202dbcdcbf5dc482da298c2f44881c43884aaa"}, 12 | {file = "blinker-1.6.3.tar.gz", hash = "sha256:152090d27c1c5c722ee7e48504b02d76502811ce02e1523553b4cf8c8b3d3a8d"}, 13 | ] 14 | 15 | [metadata] 16 | lock-version = "2.0" 17 | python-versions = "^3.10" 18 | content-hash = "569fc52da060bbd7bec2b0cd95874bb8abdd82ca9a827526bf29e01072745591" 19 | -------------------------------------------------------------------------------- /tests/blinker-1_6_2/poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. 2 | 3 | [[package]] 4 | name = "blinker" 5 | version = "1.6.2" 6 | description = "Fast, simple object-to-object and broadcast signaling" 7 | category = "main" 8 | optional = false 9 | python-versions = ">=3.7" 10 | files = [ 11 | {file = "blinker-1.6.2-py3-none-any.whl", hash = "sha256:c3d739772abb7bc2860abf5f2ec284223d9ad5c76da018234f6f50d6f31ab1f0"}, 12 | {file = "blinker-1.6.2.tar.gz", hash = "sha256:4afd3de66ef3a9f8067559fb7a1cbe555c17dcbe15971b05d1b625c3e7abe213"}, 13 | ] 14 | 15 | [metadata] 16 | lock-version = "2.0" 17 | python-versions = "^3.10" 18 | content-hash = "1dcdde0c234dd281f25eb0b186df448fc07674e199f9b37c827dc62dcadb1d5b" 19 | -------------------------------------------------------------------------------- /tests/editable/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | 8 | editablePackageSources = { 9 | # Usually this would be trivial = ./src 10 | # But we use this here to be able to test it 11 | # in a derivation build 12 | trivial = "/build/src"; 13 | }; 14 | }; 15 | in 16 | runCommand "editable-test" 17 | { } '' 18 | cp -r --no-preserve=mode ${./src} src 19 | echo 'print("Changed")' > src/trivial/__main__.py 20 | if [[ $(${env}/bin/python -m trivial) != "Changed" ]]; then 21 | echo "Package wasn't editable!" 22 | exit 1 23 | fi 24 | touch $out 25 | '' // { inherit env; } 26 | -------------------------------------------------------------------------------- /tests/canonical-module-names/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, lib, poetry2nix, python3 }: 2 | 3 | poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | src = lib.cleanSource ./.; 8 | 9 | overrides = [ 10 | poetry2nix.defaultPoetryOverrides 11 | (import ./poetry-git-overlay.nix { inherit pkgs; }) 12 | ( 13 | _final: prev: { 14 | pyramid-deferred-sqla = prev.pyramid-deferred-sqla.overridePythonAttrs ( 15 | _old: { 16 | postPatch = '' 17 | touch LICENSE 18 | substituteInPlace setup.py --replace-warn 'setup_requires=["pytest-runner"],' "" 19 | ''; 20 | } 21 | ); 22 | } 23 | ) 24 | ]; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /tests/dependency-environment/default.nix: -------------------------------------------------------------------------------- 1 | { curl, lib, poetry2nix, python311, runCommand }: 2 | let 3 | app = poetry2nix.mkPoetryApplication { 4 | python = python311; 5 | src = lib.cleanSource ./.; 6 | pyproject = ./pyproject.toml; 7 | poetrylock = ./poetry.lock; 8 | }; 9 | 10 | # Test support for overriding the app passed to the environment 11 | overridden = app.overrideAttrs (old: { 12 | name = "${old.pname}-overridden-${old.version}"; 13 | }); 14 | depEnv = app.dependencyEnv.override { 15 | app = overridden; 16 | }; 17 | in 18 | runCommand "dependency-environment-test" 19 | { } '' 20 | ${depEnv}/bin/gunicorn --bind=unix:socket trivial:app & 21 | sleep 1 22 | ${curl}/bin/curl --unix-socket socket localhost 23 | touch $out 24 | '' 25 | -------------------------------------------------------------------------------- /tests/fetched-projectdir/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, poetry2nix, python39, fetchFromGitHub }: 2 | 3 | let 4 | rawProjectDir = fetchFromGitHub { 5 | owner = "nix-community"; 6 | repo = "pynixutil"; 7 | rev = "d27d778dc9109227b927ab88fedb2e3c2d6a7265"; 8 | sha256 = "sha256-+Ey384Nz6hvDZAA5OYO0EAGkGjY9Kz4134CRIMjEeyg="; 9 | }; 10 | # patch the project dir to use poetry-core instead of poetry 11 | projectDir = pkgs.runCommand "fetched-projectdir" { } '' 12 | mkdir -p $out 13 | cp -r ${rawProjectDir}/* $out 14 | sed \ 15 | -i $out/pyproject.toml \ 16 | -e 's/poetry>=0\.12/poetry-core/g' \ 17 | -e 's/poetry\.masonry/poetry.core.masonry/g' 18 | ''; 19 | in 20 | poetry2nix.mkPoetryApplication { 21 | inherit projectDir; 22 | python = python39; 23 | } 24 | -------------------------------------------------------------------------------- /tests/python-magic/poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. 2 | 3 | [[package]] 4 | name = "python-magic" 5 | version = "0.4.27" 6 | description = "File type identification using libmagic" 7 | optional = false 8 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" 9 | files = [ 10 | {file = "python-magic-0.4.27.tar.gz", hash = "sha256:c1ba14b08e4a5f5c31a302b7721239695b2f0f058d125bd5ce1ee36b9d9d3c3b"}, 11 | {file = "python_magic-0.4.27-py2.py3-none-any.whl", hash = "sha256:c212960ad306f700aa0d01e5d7a325d20548ff97eb9920dcd29513174f0294d3"}, 12 | ] 13 | 14 | [metadata] 15 | lock-version = "2.0" 16 | python-versions = "^3.8" 17 | content-hash = "1a3e916cc0a6deaa3c0242da3eb80d17ba92a350f5559eda7dbaf8a41d2577e7" 18 | -------------------------------------------------------------------------------- /tests/wheel-wheel/poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. 2 | 3 | [[package]] 4 | name = "wheel" 5 | version = "0.41.2" 6 | description = "A built-package format for Python" 7 | optional = false 8 | python-versions = ">=3.7" 9 | files = [ 10 | {file = "wheel-0.41.2-py3-none-any.whl", hash = "sha256:75909db2664838d015e3d9139004ee16711748a52c8f336b52882266540215d8"}, 11 | {file = "wheel-0.41.2.tar.gz", hash = "sha256:0c5ac5ff2afb79ac23ab82bab027a0be7b5dbcf2e54dc50efe4bf507de1f7985"}, 12 | ] 13 | 14 | [package.extras] 15 | test = ["pytest (>=6.0.0)", "setuptools (>=65)"] 16 | 17 | [metadata] 18 | lock-version = "2.0" 19 | python-versions = "^3.9" 20 | content-hash = "14f3aa44ea94b16c43af314bc72ef4952886888ba3546ca76a9d67c26deac02a" 21 | -------------------------------------------------------------------------------- /tests/colour/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python3, runCommand }: 2 | let 3 | env-wheel = poetry2nix.mkPoetryEnv { 4 | python = python3; 5 | pyproject = ./pyproject.toml; 6 | poetrylock = ./poetry.lock; 7 | preferWheels = true; 8 | }; 9 | env-no-wheel = poetry2nix.mkPoetryEnv { 10 | python = python3; 11 | pyproject = ./pyproject.toml; 12 | poetrylock = ./poetry.lock; 13 | preferWheels = false; 14 | }; 15 | isWheel = env-wheel.python.pkgs.colour.src.isWheel or false; 16 | isNotWheel = env-no-wheel.python.pkgs.colour.src.isWheel or false; 17 | in 18 | assert isWheel; assert !isNotWheel; runCommand "colour-test" { } '' 19 | ${env-wheel}/bin/python -c 'import colour; print("wheel")' > $out 20 | ${env-no-wheel}/bin/python -c 'import colour; print("source")' >> $out 21 | '' 22 | -------------------------------------------------------------------------------- /tests/colour/poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. 2 | 3 | [[package]] 4 | name = "colour" 5 | version = "0.1.5" 6 | description = "converts and manipulates various color representation (HSL, RVB, web, X11, ...)" 7 | optional = false 8 | python-versions = "*" 9 | files = [ 10 | {file = "colour-0.1.5-py2.py3-none-any.whl", hash = "sha256:33f6db9d564fadc16e59921a56999b79571160ce09916303d35346dddc17978c"}, 11 | {file = "colour-0.1.5.tar.gz", hash = "sha256:af20120fefd2afede8b001fbef2ea9da70ad7d49fafdb6489025dae8745c3aee"}, 12 | ] 13 | 14 | [package.extras] 15 | test = ["nose"] 16 | 17 | [metadata] 18 | lock-version = "2.0" 19 | python-versions = "^3.9" 20 | content-hash = "6adc767732ee9be4951869f6b5bb352b2ea37d13a3b56942f64e216b06709bd5" 21 | -------------------------------------------------------------------------------- /tests/dependency-environment/poetry.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | category = "main" 3 | description = "WSGI HTTP Server for UNIX" 4 | name = "gunicorn" 5 | optional = false 6 | python-versions = ">=2.6, !=3.0.*, !=3.1.*" 7 | version = "19.10.0" 8 | 9 | [package.extras] 10 | eventlet = ["eventlet (>=0.9.7)"] 11 | gevent = ["gevent (>=0.13)"] 12 | tornado = ["tornado (>=0.2)"] 13 | 14 | [metadata] 15 | content-hash = "0114cd5ff6f51e66caf2a287d7cd723e38549ec1c57b4999a2585ac6c86b9b06" 16 | python-versions = "*" 17 | 18 | [metadata.files] 19 | gunicorn = [ 20 | {file = "gunicorn-19.10.0-py2.py3-none-any.whl", hash = "sha256:c3930fe8de6778ab5ea716cab432ae6335fa9f03b3f2c3e02529214c476f4bcb"}, 21 | {file = "gunicorn-19.10.0.tar.gz", hash = "sha256:f9de24e358b841567063629cd0a656b26792a41e23a24d0dcb40224fc3940081"}, 22 | ] 23 | -------------------------------------------------------------------------------- /tests/rfc3986-validator/poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry and should not be changed by hand. 2 | 3 | [[package]] 4 | name = "rfc3986-validator" 5 | version = "0.1.1" 6 | description = "Pure python rfc3986 validator" 7 | category = "main" 8 | optional = false 9 | python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" 10 | files = [ 11 | {file = "rfc3986_validator-0.1.1-py2.py3-none-any.whl", hash = "sha256:2f235c432ef459970b4306369336b9d5dbdda31b510ca1e327636e01f528bfa9"}, 12 | {file = "rfc3986_validator-0.1.1.tar.gz", hash = "sha256:3d44bde7921b3b9ec3ae4e3adca370438eccebc676456449b145d533b240d055"}, 13 | ] 14 | 15 | [metadata] 16 | lock-version = "2.0" 17 | python-versions = "^3.10" 18 | content-hash = "5b6dd3c49af897c544432440d9ece3c7acf8364d72cd7c7332f83296d7a0895b" 19 | -------------------------------------------------------------------------------- /hooks/remove-special-dependencies.sh: -------------------------------------------------------------------------------- 1 | remove-@kind@-dependencies-hook() { 2 | # Tell poetry not to resolve special dependencies. Any version is fine! 3 | 4 | if ! test -f pyproject.toml; then 5 | return 6 | fi 7 | 8 | echo "Removing @kind@ dependencies" 9 | 10 | # NOTE: We have to reset PYTHONPATH to avoid having propagatedBuildInputs 11 | # from the currently building derivation leaking into our unrelated Python 12 | # environment. 13 | PYTHONPATH=@pythonPath@ \ 14 | @pythonInterpreter@ \ 15 | @pyprojectPatchScript@ \ 16 | --fields-to-remove @fields@ < pyproject.toml > pyproject.formatted.toml 17 | 18 | mv pyproject.formatted.toml pyproject.toml 19 | 20 | echo "Finished removing @kind@ dependencies" 21 | } 22 | 23 | postPatchHooks+=(remove-@kind@-dependencies-hook) 24 | -------------------------------------------------------------------------------- /tests/override-default-support/default.nix: -------------------------------------------------------------------------------- 1 | { python3, poetry2nix, runCommand }: 2 | let 3 | p = poetry2nix.mkPoetryApplication { 4 | python = python3; 5 | src = ./.; 6 | poetrylock = ./poetry.lock; 7 | pyproject = ./pyproject.toml; 8 | overrides = [ 9 | (( 10 | poetry2nix.defaultPoetryOverrides.overrideOverlay ( 11 | _final: prev: { 12 | alembic = prev.alembic.overridePythonAttrs ( 13 | _old: { 14 | TESTING_FOOBAR = 42; 15 | } 16 | ); 17 | } 18 | ) 19 | ).extend (_pyfinal: _pyprev: { })) # Test .extend for good measure 20 | ]; 21 | }; 22 | in 23 | runCommand "test" 24 | { } '' 25 | x=${builtins.toString p.python.pkgs.alembic.TESTING_FOOBAR} 26 | [ "$x" = "42" ] || exit 1 27 | mkdir $out 28 | '' 29 | -------------------------------------------------------------------------------- /fetchers/fetch-from-pypi.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # shellcheck disable=SC1091,SC2154 4 | source "$stdenv/setup" 5 | set -euo pipefail 6 | 7 | curl="curl \ 8 | --location \ 9 | --max-redirs 20 \ 10 | --retry 2 \ 11 | --disable-epsv \ 12 | --cookie-jar cookies \ 13 | --insecure \ 14 | --speed-time 5 \ 15 | --progress-bar \ 16 | --fail \ 17 | $curlOpts \ 18 | $NIX_CURL_FLAGS" 19 | 20 | echo "Trying to fetch with predicted URL: $predictedURL" 21 | 22 | $curl "$predictedURL" --output "$out" && exit 0 23 | 24 | echo "Predicted URL '$predictedURL' failed, querying pypi.org" 25 | $curl "https://pypi.org/pypi/$pname/json" | jq -r ".releases.\"$version\"[] | select(.filename == \"$file\") | .url" > url 26 | url=$(cat url) 27 | $curl "$url" --output "$out" 28 | -------------------------------------------------------------------------------- /tests/affine-pre-2-4/poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry and should not be changed by hand. 2 | 3 | [[package]] 4 | name = "affine" 5 | version = "2.3.1" 6 | description = "Matrices describing affine transformation of the plane." 7 | category = "main" 8 | optional = false 9 | python-versions = "*" 10 | files = [ 11 | {file = "affine-2.3.1-py2.py3-none-any.whl", hash = "sha256:de17839ff05e965580870c3b15e14cefd7992fa05dba9202a0879bbed0c171e4"}, 12 | {file = "affine-2.3.1.tar.gz", hash = "sha256:d676de66157ad6af99ffd94e0f54e89dfc35b0fb7252ead2ed0ad2dca431bdd0"}, 13 | ] 14 | 15 | [package.extras] 16 | test = ["coveralls", "flake8", "pydocstyle", "pytest (>=4.6)", "pytest-cov"] 17 | 18 | [metadata] 19 | lock-version = "2.0" 20 | python-versions = "~3.10" 21 | content-hash = "ee87b695796c7a7762a15650e1d9c2188951d8c2b8b0514c6b254d4169d3ec5b" 22 | -------------------------------------------------------------------------------- /tests/affine/poetry.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Poetry and should not be changed by hand. 2 | 3 | [[package]] 4 | name = "affine" 5 | version = "2.4.0" 6 | description = "Matrices describing affine transformation of the plane" 7 | category = "main" 8 | optional = false 9 | python-versions = ">=3.7" 10 | files = [ 11 | {file = "affine-2.4.0-py3-none-any.whl", hash = "sha256:8a3df80e2b2378aef598a83c1392efd47967afec4242021a0b06b4c7cbc61a92"}, 12 | {file = "affine-2.4.0.tar.gz", hash = "sha256:a24d818d6a836c131976d22f8c27b8d3ca32d0af64c1d8d29deb7bafa4da1eea"}, 13 | ] 14 | 15 | [package.extras] 16 | dev = ["coveralls", "flake8", "pydocstyle"] 17 | test = ["pytest (>=4.6)", "pytest-cov"] 18 | 19 | [metadata] 20 | lock-version = "2.0" 21 | python-versions = "~3.10" 22 | content-hash = "a17acb06e6745c300f967b55a11562c81a67255fd6240d558662413eb9bc310d" 23 | -------------------------------------------------------------------------------- /dev/treefmt.nix: -------------------------------------------------------------------------------- 1 | { pkgs, lib, ... }: 2 | { 3 | # Used to find the project root 4 | projectRootFile = "flake.lock"; 5 | 6 | settings.formatter = { 7 | build-systems = { 8 | command = "sh"; 9 | options = [ 10 | "-eucx" 11 | '' 12 | for i in "$@"; do 13 | ${lib.getExe pkgs.jq} --from-file overrides/sort-build-systems.jq --raw-output --sort-keys < "$i" | ${lib.getBin pkgs.moreutils}/bin/sponge "$i" 14 | done 15 | '' 16 | "--" 17 | ]; 18 | includes = [ "overrides/build-systems.json" ]; 19 | excludes = [ ]; 20 | }; 21 | 22 | black.excludes = [ "vendor/**.py" ]; 23 | 24 | deadnix.excludes = [ "vendor/**.nix" ]; 25 | statix.excludes = [ "vendor/**.nix" ]; 26 | }; 27 | 28 | programs.deadnix.enable = true; 29 | programs.statix.enable = true; 30 | programs.black.enable = true; 31 | } 32 | -------------------------------------------------------------------------------- /tests/text-generation-webui/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "text-generation-webui-build" 3 | version = "0.1.0" 4 | description = "" 5 | authors = ["Your Name "] 6 | 7 | [tool.poetry.dependencies] 8 | python = "^3.10" 9 | accelerate = "*" 10 | colorama = "^0.4.6" 11 | datasets = "^2.11.0" 12 | flexgen = "0.1.7" 13 | gradio = "3.25.0" 14 | markdown = "^3.4.3" 15 | numpy = "^1.24.3" 16 | pandas = "^2.0.0" 17 | pillow = ">=9.5.0" 18 | pybind11 = "2.10.4" 19 | pyyaml = "^6.0" 20 | requests = "^2.28.2" 21 | rwkv = "0.7.3" 22 | safetensors = "0.3.0" 23 | sentencepiece = "^0.1.98" 24 | tqdm = "^4.65.0" 25 | peft = {git = "https://github.com/huggingface/peft"} 26 | transformers = "4.28.1" 27 | bitsandbytes = {version = "0.38.1", markers = "platform_system != \"Windows\""} 28 | llama-cpp-python = {version = "0.1.34"} 29 | 30 | [build-system] 31 | requires = ["poetry-core"] 32 | build-backend = "poetry.core.masonry.api" 33 | -------------------------------------------------------------------------------- /tests/cmdstanpy/default.nix: -------------------------------------------------------------------------------- 1 | { poetry2nix, python310, runCommand }: 2 | 3 | let 4 | mkEnv = preferWheel: poetry2nix.mkPoetryEnv { 5 | python = python310; 6 | pyproject = ./pyproject.toml; 7 | poetrylock = ./poetry.lock; 8 | overrides = poetry2nix.overrides.withDefaults ( 9 | _: prev: { 10 | cmdstanpy = prev.cmdstanpy.override { 11 | inherit preferWheel; 12 | }; 13 | numpy = prev.numpy.override { 14 | preferWheel = true; 15 | }; 16 | pandas = prev.pandas.override { 17 | preferWheel = true; 18 | }; 19 | } 20 | ); 21 | }; 22 | wheelEnv = mkEnv true; 23 | srcEnv = mkEnv false; 24 | in 25 | runCommand "cmdstanpy-test" { } '' 26 | set -euo pipefail 27 | ${wheelEnv}/bin/python -c 'import cmdstanpy; print(cmdstanpy.__version__)' > $out 28 | ${srcEnv}/bin/python -c 'import cmdstanpy; print(cmdstanpy.__version__)' >> $out 29 | touch $out 30 | '' 31 | --------------------------------------------------------------------------------