Closed ehmatthes closed 1 year ago
[tool.poetry.group.deploy]
add_poetry_package()
from add_package()
when poetry detected.poetry add package_name --group deploy
(No, this doesn't install which is good, but it does rewrite lock file, which we don't want.)poetry install ---with deploy
--skip-lock
, and let end users choose when to lock again. (No, this is a pipenv option not poetry.)Quick demo for trying out poetry installation commands.
$ mkdir poetry_install_test && cd poetry_install_test
$ python3 -m venv venv
$ source venv/bin/activate
$ poetry init
$ poetry add django
# Modify pyproject.toml to have a group "deploy", with "optional" property.
# Add gunicorn and dj-database-url to this group.
$ poetry install
# should not install gunicorn, dj-database-url
$ poetry install --with deploy
# should install gunicorn, dj-database-url
I'm not entirely sure how all of this impacts the poetry.lock file, ie can you install the optional group without updating the lock file?
This is what pyproject.toml should look like:
...
[tool.poetry.group.deploy]
optional = true
[tool.poetry.group.deploy.dependencies]
gunicorn = "*"
dj-database-url = "*"
manage.py simple_deploy --platform platform_name --unit-testing
against a test project simulates a configuration run.pkg_present
in _add_req_txt_pkg()
. It looks like django
would not be added if django-anything
was already installed.
dockerfile_poetry
template which uses poetry instead of pip.This feels great. :)
I believe fly deployments fail on the restructure_pkg_man branch right now, because we no longer generate a requirements.txt file in simple_deploy when using Poetry, and the fly deploy script is doing nothing to respond to poetry specifically.
add_poetry_package()
method for simple_deploy.py.deploy
, and make these requirements optional so they're not required for local builds.