Skip to content

Repackage in virtualenv #74

@m-roberts

Description

@m-roberts

https://jhermann.github.io/blog/python/devops/2020/03/28/dh_virtualenv_howto.html

Work in progress spec:

  • Get package working without Debian or Docker packaging
    • Python package must be essentially standalone (i.e. inside of 1 folder with an __init__.py at the root)
    • Add setup.py:
      • Define CLI entrypoint; update systemd service entrypoint
      • Define fines currently in debian/*.install as text asset files; refer to their location relative to the package (via the include_package_data option of setuptools?)
    • Add dh-virtualenv as a build dependency

Here is an example minimal Python project for reference.

Note: someone was having issues with mixing virtualenvs:

I've used this method but the resulting deb package is not working in other machines with different python3 version. I've built it using python 3.7 and now the application has a lib/python3.7 after installation, and it's not working with python 3.8. Is there something I missed?

Here is a "very small shim for dh-virtualenv to allow it to use pipenv when installing dependencies" - does this fix #40?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions