How to set in my own module dependency on a composer package? I have some of my own modules written on Drupal 7 that use composer packages. These composer packages are downloaded with the module Composer Manager.

How can I set explicitly the dependency on a composer package on my own module? 

Should I describe it somehow on my module's .info-file or should I do it via a hook?

It's because if I don't do it, the Composer Manager can remove these packages from the site on the next updating. Unfortunately, I couldn't find any example.
You can add dependencies in your module.

Navigate to your module's root folder. Run composer init. When you get to the question Would you like to define your dependencies (require) interactively, say yes. You can then declare any composer libraries your module depends on.

You can also manually create a composer.json file that looks something like this:

{
    "name": "uniquenamespace/packagename",
    "description": "This module does some stuff",
    "type": "drupal-module",
    "authors": [
        {
            "name": "Some Guy",
            "homepage": "https://www.example.com/some_guy",
            "role": "Maintainer"
        }
    ],
    "require": {
        "somevendor/somepackage": "^1.9"
    },
    "license": "GPL-2.0-or-later"
}


Run composer validate to check that your composer.json file is valid.