Skip to content

Individual requirements should allow pipenv/poetry for functions #576

@michael-c-hoffman

Description

@michael-c-hoffman

When using package individually, the requirements are not pulled from a Pipfile/peotry file if present, only requirements.txt
(this is a completely different behaviour than when not using package individually as at the root of the project on can use Pipfile/poetry)

If there is a Pipfile/poetry file at the root when using package individually the root level requirements are only packaged not the root+function or just function requirements.

I would like to continue to use Pipfile at the root level as this contains development packages for pytest and other frameworks. I would then like to include a Pipfile in each function that needs to be package with that function's requirements. Currently if serverless-python-requirements detects a Pipfile at the root all other function requirements are ignored.

Activity

antoinechamot

antoinechamot commented on Apr 8, 2021

@antoinechamot

same here with:
package:
individually: true

if i have a Pipfile in my module it is just ignored

changed the title [-]individual requirements allow pipenv/peotry for functions[/-] [+]Individual requirements should allow pipenv/poetry for functions[/+] on Apr 11, 2021
bsamuel-ui

bsamuel-ui commented on Apr 11, 2021

@bsamuel-ui
Contributor

What would you expect the layout to look like? For instance:

serverless.yml
module1/
    pyproject.toml
    func1/
        __init__.py
module2/
    Pipfile
    func2/
        __init__.py
michael-c-hoffman

michael-c-hoffman commented on Jul 23, 2021

@michael-c-hoffman
Author

yes, that would be the expected layout

gerbenoostra

gerbenoostra commented on Nov 25, 2021

@gerbenoostra

I also expected to have pyproject.toml & requirements.txt to behave similar: if there's a pyproject.toml in the module directory, it would be used as preprocessing step to create the requirements.txt in the module dir.

However, only a pyproject.toml in the root folder results in creating a requirements.txt (in the root folder)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @michael-c-hoffman@gerbenoostra@bsamuel-ui@antoinechamot

        Issue actions

          Individual requirements should allow pipenv/poetry for functions · Issue #576 · serverless/serverless-python-requirements