How to build a conda package which depends on other conda packages

I work in a scientific environment where we use a lot of packages that are only available on bioconda. I have a couple of requirements:
I would like a private package repository for our internal packages. For that I’ve setup a quetz server, which seems to work.

I’m at a second stage now, where I want to have our conda packages depend on each other and others bioconda packages as well.
My current directory structure looks like the following:

  • namespace_package/package1/
    • init.py
    • file_1.py
    • file_n.py
  • setup.py

Let say setup.py defines that package_1 depends on psutil, for example.

In order to build and release a conda package, I currently:

  • python -m build --sdist
  • grayskull pypi -o conda_recipe --strict-conda-forge dist/sdist.tar.gz
  • conda build conda_recipe
  • upload to quetz server

Up until here, I can build my packages ok.
I still have a few issues:
1.Namespace packages, from what I’ve read, they aren’t accepted in the conda community, and there isn’t a great way of building them
2.How should I activate a local environment for my package? Do I build it from the meta.yaml that gets built from grayskull?
3.Do I actually need setup.py? I’ve tried having a meta.yaml file instead of a setup.py file with the source section pointing to the current directory, and a few other things, but always end up with an error at the conda build stage regarding there not being a setup.py file.

Now I would like to make a second package, package2.
Let’s say package2 depends on package1 and some packages from the bioconda channel.
4. How should I go about defining these dependencies? Do I add them to the setup.py file? That seems strange as these only work for pypi dependencies. Is this where you would use metapackages?