Skip to content

Requirement / include for package from local path #215

Closed
@ronyis

Description

@ronyis

I have a project in which multiple services are defined on a single repository, with many dependencies between them (we have considered splitting the repo but we prefer it like that in order to have a single version tag, and easier development process).

The repository looks like:

service1/
---serverless.yml
---requirements.txt
---handler1.py
---service1/
------__init__.py
------resource1.py
service2/
---serverless.yml
---requirements.txt
---handler2.py
---service2/
------__init__.py
------resource2.py
utils/
---__init__.py
---general.py

Each service should be able to import modules from any other service.
Since it's not possible on Serverless framework to add files from an outer directory, I was thinking to use the 'vendor' option for doing that (as offered in #168). The problem that it allows me to choose only a single directory. Using an upper directory isn't possible due to recursion error.

Another (preferred) approach is to install each package with pip, but using local paths in the requirements file doesn't work since they are not available in the docker.

The only solution for me now is to use symbolic links which is much less convenient (and still doesn't let me use local paths in the requirements file for real package installation).

Any solution for that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions